emit method
Implementation
void emit(String event, [dynamic data]) {
final list0 = _events[event];
final list = list0 != null ? List.from(list0) : null;
list?.forEach((handler) {
handler(data);
});
_eventsOnce.remove(event)?.forEach((EventHandler handler) {
handler(data);
});
}