Observable<T>.concat constructor

Observable<T>.concat(Iterable<Stream<T>> streams)

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

It does this by subscribing to each stream one by one, emitting all items and completing before subscribing to the next stream.

Interactive marble diagram


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


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