allowedButtonsFilter property
final
Called when interaction starts. This limits the dragging behavior for custom clicks (such as scroll click). Its parameter comes from PointerEvent.buttons.
Due to how kPrimaryButton, kSecondaryButton, etc., use integers,
bitwise operations can help filter how buttons are pressed.
For example, if someone simultaneously presses the primary and secondary
buttons, the default behavior will return false. The following code
accepts any button press with primary:
(int buttons) => buttons & kPrimaryButton != 0
.
When value is (int buttons) => false
, allow no interactions.
When value is (int buttons) => true
, allow all interactions.
Defaults to all buttons.
Implementation
final AllowedButtonsFilter? allowedButtonsFilter;