combineLatest<T, R> method

Stream<R> combineLatest <T, R>(
  1. Iterable<Stream<T>> streams,
  2. R combiner(
    1. List<T> values

Merges the given Streams into a single Stream sequence by using the combiner function whenever any of the stream sequences emits an item. This is helpful when you need to combine a dynamic number of Streams.

The Stream will not emit any lists of values until all of the source streams have emitted at least one value.

Interactive marble diagram


Rx.combineLatest([ Stream.value('a'), Stream.fromIterable('b', 'c', 'd') ], (list) => list.join()) .listen(print); // prints 'ab', 'ac', 'ad'


static Stream<R> combineLatest<T, R>(
        Iterable<Stream<T>> streams, R Function(List<T> values) combiner) =>
    CombineLatestStream<T, R>(streams, combiner);