ignoreElements method

Stream<Never> ignoreElements()

Creates a Stream where all emitted items are ignored, only the error / completed notifications are passed

ReactiveX doc Interactive marble diagram

Example

MergeStream([
  Stream.fromIterable([1]),
  Stream<int>.error(Exception())
])
.ignoreElements()
.listen(print, onError: print); // prints Exception

Implementation

Stream<Never> ignoreElements() =>
    IgnoreElementsStreamTransformer<T>().bind(this);