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.
The type
parameter specifies which gesture to detect.
The child
parameter is the widget that will receive the gesture.
The action
parameter is the function to call when the gesture is detected.
The behavior
parameter can be used to specify how the widget behaves
during hit testing. The supportedDevices
parameter can limit which
input devices can trigger the gesture.
Implementation
const OnGesture(
{super.key,
required this.type,
required this.child,
this.behavior,
this.supportedDevices,
required this.action});