PubSubMessageListener class

Receives a topic's messages; pass it to PubSub.subscribe and the same object to PubSub.unsubscribe. Every callback is optional.

Constructors

PubSubMessageListener({void onMessageReceived(PubSubMessage message)?, void onOldMessagesReceived(List<PubSubMessage> messages, PubSubHistoryInfo info)?, void onBatchReceived(List<PubSubMessage> messages)?, void onMessageDrop(PubSubMessageDropInfo info)?})
Builds a listener from any of the four callbacks.
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
onBatchReceived → void Function(List<PubSubMessage> messages)?
Live messages delivered together.
final
onMessageDrop → void Function(PubSubMessageDropInfo info)?
Live messages dropped under RealtimeOverflow.DROP.
final
onMessageReceived → void Function(PubSubMessage message)?
A live message.
final
onOldMessagesReceived → void Function(List<PubSubMessage> messages, PubSubHistoryInfo info)?
Stored messages, delivered after subscribing.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited