doOnPause method Null safety
- void onPause(
Invokes the given callback function when the stream subscription is paused.
Example
final subscription = Stream.fromIterable([1])
.doOnPause(() => print('Gimme a minute please'))
.listen(null);
subscription.pause(); // prints 'Gimme a minute please'
Implementation
Stream<T> doOnPause(void Function() onPause) =>
transform(DoStreamTransformer<T>(onPause: onPause));