DebounceStreamTransformer<T> constructor

DebounceStreamTransformer<T>(
  1. Stream window(
    1. T event
    )
)

Constructs a StreamTransformer which buffers events into a List and emits this List whenever the current window fires.

The window is reset whenever the Stream that is being transformed emits an event.

Implementation

DebounceStreamTransformer(Stream Function(T event) window)
    : super(
        WindowStrategy.everyEvent,
        window,
        onWindowEnd: (Iterable<T> queue) => queue.last,
        maxLengthQueue: 1,
      );