listen<T> method

void listen<T>(
  1. Getter<T> getter,
  2. BolterNotification notification
)

Registers a getter and a notification to be notified when the result of calling the getter changes

Implementation

void listen<T>(Getter<T> getter, BolterNotification notification) {
  _listeners[notification] = getter;
  _hashCache[notification] = ComparableWrapper(getter()).hashCode;
}