on method
Adds a listener for a specific event.
Implementation
void on(String event, Function(dynamic) listener) {
_listeners.putIfAbsent(event, () => []).add(listener);
}
Adds a listener for a specific event.
void on(String event, Function(dynamic) listener) {
_listeners.putIfAbsent(event, () => []).add(listener);
}