cancelPointer method
Dispatch a PointerCancelEvent for the given pointer soon.
The pointer event will be dispatch 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));
}