doOnPause method

Observable<T> doOnPause (void onPause(Future resumeSignal))

Invokes the given callback function when the stream subscription is paused.

Example

final subscription = new Observable.just(1)
  .doOnPause(() => print("Gimme a minute please"))
  .listen(null);

subscription.pause(); // prints "Gimme a minute please"

Implementation

Observable<T> doOnPause(void onPause(Future<dynamic> resumeSignal)) =>
    transform(new DoStreamTransformer<T>(onPause: onPause));