isPointerAllowed method Null safety
- 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) {
switch (event.buttons) {
case kPrimaryButton:
if (onDoubleTapDown == null &&
onDoubleTap == null &&
onDoubleTapCancel == null) {
return false;
}
break;
default:
return false;
}
}
return super.isPointerAllowed(event);
}