EventListener typedef
EventListener =
FutureOr<void> Function(dynamic payload)
A function type for event listeners that handle event payloads.
The listener receives a payload of any type and can perform asynchronous operations.
Implementations should handle exceptions gracefully to avoid disrupting the event system.
Example:
EventListener myListener = (payload) async {
print('Event received: $payload');
};
Implementation
typedef EventListener = FutureOr<void> Function(dynamic payload);