DebounceStreamTransformer<T> constructor

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

Constructs a StreamTransformer which will only emit items from the source sequence if a window has completed, without the source sequence emitting.

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

Implementation

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