with1<T, S, R> static method
WithLatestFromStreamTransformer<T, S, R>
with1<T, S, R>(
- Stream<
S> latestFromStream, - R fn(
- T t,
- S s
Constructs a StreamTransformer that emits when the source Stream emits, combining
the latest values from latestFromStream
using the provided function fn
.
Implementation
static WithLatestFromStreamTransformer<T, S, R> with1<T, S, R>(
Stream<S> latestFromStream,
R Function(T t, S s) fn,
) =>
WithLatestFromStreamTransformer<T, S, R>(
[latestFromStream],
(s, values) => fn(s, values[0]),
);