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