onLongPressed method

Widget onLongPressed(
  1. VoidCallback action, {
  2. HitTestBehavior? behavior,
  3. Set<PointerDeviceKind>? supportedDevices,
})

Adds a handler for long press gestures with the primary button to this widget in Arcane UI.

For hold-to-preview in IconButton or Tile, calling action after long press. behavior and supportedDevices for tuning. Enhances with InkWell long-press ripples and HapticFeedback, no rebuilds for smooth previews.

Implementation

Widget onLongPressed(VoidCallback action,
        {HitTestBehavior? behavior,
        Set<PointerDeviceKind>? supportedDevices}) =>
    OnGesture.longPress(
        action: action,
        behavior: behavior,
        supportedDevices: supportedDevices,
        child: this);