Subscription class
A live 2026-07-28 subscriptions/listen subscription handle (SEP-2577).
Exposes the acknowledged filter, the stream of notifications delivered on it
(each stamped with the subscriptionId), and cancel to terminate the stream
(sends notifications/cancelled referencing the subscriptionId).
Constructors
-
Subscription({required int subscriptionId, required Future<
SubscriptionFilter> acknowledged, required Stream<SubscriptionNotification> notifications, required void cancel()}) -
const
Properties
-
acknowledged
→ Future<
SubscriptionFilter> -
The subset of the requested filter the server agreed to honor (from the
notifications/subscriptions/acknowledgedmessage).final - cancel → void Function()
-
Terminates the subscription (
notifications/cancelled).final - hashCode → int
-
The hash code for this object.
no setterinherited
-
notifications
→ Stream<
SubscriptionNotification> -
Notifications delivered on this stream (
method+params). Terminates when the server closes the subscription.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- subscriptionId → int
-
The subscriptionId (== the JSON-RPC id of the
subscriptions/listenrequest that opened this stream).final
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