OnGesture constructor
const
OnGesture({
- Key? key,
- required GestureType type,
- required Widget child,
- HitTestBehavior? behavior,
- Set<
PointerDeviceKind> ? supportedDevices, - required VoidCallback action,
Creates an OnGesture widget for the specified gesture type in Arcane UI.
The type determines the detected gesture from GestureType, such as press for standard taps or
longPress for sustained interactions. The child is the Widget receiving gestures, often an
IconButton or Tile in Arcane layouts. The action executes on gesture detection, enabling
navigation, deletions, or state updates. Optional behavior controls hit testing (e.g., deferToChild
for nested gestures), and supportedDevices filters input (e.g., touch only). This supports
ArcaneTheme for feedback and Semantics for excluding from accessibility if gestures are decorative,
ensuring performant, theme-consistent interactivity without rebuilds.
Implementation
const OnGesture(
{super.key,
required this.type,
required this.child,
this.behavior,
this.supportedDevices,
required this.action});