pubnub
9.2.0, released 12 days ago by pubnub.com
PubNub SDK for Dart and Flutter to build real-time messaging applications
What it does
Connects your Dart or Flutter application to the PubNub Data Streaming Network. It allows you to publish messages, subscribe to channels using streams, and fetch channel history.
AI-written summary of version 9.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need real-time messaging or chat features in your app
- You want to stream data updates across multiple clients instantly
Skip it when
- You are using a completely different backend or messaging service like Firebase
Strengths
- Native Flutter and Dart support
- Stream-based subscription model
- Supports multiple keysets and channel history retrieval
Weaknesses
- License is unknown
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- Yes (build_runner)
- Direct dependencies
- 12
Add the dependency to pubspec.yaml, configure your keyset with PubNub keys, and run build_runner if generating necessary source files.
final myKeyset = Keyset(
subscribeKey: 'demo',
publishKey: 'demo',
uuid: UUID('demo'));
final pubnub = PubNub(defaultKeyset: myKeyset);
pubnub.publish('my_channel', { 'content': 'Hello world!' });Alternatives
Packages that do the same job and could replace pubnub.
- matrix
Matrix (matrix.org) SDK written in Dart.
88Compare - agora_rtm
Flutter wrapper around the Agora Real Time Message SDKs for Android and iOS.
68Compare - sendbird_chat_sdk
Add real-time chat and messaging features to your Flutter application using the Sendbird backend.
76Compare - dart_pusher_channels
Pure‑Dart client for the Pusher Channels real‑time protocol.
65Compare
Works with
Packages commonly used together with pubnub: ones it builds on, ones built on it, and its own family.
- cryptopubnub depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- xmlpubnub depends on itFull-featured XML and XPath library for DOM parsing, SAX streaming, and fluent building.
- poolpubnub depends on itManage a finite pool of resources to control concurrent operations.
- webpubnub depends on itLightweight bindings for browser APIs via JS interop
- asyncpubnub depends on itUtility classes and helpers that extend Dart's async library.
- convertpubnub depends on itEncoders and decoders for converting between different data representations.
- http2pubnub depends on itAn HTTP/2 implementation in Dart for low-level transport and pooled HTTP/2 requests.
- encryptpubnub depends on itHigh‑level Dart APIs for encryption, decryption, signing and secure random generation.