pause method

void pause()

Pauses the active stream if it's currently listening.

Implementation

void pause() {
  throwIfDisposed('pause stream');
  MinixErrorHandler.safeExecute(() {
    if (_subscription != null && !_subscription!.isPaused) {
      _subscription!.pause();
      _state.value = StreamState.paused;
    }
  }, context: 'StreamObservable.pause');
}