removeListener method
Implementation
@mustCallSuper
void removeListener(String eventName, Function callback) {
assert(callback != null);
assert(eventName != null);
assert(eventName.isNotEmpty);
if (!_events.containsKey(eventName)) {
return;
}
_events[eventName]!.removeWhere((listener) => listener.fn == callback);
if (_events[eventName]!.isEmpty) {
_events.remove(eventName);
}
}