WindowStreamTransformer<T> constructor

  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.


WindowStreamTransformer(Stream window(T event))
    : super(WindowStrategy.firstEventOnly, window,
          onWindowEnd: (List<T> queue) => Stream.fromIterable(queue),
          ignoreEmptyWindows: false) {
  if (window == null) throw ArgumentError.notNull('window');