isPointerAllowed method

  1. @override
bool isPointerAllowed(
  1. PointerDownEvent event
)
override

Checks whether or not a pointer is allowed to be tracked by this recognizer.

Implementation

@override
bool isPointerAllowed(PointerDownEvent event) {
  if (_firstTap == null) {
    if (onDoubleTapDown == null &&
        onDoubleTap == null &&
        onDoubleTapCancel == null) {
      return false;
    }
  }

  // If second tap is not allowed, reset the state.
  final bool isPointerAllowed = super.isPointerAllowed(event);
  if (!isPointerAllowed) {
    _reset();
  }
  return isPointerAllowed;
}