Create a PointerCancelEvent.
By default, the time stamp on the event is Duration.ZERO. You
can give a specific time stamp by passing the timeStamp
argument.
The object is no longer usable after this method has been called.
Source
PointerCancelEvent cancel({ Duration timeStamp: Duration.ZERO }) {
assert(isDown);
_isDown = false;
return new PointerCancelEvent(
timeStamp: timeStamp,
pointer: pointer,
position: location
);
}