SampleStreamTransformer<T> constructor

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

Constructs a StreamTransformer that, when the specified window emits an item or completes, emits the most recently emitted item (if any) emitted by the source Stream since the previous emission from the sample Stream.

Implementation

SampleStreamTransformer(Stream Function(T event) window)
    : super(WindowStrategy.firstEventOnly, window,
          onWindowEnd: (queue) => queue.last);