remove<T extends EventType> method
void
remove<T extends EventType>(
- T eventType,
- void listener(
- T event
Implementation
void remove<T extends EventType>(
T eventType, void Function(T event)? listener) {
List<dynamic>? targets = listeners[eventType.runtimeType];
if (targets == null) {
return;
}
// logger.warn("removing $eventType on $listener");
if (!targets.remove(listener)) {
logger.warn('Failed to remove any listeners for EventType $eventType');
}
}