hasEventListener method
type
- The type of event to listen to.
listener
- The function that gets called when the event is fired.
Checks if listener is added to an event type.
Implementation
bool hasEventListener(String type, Function listener) {
if (_listeners == null) return false;
final listeners = _listeners!;
return listeners[type] != null && listeners[type]!.contains(listener);
}