Observable<T>.concatEager constructor

Observable<T>.concatEager(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

new Observable.concatEager([
  new Observable.just(1),
  new Observable.timer(2, new Duration(days: 1)),
  new Observable.just(3)
])
.listen(print); // prints 1, 2, 3

Implementation

factory Observable.concatEager(Iterable<Stream<T>> streams) =>
    Observable<T>(ConcatEagerStream<T>(streams));