doOnDone method

Stream<T> doOnDone(
  1. void onDone()
)

Invokes the given callback function when the stream finishes emitting items. In other implementations, this is called doOnComplete(d).

Example

Stream.fromIterable([1, 2, 3])
  .doOnDone(() => print('all set'))
  .listen(null); // prints 'all set'

Implementation

Stream<T> doOnDone(void Function() onDone) =>
    DoStreamTransformer<T>(onDone: onDone).bind(this);