mutate function

void mutate(
  1. void updates()
)

Run multiple state updates in a single batch, triggering only one UI rebuild. Prevents redundant repaints when updating multiple tightly coupled states.

Implementation

void mutate(void Function() updates) {
  PodTracker.startBatch();
  try {
    updates();
  } finally {
    PodTracker.endBatch();
  }
}