StreamSubscriptionUnit<T> class

Implemented types
Available Extensions

Constructors

StreamSubscriptionUnit(StreamLazyMixin<T> source, void onData(T event)?, {Function? onError, void onDone()?, bool? cancelOnError})
StreamSubscriptionUnit.zone(Zone zone, StreamLazyMixin<T> _source, void onData(T event)?, {Function? onError, void onDone()?, bool? cancelOnError})

Properties

closed bool
no setter
hashCode int
The hash code for this object.
no setterinherited
isCanceled bool
no setter
isPaused bool
Whether the StreamSubscription is currently paused.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
zone Zone
getter/setter pair

Methods

asFuture<E>([E? futureValue]) Future<E>
Returns a future that handles the onDone and onError callbacks.
override
cancel() Future<void>
Cancels this subscription.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onData(void handleData(T data)?) → void
Replaces the data event handler of this subscription.
override
onDone(void handleDone()?) → void
Replaces the done event handler of this subscription.
override
onError(Function? handleError) → void
Replaces the error event handler of this subscription.
override
pause([Future<void>? resumeSignal]) → void
Requests that the stream pauses events until further notice.
override
resume() → void
Resumes after a pause.
override
runWork(FutureOr<void> work()) → void
sendData(T data) → void
sendDone() → void
sendError(Object error, StackTrace stackTrace) → void
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

onDataHandle<T>(Zone zone, void handleData(T data)?) DataHandler<T>
onDoneHandler(Zone zone, void handleDone()?) DoneHandler
onErrorHandle(Zone zone, Function? handleError) Function