event<T> function
Event helper for Nylo Example:
event<LoginEvent>(data: {
"User": "#1 User"
});
The above example will send an event to LoginEvent.
Implementation
event<T>({Map? data}) async =>
await nyEvent<T>(params: data, events: Nylo.events());