subscribeOnEvent<Event> method
FrontendEventSubscription<Event>
subscribeOnEvent<Event>({})
With this method you can subscribe on every Frontend to getting notifications about new events in this Frontend
Implementation
FrontendEventSubscription<Event> subscribeOnEvent<Event>({
required FrontendEventListener<Event> listener,
/// Will called only once and automatically closed
bool single = false,
/// If true - this listener will been called on every action with this event
/// If false - only on forceUpdate (if these events will be)
bool onEveryEvent = false,
/// The event, on that you will subscribe
Event? event,
}) {
return FrontendActionSubscriber(
frontend: this,
event: event,
eventType: Event,
).subscribe(
single: single,
listener: listener,
onEveryEvent: onEveryEvent,
);
}