useEmitter function Null safety

EventEmitter? useEmitter(
  1. String key
)

Emitter 钩子

Implementation

EventEmitter? useEmitter(String key) {
  if (_emitterMap.containsKey(key) == false) {
    _emitterMap[key] = EventEmitter();
  }
  return _emitterMap[key];
}