emit method
Trigger eventName
event with or without the param
given.
Implementation
void emit(Enum eventName, [dynamic param]) {
final callbacks = HashSet()
..addAll(
_events[_instance]?[eventName] ?? {},
)
..addAll(
_events[_reactterInstance]?[eventName] ?? {},
);
for (var callback in callbacks) {
callback(_instance, param);
}
}