onPointerDown method
Implementation
@override
void onPointerDown(PointerDownEvent event) {
super.onPointerDown(event);
super.hold();
_tapCount++;
assert(
doubleTappableDuration != null,
'The [_doubleTappableTimer] must be initialised before the [doubleTappableDuration] can be Initialised.'
);
assert(
doubleTapHoldDuration != null,
'The [_doubleTapHoldTimer] must be initialised before the [doubleTapHoldDuration] can be Initialised.'
);
if (_doubleTapCount == 1) onContinueStart();
if (_doubleTapCount > 0) {
final isContinueable = onDoubleTap?.call(currentPointerOffset, _doubleTapCount);
accept();
if (isContinueable ?? false) {
onContinued();
_doubleTappableTimer?.cancel();
_doubleTappableTimer = null;
_doubleTapHoldTimer?.cancel();
_doubleTapHoldTimer = Timer(doubleTapHoldDuration!, onContinueEnd);
} else {
onContinueEnd();
}
} else {
_doubleTappableTimer?.cancel();
_doubleTappableTimer = Timer(doubleTappableDuration!, () {
super.reject();
super.releaseAll();
});
}
}