buffer<R> method

Observable<List<T>> buffer<R>({
  1. Scheduler? scheduler,
  2. Observable<R>? trigger,
  3. int? maxLength,
  4. Duration? maxAge,
})

Gathers the items emitted by this Observable and bundles these items into a list until either

  • another Observable triggers,
  • the buffer reaches maxLength, or
  • the buffer reaches maxAge.

Implementation

Observable<List<T>> buffer<R>(
        {Scheduler? scheduler,
        Observable<R>? trigger,
        int? maxLength,
        Duration? maxAge}) =>
    BufferObservable<T, R>(
        this, scheduler ?? defaultScheduler, trigger, maxLength, maxAge);