read method

void read(
  1. Listenable updaters
)

Reads a notifier and sets up automatic listener tracking.

Implementation

void read(Listenable updaters) {
  final data = _notifyData;
  final listener = data?.updater;
  if (listener != null && !data!._subscribedNotifiers.contains(updaters)) {
    data._subscribedNotifiers.add(updaters);
    updaters.addListener(listener);
    add(() => updaters.removeListener(listener));
  }
}