EventListener constructor
EventListener(
- String eventName,
- Object context,
- EventCallback callback,
- CancelEvent cancel,
Constructor for Listener.
This will take four arguments.
eventName
, callback
are mandatory.
context
, cancel
are optional.
if cancel
callback is provided, then the listener can use that to cancel the subscription.
Implementation
EventListener(this.eventName, this.context, this.callback, this.cancel);