hasSufficientGlobalDistanceToAccept method

  1. @override
bool hasSufficientGlobalDistanceToAccept(
  1. PointerDeviceKind pointerDeviceKind,
  2. double? deviceTouchSlop
)
override

Whether the globalDistanceMoved is big enough to accept the gesture.

If this method returns true, it means this recognizer should declare win in the gesture arena.

Implementation

@override
bool hasSufficientGlobalDistanceToAccept(PointerDeviceKind pointerDeviceKind, double? deviceTouchSlop) {
  return globalDistanceMoved.abs() > computeHitSlop(pointerDeviceKind, gestureSettings);
}