with2<T, A, B, 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> with2<T, A, B, R>(
Stream<A> latestFromStream1,
Stream<B> latestFromStream2,
R Function(T t, A a, B b) fn,
) =>
WithLatestFromStreamTransformer<T, dynamic, R>(
[latestFromStream1, latestFromStream2],
(s, values) => fn(s, values[0] as A, values[1] as B),
);