removeEvent method

void removeEvent(
  1. String eventType
)
inherited

Implementation

void removeEvent(String eventType) {
  if (!eventHandlers.containsKey(eventType)) return; // Only listen once.
  removeEventListener(eventType, _eventResponder);

  RenderBoxModel? selfRenderBoxModel = renderBoxModel;
  if (selfRenderBoxModel != null) {
    // Remove pointer responder.
    removeEventResponder(selfRenderBoxModel);

    // Remove listener when no intersection related event
    if (_isIntersectionObserverEvent(eventType) && !_hasIntersectionObserverEvent(eventHandlers)) {
      selfRenderBoxModel.removeIntersectionChangeListener(handleIntersectionChange);
    }
  }
}