removeEventListener method
void
removeEventListener(})
override
Implementation
@override
void removeEventListener(dynamic state, {String? listenerId, Function? listener}) {
if (listenerId != null) {
_listeners.removeWhere((item) => item.state == state && item.id == listenerId);
} else if (listener != null) {
for (int i = 0; i < _listeners.length; i++) {
if (_listeners[i].state == state && _listeners[i].function == listener) {
_listeners.removeAt(i);
break;
}
}
} else {
_listeners.removeWhere((item) => item.state == state);
}
}