emit method
Emits an event, calling all registered listeners.
Implementation
void emit(String event, [dynamic data]) {
for (var listener in _listeners[event] ?? []) {
listener(data);
}
}
Emits an event, calling all registered listeners.
void emit(String event, [dynamic data]) {
for (var listener in _listeners[event] ?? []) {
listener(data);
}
}