GestureDetectorModifier constructor

const GestureDetectorModifier({
  1. Key? key,
  2. Widget? child,
  3. Key? modifierKey,
  4. GestureTapDownCallback? onTapDown,
  5. GestureTapUpCallback? onTapUp,
  6. GestureTapCallback? onTap,
  7. GestureTapCancelCallback? onTapCancel,
  8. GestureTapCallback? onSecondaryTap,
  9. GestureTapDownCallback? onSecondaryTapDown,
  10. GestureTapUpCallback? onSecondaryTapUp,
  11. GestureTapCancelCallback? onSecondaryTapCancel,
  12. GestureTapDownCallback? onTertiaryTapDown,
  13. GestureTapUpCallback? onTertiaryTapUp,
  14. GestureTapCancelCallback? onTertiaryTapCancel,
  15. GestureTapDownCallback? onDoubleTapDown,
  16. GestureTapCallback? onDoubleTap,
  17. GestureTapCancelCallback? onDoubleTapCancel,
  18. GestureLongPressDownCallback? onLongPressDown,
  19. GestureLongPressCancelCallback? onLongPressCancel,
  20. GestureLongPressCallback? onLongPress,
  21. GestureLongPressStartCallback? onLongPressStart,
  22. GestureLongPressMoveUpdateCallback? onLongPressMoveUpdate,
  23. GestureLongPressUpCallback? onLongPressUp,
  24. GestureLongPressEndCallback? onLongPressEnd,
  25. GestureLongPressDownCallback? onSecondaryLongPressDown,
  26. GestureLongPressCancelCallback? onSecondaryLongPressCancel,
  27. GestureLongPressCallback? onSecondaryLongPress,
  28. GestureLongPressStartCallback? onSecondaryLongPressStart,
  29. GestureLongPressMoveUpdateCallback? onSecondaryLongPressMoveUpdate,
  30. GestureLongPressUpCallback? onSecondaryLongPressUp,
  31. GestureLongPressEndCallback? onSecondaryLongPressEnd,
  32. GestureLongPressDownCallback? onTertiaryLongPressDown,
  33. GestureLongPressCancelCallback? onTertiaryLongPressCancel,
  34. GestureLongPressCallback? onTertiaryLongPress,
  35. GestureLongPressStartCallback? onTertiaryLongPressStart,
  36. GestureLongPressMoveUpdateCallback? onTertiaryLongPressMoveUpdate,
  37. GestureLongPressUpCallback? onTertiaryLongPressUp,
  38. GestureLongPressEndCallback? onTertiaryLongPressEnd,
  39. GestureDragDownCallback? onVerticalDragDown,
  40. GestureDragStartCallback? onVerticalDragStart,
  41. GestureDragUpdateCallback? onVerticalDragUpdate,
  42. GestureDragEndCallback? onVerticalDragEnd,
  43. GestureDragCancelCallback? onVerticalDragCancel,
  44. GestureDragDownCallback? onHorizontalDragDown,
  45. GestureDragStartCallback? onHorizontalDragStart,
  46. GestureDragUpdateCallback? onHorizontalDragUpdate,
  47. GestureDragEndCallback? onHorizontalDragEnd,
  48. GestureDragCancelCallback? onHorizontalDragCancel,
  49. GestureForcePressStartCallback? onForcePressStart,
  50. GestureForcePressPeakCallback? onForcePressPeak,
  51. GestureForcePressUpdateCallback? onForcePressUpdate,
  52. GestureForcePressEndCallback? onForcePressEnd,
  53. GestureDragDownCallback? onPanDown,
  54. GestureDragStartCallback? onPanStart,
  55. GestureDragUpdateCallback? onPanUpdate,
  56. GestureDragEndCallback? onPanEnd,
  57. GestureDragCancelCallback? onPanCancel,
  58. GestureScaleStartCallback? onScaleStart,
  59. GestureScaleUpdateCallback? onScaleUpdate,
  60. GestureScaleEndCallback? onScaleEnd,
  61. HitTestBehavior? behavior,
  62. bool excludeFromSemantics = false,
  63. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
})

Creates a widget that detects gestures.

Pan and scale callbacks cannot be used simultaneously because scale is a superset of pan. Simply use the scale callbacks instead.

Horizontal and vertical drag callbacks cannot be used simultaneously because a combination of a horizontal and vertical drag is a pan. Simply use the pan callbacks instead.

By default, gesture detectors contribute semantic information to the tree that is used by assistive technology.

Implementation

const GestureDetectorModifier({
  super.key,
  super.child,
  super.modifierKey,
  this.onTapDown,
  this.onTapUp,
  this.onTap,
  this.onTapCancel,
  this.onSecondaryTap,
  this.onSecondaryTapDown,
  this.onSecondaryTapUp,
  this.onSecondaryTapCancel,
  this.onTertiaryTapDown,
  this.onTertiaryTapUp,
  this.onTertiaryTapCancel,
  this.onDoubleTapDown,
  this.onDoubleTap,
  this.onDoubleTapCancel,
  this.onLongPressDown,
  this.onLongPressCancel,
  this.onLongPress,
  this.onLongPressStart,
  this.onLongPressMoveUpdate,
  this.onLongPressUp,
  this.onLongPressEnd,
  this.onSecondaryLongPressDown,
  this.onSecondaryLongPressCancel,
  this.onSecondaryLongPress,
  this.onSecondaryLongPressStart,
  this.onSecondaryLongPressMoveUpdate,
  this.onSecondaryLongPressUp,
  this.onSecondaryLongPressEnd,
  this.onTertiaryLongPressDown,
  this.onTertiaryLongPressCancel,
  this.onTertiaryLongPress,
  this.onTertiaryLongPressStart,
  this.onTertiaryLongPressMoveUpdate,
  this.onTertiaryLongPressUp,
  this.onTertiaryLongPressEnd,
  this.onVerticalDragDown,
  this.onVerticalDragStart,
  this.onVerticalDragUpdate,
  this.onVerticalDragEnd,
  this.onVerticalDragCancel,
  this.onHorizontalDragDown,
  this.onHorizontalDragStart,
  this.onHorizontalDragUpdate,
  this.onHorizontalDragEnd,
  this.onHorizontalDragCancel,
  this.onForcePressStart,
  this.onForcePressPeak,
  this.onForcePressUpdate,
  this.onForcePressEnd,
  this.onPanDown,
  this.onPanStart,
  this.onPanUpdate,
  this.onPanEnd,
  this.onPanCancel,
  this.onScaleStart,
  this.onScaleUpdate,
  this.onScaleEnd,
  this.behavior,
  this.excludeFromSemantics = false,
  this.dragStartBehavior = DragStartBehavior.start,
});