combine6<A, B, C, D, E, F, R> static method

CombineLatestStream<dynamic, R> combine6<A, B, C, D, E, F, R>(
  1. Stream<A> streamA,
  2. Stream<B> streamB,
  3. Stream<C> streamC,
  4. Stream<D> streamD,
  5. Stream<E> streamE,
  6. Stream<F> streamF,
  7. R combiner(
    1. A a,
    2. B b,
    3. C c,
    4. D d,
    5. E e,
    6. F f
    )
)

Constructs a CombineLatestStream from 6 Streams where combiner is used to create a new event of type R, based on the latest events emitted by the provided Streams.

Implementation

static CombineLatestStream<dynamic, R> combine6<A, B, C, D, E, F, R>(
  Stream<A> streamA,
  Stream<B> streamB,
  Stream<C> streamC,
  Stream<D> streamD,
  Stream<E> streamE,
  Stream<F> streamF,
  R Function(A a, B b, C c, D d, E e, F f) combiner,
) =>
    CombineLatestStream<dynamic, R>(
      [streamA, streamB, streamC, streamD, streamE, streamF],
      (List<dynamic> values) {
        return combiner(
          values[0] as A,
          values[1] as B,
          values[2] as C,
          values[3] as D,
          values[4] as E,
          values[5] as F,
        );
      },
    );