matches<T> method
Checks if the listener matches the event type, data type and callback.
Implementation
bool matches<T>([String? type, EventCallback<T>? callback]) =>
(isSubtype<CallbackDataT, T>() || isSubtype<Event<CallbackDataT>, T>()) &&
(this.type == type || this.type == null || type == null) &&
(this.callback == callback || callback == null);