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). Audited: 2026-06-12 11:26 EDT

Implementation

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