addListenerId method Null safety

Disposer addListenerId(
  1. Object? key,
  2. GetStateUpdate listener
)

Implementation

Disposer addListenerId(Object? key, GetStateUpdate listener) {
  _updatersGroupIds![key] ??= <GetStateUpdate>[];
  _updatersGroupIds![key]!.add(listener);
  return () => _updatersGroupIds![key]!.remove(listener);
}