DelegatingStreamSubscription<T> class
Null safety
Simple delegating wrapper around a StreamSubscription.
Subclasses can override individual methods.
- Implemented types
Constructors
-
DelegatingStreamSubscription(StreamSubscription<
T> sourceSubscription) -
Create delegating subscription forwarding calls to
sourceSubscription
.
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- isPaused → bool
-
Whether the StreamSubscription is currently paused.
read-onlyoverride
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
asFuture<
E> ([E? futureValue]) → Future< E> -
Returns a future that handles the onDone and onError callbacks.
override
-
cancel(
) → Future -
Cancels this subscription.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
onData(
void handleData(T)?) → 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? resumeFuture]) → void -
Requests that the stream pauses events until further notice.
override
-
resume(
) → void -
Resumes after a pause.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
typed<
T> (StreamSubscription subscription) → StreamSubscription< T> -
Creates a wrapper which throws if
subscription
's events aren't instances ofT
.Deprecated('Use Stream.cast instead')">@Deprecated('Use Stream.cast instead')