Subscription class

Pubsub subscription result.

Subscription can receive messages from pubsub and process them on its stream. Example:

PubSub pubsub = PubSub();
Subscription? sub = pubsub?.subscribe('topic');
sub?.stream?.listen((message) {
  print(message);
});

Constructors

Subscription(Set<String?>? _topics, String? _pubsub)

Properties

hashCode int
The hash code for this object.
no setterinherited
isCanceled bool?
no setter
pubsub String?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream?
no setter
topics Set<String?>?
no setter

Methods

cancel() Future<void>?
PubSub uses this method to cancel subscription on it This method not intended to be manual called.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(dynamic message) → void
PubSub uses this method to send messages to subscription. This method not intended to be manual called.
toString() String
A string representation of this object.
inherited

Operators

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