addListener method

void addListener(
  1. Type t,
  2. NopListener listener
)

Implementation

void addListener(Type t, NopListener listener) {
  if (_subNopListeners.containsKey(t)) return;
  _subNopListeners[t] = listener;
  final sync = _syncTypePointers;
  if (sync == null) {
    _updateDependence();
    return;
  }
  if (sync.findCurrentTypeArg(t) != null) return;
  sync.addListener(t, listener);

  if (sync is! NopDependencies) listener.onDependenceAdd(sync);
}