on method
Listens to specific events by name.
Implementation
void on(EventType event, void Function(dynamic) listener) {
final subscription = _controller.stream
.where((eventMap) => eventMap.containsKey(event))
.map((eventMap) => eventMap[event])
.listen(listener);
_listeners.putIfAbsent(event, () => []).add(MapEntry(listener, subscription));
}