Observable<T>.concatEager constructor

  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


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


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