WindowTestStreamTransformer<T> constructor

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: (queue) => Stream.fromIterable(queue),
          closeWindowWhen: (queue) => test(queue.last));