validate<T extends Event> method
Checks if the listener matches a given event.
Implementation
bool validate<T extends Event>(T event) =>
(event is CallbackDataT ||
event.data is CallbackDataT ||
isSubtype<T, CallbackDataT>() ||
isSubtype<T, Event<CallbackDataT>>()) &&
(event.type == type || type == null);