OnGesture constructor

const OnGesture({
  1. Key? key,
  2. required GestureType type,
  3. required Widget child,
  4. HitTestBehavior? behavior,
  5. Set<PointerDeviceKind>? supportedDevices,
  6. 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});