concatEager<T> method

Stream<T> concatEager <T>(
  1. Iterable<Stream<T>> streams
)

Concatenates all of the specified stream sequences, as long as the previous stream sequence terminated successfully.

In the case of concatEager, rather than subscribing to one stream after the next, all streams are immediately subscribed to. The events are then captured and emitted at the correct time, after the previous stream has finished emitting items.

Interactive marble diagram

Example

Rx.concatEager([
  Stream.value(1),
  Rx.timer(2, Duration(days: 1)),
  Stream.value(3)
])
.listen(print); // prints 1, 2, 3

Implementation

static Stream<T> concatEager<T>(Iterable<Stream<T>> streams) =>
    ConcatEagerStream<T>(streams);