debounceBuffer method
Buffers values until this stream does not emit for duration
then emits
the collected values.
Values will always be delayed by at least duration
, and values which
come within this time will be aggregated into the same list.
If this stream is a broadcast stream, the result will be as well. Errors are forwarded immediately.
If there are events waiting during the debounce period when this stream closes the returned stream will wait to emit them following the debounce period before closing. If there are no pending debounced events when this stream closes the returned stream will close immediately.
To keep only the most recent event during the debounce period see debounce.
Implementation
Stream<List<T>> debounceBuffer(Duration duration) =>
_debounceAggregate(duration, _collect, leading: false, trailing: true);