Subscription class

Represents an active subscription to channels or patterns.

Returned by subscribe() and psubscribe().

Constructors

Subscription(Stream<ValkeyMessage> messages, Future<void> ready, {Future<void> onUnsubscribe()?})
Creates a Subscription. onUnsubscribe is an optional callback invoked when unsubscribe() is called.

Properties

hashCode int
The hash code for this object.
no setterinherited
messages Stream<ValkeyMessage>
A broadcast stream that emits messages received on the subscribed channels/patterns.
final
ready Future<void>
A Future that completes when the initial subscription to all requested channels/patterns is confirmed by the server. (A Future that completes when the subscription is ready.)
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
unsubscribe() Future<void>
Unsubscribes from this subscription.

Operators

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