addListener method

  1. @override
void addListener(
  1. List<String> expressions,
  2. VoidCallback listener
)
override

Implementation

@override
void addListener(List<String> expressions, VoidCallback listener) {
  expressions.forEach((key) {
    final old = _listeners[key];
    final callbacks = old ?? <VoidCallback>{};
    callbacks.add(listener);
    if (old != callbacks) {
      _listeners[key] = callbacks;
    }
  });
}