batchUpdate method

void batchUpdate(
  1. void fn()
)

Executes fn with notifications suppressed, then notifies once.

Implementation

void batchUpdate(void Function() fn) {
  _suppressNotifications = true;
  fn();
  _suppressNotifications = false;
  notifyListeners();
}