bufferFuture<O> method

Observable<List<T>> bufferFuture <O>(Future<O> onFutureHandler())

Creates an Observable where each item is a List containing the items from the source sequence, batched whenever onFutureHandler completes.

Example

new Observable.periodic(const Duration(milliseconds: 100), (int i) => i)
  .bufferFuture(() => new Future.delayed(const Duration(milliseconds: 220)))
  .listen(print); // prints [0, 1] [2, 3] [4, 5] ...

Implementation

Observable<List<T>> bufferFuture<O>(Future<O> onFutureHandler()) => transform(
    new BufferStreamTransformer<T>(onFuture<T, List<T>, O>(onFutureHandler)));