In flutter source file gestures/binding.dart, there is a method named cancelPointer,I have a question about its implement.
void cancelPointer(int pointer) {
if (_pendingPointerEvents.isEmpty && !locked)
scheduleMicrotask(_flushPointerEventQueue);
_pendingPointerEvents.addFirst(PointerCancelEvent(pointer: pointer));
}
why flush an empty _pendingPointeEvents
queue?