Listener<T> constructor
Listener<T> (
- T event,
- EventCallback _callback,
- CancelEvent? _cancelCallback
Constructor for Listener.
This will take four arguments.
event, callback are mandatory.
_cancelCallback
is optional.
if _cancelCallback
callback is provided, then the listener can use that to cancel the subscription.
Implementation
Listener(this.event, this._callback, this._cancelCallback);