addListener method
Implementation
void addListener(
Type t, NopListener listener, Object? groupName, int? position) {
assert(!containsKey(groupName, t), t);
_groupPointers.putIfAbsent(groupName, () => {})[t] = listener;
listener.onAddDependence(this);
assert(() {
position = position == null ? null : position! + 1;
return true;
}());
assert(listener.length <= 1 ||
Log.w('${listener.label} Add: ${listener.length}.',
position: position ?? 0));
}