wc_utils/misc/events/events
library
Classes
-
EventEmitter<T>
-
This class provides necessary implementations for subscribing and cancelling the event subscriptions and publishing events to the subcribers.
-
IEvents
-
-
Listener<T>
-
Listener is one who listen for specific event.
Listener register for notification with EventEmitter
Once the listener is registered, a Listener interface is returned back to the caller.
Caller can use this Listener interface to cancel the registration or check the state.
Typedefs
-
CancelEvent
= void Function()
-
Handler for cancelling the event registration.
-
EventCallback
= void Function(Object? data)
-
The callback function to receive event notification.
data
- Object event data emitted by the publisher.