emit method

void emit(
  1. dynamic eventName, [
  2. dynamic arg
])

Implementation

void emit(eventName, [arg]) {
  final callbackList = _emap[eventName];
  if (callbackList == null) return;
  for (var callback in [...callbackList]) {
    callback(arg);
  }
}