DoExtensions<T> extension
Extends the Stream class with the ability to execute a callback function at different points in the Stream's lifecycle.
- on
-
- Stream<
T>
- Stream<
Methods
-
doOnCancel(
FutureOr< void> onCancel()) → Stream<T> -
Available on Stream<
Invokes the given callback function when the stream subscription is cancelled. Often called doOnUnsubscribe or doOnDispose in other implementations.T> , provided by the DoExtensions extension -
doOnData(
void onData(T event)) → Stream< T> -
Available on Stream<
Invokes the given callback function when the stream emits an item. In other implementations, this is called doOnNext.T> , provided by the DoExtensions extension -
doOnDone(
void onDone()) → Stream< T> -
Available on Stream<
Invokes the given callback function when the stream finishes emitting items. In other implementations, this is called doOnComplete(d).T> , provided by the DoExtensions extension -
doOnEach(
void onEach(StreamNotification< T> notification)) → Stream<T> -
Available on Stream<
Invokes the given callback function when the stream emits data, emits an error, or emits done. The callback receives a StreamNotification object.T> , provided by the DoExtensions extension -
doOnError(
void onError(Object, StackTrace)) → Stream< T> -
Available on Stream<
Invokes the given callback function when the stream emits an error.T> , provided by the DoExtensions extension -
doOnListen(
void onListen()) → Stream< T> -
Available on Stream<
Invokes the given callback function when the stream is first listened to.T> , provided by the DoExtensions extension -
doOnPause(
void onPause()) → Stream< T> -
Available on Stream<
Invokes the given callback function when the stream subscription is paused.T> , provided by the DoExtensions extension -
doOnResume(
void onResume()) → Stream< T> -
Available on Stream<
Invokes the given callback function when the stream subscription resumes receiving items.T> , provided by the DoExtensions extension