SubscriptionManager class

Inheritance

Constructors

SubscriptionManager()

Properties

allPaused bool
Whether all managed StreamSubscriptions are currently paused.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isDisposed bool
Checks if this composite is disposed. If it is, the composite can't be used again and will throw an error if you try to add more subscriptions to it.
no setterinherited
isEmpty bool
Checks if there currently are no StreamSubscriptions added
no setterinherited
isNotEmpty bool
Checks if there currently are StreamSubscriptions added
no setterinherited
isPaused bool
Whether the StreamSubscription is currently paused.
no setterinherited
length int
Returns the total amount of currently added StreamSubscriptions
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add<T>(StreamSubscription<T> subscription) StreamSubscription<T>
Adds new subscription to this composite.
inherited
addById<T extends Object>(StreamSubscription<T> subscription, String id) StreamSubscription<T>
Adds a subscription by id.
asFuture<E>([E? futureValue]) → Never
Returns a future that handles the onDone and onError callbacks.
inherited
cancel() Future<void>
Cancels this subscription.
inherited
clear() Future<void>?
Cancels all subscriptions added to this composite. Clears subscriptions collection.
override
dispose() Future<void>?
Cancels all subscriptions added to this composite. Disposes this.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onData(void handleData(Never data)?) → Never
Replaces the data event handler of this subscription.
inherited
onDone(void handleDone()?) → Never
Replaces the done event handler of this subscription.
inherited
onError(Function? handleError) → Never
Replaces the error event handler of this subscription.
inherited
pause([Future<void>? resumeSignal]) → void
Requests that the stream pauses events until further notice.
inherited
pauseAll([Future<void>? resumeSignal]) → void
Pauses all subscriptions added to this composite.
inherited
remove(StreamSubscription subscription, {bool shouldCancel = true}) Future<void>?
Remove the subscription from this composite and cancel it if it has been removed.
override
removeById(String id) → void
replaceById<T extends Object>(StreamSubscription<T> subscription, String id) StreamSubscription<T>
Replaces an existing subscription by id.
resume() → void
Resumes after a pause.
inherited
resumeAll() → void
Resumes all subscriptions added to this composite.
inherited
toString() String
A string representation of this object.
inherited

Operators

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