Listener<T> constructor

Listener<T>(
  1. T event,
  2. EventCallback _callback,
  3. 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);