on static method
Implementation
static Future<void> on(String eventName, Function callback) async {
if (callbacks.containsKey(eventName)) {
var existed = callbacks[eventName];
existed?.add(callback);
callbacks.update(eventName, (val) => existed);
} else {
callbacks.putIfAbsent(eventName, () => List.of([callback]));
}
_libraryEventSubscription.resume();
}