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.

Example:

Text("Long press me").onLongPressed(() => print("Long pressed"))

Implementation

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