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 (!(shouldAcceptTouchAtPosition?.call(event.position) ?? true)) {
    return false;
  }
  final res = super.isPointerAllowed(event);
  if (res) {
    _lastPointer = event.pointer;
  }
  return res;
}