endBatch function
void
endBatch()
Ends the current batch and flushes pending effects when depth reaches zero.
Example:
final signalNode = CustomSignalNode<int>(0);
startBatch();
setSignal(signalNode, 1);
endBatch(); // Runs queued effects when this is the outer batch.
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();
}
}