windowTest method

Observable<Stream<T>> windowTest (bool onTestHandler(T event))

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

Example

new Observable.periodic(const Duration(milliseconds: 100), (int i) => i)
  .windowTest((i) => i % 2 == 0)
  .doOnData((_) => print('next window'))
  .flatMap((s) => s)
  .listen(print); // prints next window 0, next window 1, 2 next window 3, 4,  ...

Implementation

Observable<Stream<T>> windowTest(bool onTestHandler(T event)) =>
    transform(new WindowStreamTransformer<T>(onTest(onTestHandler)));