scheduleNotificationFor static method

void scheduleNotificationFor(
  1. ChangeNotifier notifier
)

Schedules a notification for a notifier to be sent after transaction completes.

Uses Set to deduplicate - same notifier will only notify once per transaction.

Implementation

static void scheduleNotificationFor(ChangeNotifier notifier) {
  if (_inTransaction) {
    _pendingNotifiers.add(notifier);
  } else {
    // Use extension method which safely calls notifyListeners
    notifier.notifyListenersTransaction();
  }
}