onErrorResumeNext method

Stream<T> onErrorResumeNext(
  1. Stream<T> recoveryStream

Intercepts error events and switches to the given recovery stream in that case

The onErrorResumeNext operator intercepts an onError notification from the source Stream. Instead of passing the error through to any listeners, it replaces it with another Stream of items.

If you need to perform logic based on the type of error that was emitted, please consider using onErrorResume.


  .onErrorResumeNext(Stream.fromIterable([1, 2, 3]))
  .listen(print); // prints 1, 2, 3


Stream<T> onErrorResumeNext(Stream<T> recoveryStream) =>
    OnErrorResumeStreamTransformer<T>((_, __) => recoveryStream).bind(this);