StreamTransformations<T> extension

Additional stream transformations not covered by the official Dart RateLimit extension.

on

Methods

asPausable() PausableStream<T>

Available on Stream<T>, provided by the StreamTransformations extension

Returns a pausable version of this stream.
bufferCount(int count) Stream<List<T>>

Available on Stream<T>, provided by the StreamTransformations extension

Buffers incoming events into lists of size count.
rateLimit(int maxEvents, Duration duration) Stream<T>

Available on Stream<T>, provided by the StreamTransformations extension

Limits the rate of event emissions, allowing at most maxEvents during each duration window.
window(Duration windowDuration) Stream<List<T>>

Available on Stream<T>, provided by the StreamTransformations extension

Buffers events into time-based windows defined by windowDuration.
withLatestValue() Stream<T>

Available on Stream<T>, provided by the StreamTransformations extension

Returns a stream that replays the latest emitted value to new subscribers.