endBatch function
void
endBatch()
Ends the current batch and flushes pending effects when the outer batch ends.
In debug mode, this asserts if it is called more times than startBatch.
Implementation
@pragma("vm:prefer-inline")
@pragma("wasm:prefer-inline")
@pragma("dart2js:prefer-inline")
void endBatch() {
batchDepth--;
assert(batchDepth >= 0, "endBatch called without matching startBatch");
if (batchDepth == 0) {
flushEffects();
}
}