WindowStreamTransformer<T> constructor

WindowStreamTransformer<T>(
  1. Stream 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 Function(T event) window)
    : super(WindowStrategy.firstEventOnly, window,
          onWindowEnd: (queue) => Stream.fromIterable(queue),
          ignoreEmptyWindows: false);