emit method
- Event event
inherited
Takes an Event and emits it to the corresponding event listener.
Implementation
void emit(Event event) {
final generalListener = _eventListeners[(Event).toString()];
generalListener?.forEach((element) {
element.call(event);
});
final listener = _eventListeners[event.runtimeType.toString()];
listener?.forEach((element) {
element.call(event);
});
}