FlatMapExtension<T> extension
Extends the Stream class with the ability to convert the source Stream into a new Stream each time the source emits an item.
- on
-
- Stream<
T>
- Stream<
Methods
-
flatMap<
S> (Stream< S> mapper(T value), {int? maxConcurrent}) → Stream<S> -
Available on Stream<
Converts each emitted item into a Stream using the given mapper function, while limiting the maximum number of concurrent subscriptions to these Streams. The newly created Stream will be be listened to and begin emitting items downstream.T> , provided by the FlatMapExtension extension -
flatMapIterable<
S> (Stream< Iterable< mapper(T value), {int? maxConcurrent}) → Stream<S> >S> -
Available on Stream<
Converts each item into a Stream. The Stream must return an Iterable. Then, each item from the Iterable will be emitted one by one.T> , provided by the FlatMapExtension extension