BatchFlushUtils<T extends Object> constructor

BatchFlushUtils<T extends Object>(
  1. int batchSize,
  2. void onFlush(
    1. List<T> batch
    )
)

Creates a batcher that flushes via onFlush once batchSize items accumulate (or when flush is called explicitly).

Implementation

BatchFlushUtils(this.batchSize, this.onFlush) : _buffer = [];