accumulate method

OffsetIterator<List<T>> accumulate({
  1. String name = 'accumulate',
  2. SeedCallback<List<T>>? seed,
  3. int retention = 0,
  4. bool? cancelOnError,
  5. bool bubbleCancellation = true,
})

Concats a stream of List's together, and emits a new list each time.

Implementation

OffsetIterator<List<T>> accumulate({
  String name = 'accumulate',
  SeedCallback<List<T>>? seed,
  int retention = 0,
  bool? cancelOnError,
  bool bubbleCancellation = true,
}) =>
    scan(
      const [],
      (acc, chunk) => [...acc, ...chunk],
      name: name,
      seed: seed,
      retention: retention,
      bubbleCancellation: bubbleCancellation,
      cancelOnError: cancelOnError,
    );