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() {
if (!((--batchDepth) != 0)) {
flushEffects();
}
}