combineLatest4<A, B, C, D, T> static method

Stream<T> combineLatest4<A, B, C, D, T>(
  1. Stream<A> streamA,
  2. Stream<B> streamB,
  3. Stream<C> streamC,
  4. Stream<D> streamD,
  5. T combiner(
    1. A a,
    2. B b,
    3. C c,
    4. D d
    )
)

Merges the given Streams into a single Stream sequence by using the combiner function whenever any of the stream sequences emits an item.

The Stream will not emit until all streams have emitted at least one item.

Interactive marble diagram

Example

Rx.combineLatest4(
  Stream.value('a'),
  Stream.value('b'),
  Stream.value('c'),
  Stream.fromIterable(['d', 'd']),
  (a, b, c, d) => a + b + c + d)
.listen(print); //prints 'abcd', 'abcd'

Implementation

static Stream<T> combineLatest4<A, B, C, D, T>(
        Stream<A> streamA,
        Stream<B> streamB,
        Stream<C> streamC,
        Stream<D> streamD,
        T Function(A a, B b, C c, D d) combiner) =>
    CombineLatestStream.combine4(
        streamA, streamB, streamC, streamD, combiner);