off<T> method
Remove an attached listener, by event type, data type and callback...
Implementation
bool off<T>({String? type, EventCallback<T>? callback}) {
bool removed = false;
for (final listener in listeners.toList()) {
if (listener.protected) continue;
if (listener.matches(type, callback)) {
removed = removeEventListener(listener) || removed;
}
}
return removed;
}