DoOnStreamExtensions<T> extension

Invokes the given callback at the corresponding point the the stream lifecycle. For example, if you pass in an onDone callback, it will be invoked when the stream finishes emitting items.

on

Methods

doOn({void listen()?, FutureOr<void> cancel()?, void pause()?, void resume()?, void data(T data)?, void error(Object error, StackTrace stackTrace)?, void done()?, void each(StreamNotification<T> notification)?}) Stream<T>

Available on Stream<T>, provided by the DoOnStreamExtensions extension

Invokes the given callback at the corresponding point the the stream lifecycle. For example, if you pass in an onDone callback, it will be invoked when the stream finishes emitting items.