cancelPointer method

void cancelPointer (
  1. int pointer
)

Dispatch a PointerCancelEvent for the given pointer soon.

The pointer event will be dispatched before the next pointer event and before the end of the microtask but not within this function call.

Implementation

void cancelPointer(int pointer) {
  if (_pendingPointerEvents.isEmpty && !locked)
    scheduleMicrotask(_flushPointerEventQueue);
  _pendingPointerEvents.addFirst(PointerCancelEvent(pointer: pointer));
}