on<T> method
Listen to internal events.
Implementation
void on<T>(String eventName, OnEvent<T> callback) {
_eventBus
.on<Event<T>>()
.where((event) => event.name == eventName)
.listen((event) => callback(event.data));
}