EventCallback typedef Null safety

EventCallback = void Function(Event ev, Object? context)

The callback function to receive event notification. ev - Event event emitted by the publisher. context - Object passed while registering the subscription as context. This is useful especially when the listener want to receive context information for all future events emitted for the context.

Implementation

typedef EventCallback = void Function(Event ev, Object? context);