withList<T> static method

WithLatestFromStreamTransformer<T, T, List<T>> withList<T>(
  1. Iterable<Stream<T>> latestFromStreams
)

Constructs a StreamTransformer that emits when the source Stream emits, combining the latest values from latestFromStreams using a List.

Implementation

static WithLatestFromStreamTransformer<T, T, List<T>> withList<T>(
  Iterable<Stream<T>> latestFromStreams,
) {
  return WithLatestFromStreamTransformer<T, T, List<T>>(
    latestFromStreams,
    (s, values) => [s, ...values],
  );
}