handleEvent method

  1. @override
void handleEvent(
  1. PointerEvent event
)
override

Called when a pointer event is routed to this recognizer.

This will be called for every pointer event while the pointer is being tracked. Typically, this recognizer will start tracking the pointer in addAllowedPointer, which means that handleEvent will be called starting with the PointerDownEvent that was passed to addAllowedPointer.

See also:

Implementation

@override
void handleEvent(PointerEvent event) {
  if (event is PointerCancelEvent) {
    try {
      _dispatchingCancel = true;
      super.handleEvent(event);
    } finally {
      _dispatchingCancel = false;
    }
  } else {
    super.handleEvent(event);
  }
}