WindowTestStreamTransformer<T> class

Creates a Stream where each item is a Stream containing the items from the source sequence, batched whenever test passes.


Stream.periodic(const Duration(milliseconds: 100), (int i) => i)
  .windowTest((i) => i % 2 == 0)
  .asyncMap((stream) => stream.toList())
  .listen(print); // prints [0], [1, 2] [3, 4] [5, 6] ...


WindowTestStreamTransformer(bool test(T value))
Constructs a StreamTransformer which buffers events into a Stream and emits this Stream whenever the test Function yields true.


closeWindowWhen bool Function(List<T> queue)
Predicate which determines when the current window should close
final, inherited
dispatchOnClose bool
Toggle to prevent, or allow the final set of events to be dispatched when the source Stream closes
final, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
ignoreEmptyWindows bool
Toggle to prevent, or allow windows that contain no events to be dispatched
final, inherited
maxLengthQueue int
Maximum length of the buffer. Specify this value to avoid running out of memory when adding too many events to the buffer. If it's null, maximum length of the buffer is unlimited.
final, inherited
onWindowEnd Stream<T> Function(List<T> queue)
Handler which fires when the window closes
final, inherited
onWindowStart Stream<T> Function(T event)
Handler which fires when the window opens
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
startBufferEvery int
Used to skip an amount of events
final, inherited
strategy → WindowStrategy
Determines how the window is created
final, inherited
windowStreamFactory Stream Function(T event)
Factory method used to create the Stream which will be buffered
final, inherited


bind(Stream<T> stream) Stream<Stream<T>>
Transforms the provided stream. [...]
cast<RS, RT>() StreamTransformer<RS, RT>
Provides a StreamTransformer<RS, RT> view of this stream transformer. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]