EventListener<T extends Event> constructor

EventListener<T extends Event>({
  1. String? type,
  2. EventDispatchCallback<T>? callback,
  3. bool protected = false,
  4. bool once = false,
  5. Function? alias,
})

Implementation

EventListener({
  this.type,
  EventDispatchCallback<T>? callback,
  this.protected = false,
  this.once = false,
  Function? alias,
})  : alias = alias ?? callback,
      super((subject, event) => callback?.call(event as T));