isPointerAllowed method
- PointerDownEvent event
override
Checks whether or not a pointer is allowed to be tracked by this recognizer.
Implementation
@override
bool isPointerAllowed(PointerDownEvent event) {
switch (event.buttons) {
case kPrimaryButton:
if (onTapDown == null &&
onTap == null &&
onTapUp == null &&
onTapCancel == null) {
return false;
}
case kSecondaryButton:
if (onSecondaryTap == null &&
onSecondaryTapDown == null &&
onSecondaryTapUp == null &&
onSecondaryTapCancel == null) {
return false;
}
case kTertiaryButton:
if (onTertiaryTapDown == null &&
onTertiaryTapUp == null &&
onTertiaryTapCancel == null) {
return false;
}
default:
return false;
}
return super.isPointerAllowed(event);
}