WindowStreamTransformer<T> constructor

WindowStreamTransformer<T>(
  1. Stream<void> window(
    1. T event
    )
)

Constructs a StreamTransformer which buffers events into a Stream and emits this Stream whenever window fires an event.

The Stream is recreated and starts empty upon every window event.

Implementation

WindowStreamTransformer(Stream<void> Function(T event) window)
    : super(WindowStrategy.firstEventOnly, window,
          onWindowEnd: (queue) => Stream.fromIterable(queue),
          ignoreEmptyWindows: false);