emit method

void emit({
  1. required String eventName,
  2. required dynamic value,
})

Implementation

void emit({
  required String eventName,
  required dynamic value,
}) {
  for (final element in events.putIfAbsent(eventName, () {
    return {};
  }).values) {
    if (element.is_pause) {
      continue;
    }
    element.onUpdate(element, value);
  }
}