EventListener<CallbackDataT> constructor
EventListener<CallbackDataT> (})
Event Listener
A listener is a subscription to a specific event type and data type.
This includes all the information needed for how to react with an event emitter.
Implementation
EventListener(
this.type,
this.callback, {
this.once = false,
this.protected = false,
this.onAdd,
this.onRemove,
this.onCall,
this.onCancel,
bool cancelAdded = true,
}) {
if (cancelAdded) {
appendCallback(
onAdd: (emitter) {
appendCallback(
onCancel: () => emitter.removeEventListener(this),
);
},
);
}
}