ExhaustMapStreamTransformer<T, S> class

Converts events from the source stream into a new Stream using a given mapper. It ignores all items from the source stream until the new stream completes.

Useful when you have a noisy source Stream and only want to respond once the previous async operation is finished.

Example

// Emits 0, 1, 2
new Stream.periodic(new Duration(milliseconds: 200), (i) => i).take(3)
  .transform(new ExhaustMapStreamTransformer(
    // Emits the value it's given after 200ms
    (i) => new Observable.timer(i, new Duration(milliseconds: 200)),
  ))
.listen(print); // prints 0, 2

Constructors

ExhaustMapStreamTransformer(Stream<S> mapper(T value))
Constructs a StreamTransformer which maps events from the source Stream using mapper. [...]

Properties

hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

bind(Stream<T> stream) → Stream<S>
Transforms the provided stream. [...]
cast<RS, RT>() → StreamTransformer<RS, RT>
Provides a StreamTransformer<RS, RT> view of this stream transformer.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited