flatMapLatest<S> method
- @deprecated
Deprecated: Please use switchMap instead.
This is the old name of this method This Converts each emitted item into a new Stream using the given mapper function. The newly created Stream will be be listened to and begin emitting items, and any previously created Stream will stop emitting.
The flatMapLatest operator is similar to the flatMap and concatMap methods, but it only emits items from the most recently created Stream.
This can be useful when you only want the very latest state from asynchronous APIs, for example.
Example
Observable.range(4, 1)
.flatMapLatest((i) =>
new Observable.timer(i, new Duration(minutes: i))
.listen(print); // prints 1
Implementation
@deprecated
Observable<S> flatMapLatest<S>(Stream<S> mapper(T value)) =>
transform(new SwitchMapStreamTransformer<T, S>(mapper));