event<T> function

dynamic event<T>({
  1. Map? data,
})

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());