accumulate method
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,
);