endBatch function

void endBatch()

Ends the current batch operation.

Decrements the batch depth. If this was the last batch (depth reaches 0), immediately flushes all queued effects.

Implementation

@pragma('vm:prefer-inline')
@pragma('dart2js:tryInline')
@pragma('wasm:prefer-inline')
void endBatch() {
  if ((--batchDepth) == 0) flush();
}