combine3<A, B, C, R> method

CombineLatestStream<dynamic, R> combine3 <A, B, C, R>(Stream<A> streamA, Stream<B> streamB, Stream<C> streamC, R combiner(A a, B b, C c))

Constructs a CombineLatestStream from 3 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> combine3<A, B, C, R>(
  Stream<A> streamA,
  Stream<B> streamB,
  Stream<C> streamC,
  R combiner(A a, B b, C c),
) {
  return CombineLatestStream<dynamic, R>(
    [streamA, streamB, streamC],
    (List<dynamic> values) {
      return combiner(
        values[0] as A,
        values[1] as B,
        values[2] as C,
      );
    },
  );
}