ExhaustMapStreamTransformer<T, S> class

Converts items 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
Inheritance

Constructors

ExhaustMapStreamTransformer(Stream<S> mapper(T value))

Properties

transformer StreamTransformer<T, S>
final
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. [...]
override
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