gestures method
Widget
gestures({
- Key? key,
- GestureOnTapChangeCallback? onTapChange,
- GestureTapDownCallback? onTapDown,
- GestureTapUpCallback? onTapUp,
- GestureTapCallback? onTap,
- GestureTapCancelCallback? onTapCancel,
- GestureTapDownCallback? onSecondaryTapDown,
- GestureTapUpCallback? onSecondaryTapUp,
- GestureTapCancelCallback? onSecondaryTapCancel,
- GestureTapCallback? onDoubleTap,
- GestureLongPressCallback? onLongPress,
- GestureLongPressStartCallback? onLongPressStart,
- GestureLongPressMoveUpdateCallback? onLongPressMoveUpdate,
- GestureLongPressUpCallback? onLongPressUp,
- GestureLongPressEndCallback? onLongPressEnd,
- GestureDragDownCallback? onVerticalDragDown,
- GestureDragStartCallback? onVerticalDragStart,
- GestureDragUpdateCallback? onVerticalDragUpdate,
- GestureDragEndCallback? onVerticalDragEnd,
- GestureDragCancelCallback? onVerticalDragCancel,
- GestureDragDownCallback? onHorizontalDragDown,
- GestureDragStartCallback? onHorizontalDragStart,
- GestureDragUpdateCallback? onHorizontalDragUpdate,
- GestureDragEndCallback? onHorizontalDragEnd,
- GestureDragCancelCallback? onHorizontalDragCancel,
- GestureDragDownCallback? onPanDown,
- GestureDragStartCallback? onPanStart,
- GestureDragUpdateCallback? onPanUpdate,
- GestureDragEndCallback? onPanEnd,
- GestureDragCancelCallback? onPanCancel,
- GestureScaleStartCallback? onScaleStart,
- GestureScaleUpdateCallback? onScaleUpdate,
- GestureScaleEndCallback? onScaleEnd,
- GestureForcePressStartCallback? onForcePressStart,
- GestureForcePressPeakCallback? onForcePressPeak,
- GestureForcePressUpdateCallback? onForcePressUpdate,
- GestureForcePressEndCallback? onForcePressEnd,
- HitTestBehavior? behavior,
- bool excludeFromSemantics = false,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
Implementation
Widget gestures({
Key? key,
GestureOnTapChangeCallback? onTapChange,
GestureTapDownCallback? onTapDown,
GestureTapUpCallback? onTapUp,
GestureTapCallback? onTap,
GestureTapCancelCallback? onTapCancel,
GestureTapDownCallback? onSecondaryTapDown,
GestureTapUpCallback? onSecondaryTapUp,
GestureTapCancelCallback? onSecondaryTapCancel,
GestureTapCallback? onDoubleTap,
GestureLongPressCallback? onLongPress,
GestureLongPressStartCallback? onLongPressStart,
GestureLongPressMoveUpdateCallback? onLongPressMoveUpdate,
GestureLongPressUpCallback? onLongPressUp,
GestureLongPressEndCallback? onLongPressEnd,
GestureDragDownCallback? onVerticalDragDown,
GestureDragStartCallback? onVerticalDragStart,
GestureDragUpdateCallback? onVerticalDragUpdate,
GestureDragEndCallback? onVerticalDragEnd,
GestureDragCancelCallback? onVerticalDragCancel,
GestureDragDownCallback? onHorizontalDragDown,
GestureDragStartCallback? onHorizontalDragStart,
GestureDragUpdateCallback? onHorizontalDragUpdate,
GestureDragEndCallback? onHorizontalDragEnd,
GestureDragCancelCallback? onHorizontalDragCancel,
GestureDragDownCallback? onPanDown,
GestureDragStartCallback? onPanStart,
GestureDragUpdateCallback? onPanUpdate,
GestureDragEndCallback? onPanEnd,
GestureDragCancelCallback? onPanCancel,
GestureScaleStartCallback? onScaleStart,
GestureScaleUpdateCallback? onScaleUpdate,
GestureScaleEndCallback? onScaleEnd,
GestureForcePressStartCallback? onForcePressStart,
GestureForcePressPeakCallback? onForcePressPeak,
GestureForcePressUpdateCallback? onForcePressUpdate,
GestureForcePressEndCallback? onForcePressEnd,
HitTestBehavior? behavior,
bool excludeFromSemantics = false,
DragStartBehavior dragStartBehavior = DragStartBehavior.start,
}) =>
GestureDetector(
key: key,
onTapDown: (TapDownDetails tapDownDetails) {
if (onTapDown != null) onTapDown(tapDownDetails);
if (onTapChange != null) onTapChange(true);
},
onTapCancel: () {
if (onTapCancel != null) onTapCancel();
if (onTapChange != null) onTapChange(false);
},
onTap: () {
if (onTap != null) onTap();
if (onTapChange != null) onTapChange(false);
},
onTapUp: onTapUp,
onDoubleTap: onDoubleTap,
onLongPress: onLongPress,
onLongPressStart: onLongPressStart,
onLongPressEnd: onLongPressEnd,
onLongPressMoveUpdate: onLongPressMoveUpdate,
onLongPressUp: onLongPressUp,
onVerticalDragStart: onVerticalDragStart,
onVerticalDragEnd: onVerticalDragEnd,
onVerticalDragDown: onVerticalDragDown,
onVerticalDragCancel: onVerticalDragCancel,
onVerticalDragUpdate: onVerticalDragUpdate,
onHorizontalDragStart: onHorizontalDragStart,
onHorizontalDragEnd: onHorizontalDragEnd,
onHorizontalDragCancel: onHorizontalDragCancel,
onHorizontalDragUpdate: onHorizontalDragUpdate,
onHorizontalDragDown: onHorizontalDragDown,
onForcePressStart: onForcePressStart,
onForcePressEnd: onForcePressEnd,
onForcePressPeak: onForcePressPeak,
onForcePressUpdate: onForcePressUpdate,
onPanStart: onPanStart,
onPanEnd: onPanEnd,
onPanCancel: onPanCancel,
onPanDown: onPanDown,
onPanUpdate: onPanUpdate,
onScaleStart: onScaleStart,
onScaleEnd: onScaleEnd,
onScaleUpdate: onScaleUpdate,
behavior: behavior,
excludeFromSemantics: excludeFromSemantics,
dragStartBehavior: dragStartBehavior,
child: this,
);