with5<T, A, B, C, D, E, R> static method
Constructs a StreamTransformer that emits when the source Stream emits, combining
the latest values from all latestFromStream
s using the provided function fn
.
Implementation
static WithLatestFromStreamTransformer<T, dynamic, R>
with5<T, A, B, C, D, E, R>(
Stream<A> latestFromStream1,
Stream<B> latestFromStream2,
Stream<C> latestFromStream3,
Stream<D> latestFromStream4,
Stream<E> latestFromStream5,
R Function(T t, A a, B b, C c, D d, E e) fn,
) =>
WithLatestFromStreamTransformer<T, dynamic, R>(
[
latestFromStream1,
latestFromStream2,
latestFromStream3,
latestFromStream4,
latestFromStream5,
],
(s, values) {
return fn(
s,
values[0] as A,
values[1] as B,
values[2] as C,
values[3] as D,
values[4] as E,
);
},
);