batchUpdate static method

void batchUpdate(
  1. List<void Function()> updates
)

Update multiple signals in a batch.

Example:

Signal.batchUpdate([
  () => name.emit('John'),
  () => age.emit(30),
  () => email.emit('john@example.com'),
]);

Implementation

static void batchUpdate(List<void Function()> updates) {
  batch(() {
    for (final update in updates) {
      update();
    }
  });
}