WindowTestStreamTransformer<T> constructor Null safety

WindowTestStreamTransformer<T>(
  1. bool test(
    1. T value
    )
)

Constructs a StreamTransformer which buffers events into a Stream and emits this Stream whenever the test Function yields true.

Implementation

WindowTestStreamTransformer(bool Function(T value) test)
    : super(WindowStrategy.onHandler, null,
          onWindowEnd: (List<T> queue) => Stream.fromIterable(queue),
          closeWindowWhen: (Iterable<T> queue) => test(queue.last));