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> - 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.
-
flatMapIterable<
S> (Stream< Iterable< mapper(T value), {int? maxConcurrent}) → Stream<S> >S> - Converts each item into a Stream. The Stream must return an Iterable. Then, each item from the Iterable will be emitted one by one.