1.GestureDetector click gesture
serial number | field | Attributes | describe |
---|---|---|---|
1 | onTapDown | GestureTapDownCallback | Callback function when the finger is pressed |
2 | onTapUp | GestureTapUpCallback | Callback function when the finger is released |
3 | onTap | GestureTapCallback | Callback function when the finger is clicked |
4 | onTapCancel | GestureTapCancelCallback | The callback function when the finger cancels the click |
We Container
added a click gesture to the container, the code is as follows:
import 'package:flutter/material.dart';
class GestureDetectorExample extends StatefulWidget {
@override
_GestureDetectorExampleState createState() => _GestureDetectorExampleState();
}
class _GestureDetectorExampleState extends State<GestureDetectorExample> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("GestureDetector"),
),
body: Center(
child: Stack(
children: [
GestureDetector(
onTap: (){
print("onTap");
},
onTapCancel: () {
print("onTapCancel");
},
onTapDown: (details) {
print("onTapDown---${details.globalPosition}---${details.localPosition}");
},
onTapUp: (details) {
print("onTapUp---${details.globalPosition}---${details.localPosition}");
},
child: Container(
width: 200,
height: 200,
color: Colors.orange,
alignment: Alignment.center,
child: Text("Jimi",
style: TextStyle(
color: Colors.white,
fontSize: 30
),
),
),
)
],
),
),
);
}
}
GestureDetector click gesture console output results
The first one: Click on the Container container
flutter: onTapDown---Offset(211.5, 317.0)---Offset(124.0, 45.5)
flutter: onTapUp---Offset(211.5, 317.0)---Offset(124.0, 45.5)
flutter: onTap
Type 2: Click on the Container and move out of the area without letting go
flutter: onTapDown---Offset(195.5, 305.5)---Offset(108.0, 34.0)
flutter: onTapCancel
2.GestureDetector double-tap gesture
serial number | field | Attributes | describe |
---|---|---|---|
1 | onDoubleTapDown | GestureTapDownCallback | Callback function when the finger is pressed |
2 | onDoubleTap | GestureTapCallback | Callback function when the finger double-clicks |
3 | onDoubleTapCancel | GestureTapCancelCallback | Callback function when the finger cancels |
We Container
added three callbacks for double-tap gestures on the container, the code is as follows:
import 'package:flutter/material.dart';
class GestureDetectorExample extends StatefulWidget {
@override
_GestureDetectorExampleState createState() => _GestureDetectorExampleState();
}
class _GestureDetectorExampleState extends State<GestureDetectorExample> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("GestureDetector"),
),
body: Center(
child: Stack(
children: [
GestureDetector(
onDoubleTap: () {
print("onTapDown");
},
onDoubleTapCancel: () {
print("onDoubleTapCancel");
},
onDoubleTapDown: (details) {
print("onDoubleTapDown---${details.globalPosition}---${details.localPosition}");
},
child: Container(
width: 200,
height: 200,
color: Colors.orange,
alignment: Alignment.center,
child: Text("Jimi",
style: TextStyle(
color: Colors.white,
fontSize: 30
),
),
),
)
],
),
),
);
}
}
GestureDetector double-click gesture console output results
The first one: Double-click the Container container
flutter: onDoubleTapDown---Offset(204.5, 317.0)---Offset(117.0, 45.5)
flutter: onTapDown
The second: double-click the Container container but do not lift your finger and move out of the area
flutter: onDoubleTapDown---Offset(195.5, 283.5)---Offset(108.0, 12.0)
flutter: onDoubleTapCancel
3. GestureDetector long press gesture
serial number | field | Attributes | describe |
---|---|---|---|
1 | onLongPressDown | GestureLongPressDownCallback | Callback function when the finger is pressed down |
2 | onLongPressCancel | GestureLongPressCancelCallback | Callback function when the finger is long pressed to cancel |
3 | onLongPress | GestureLongPressCallback | Callback function when the finger is long pressed |
4 | onLongPressStart | GestureLongPressStartCallback | The callback function when the finger is long pressed and started to drag |
5 | onLongPressMoveUpdate | GestureLongPressMoveUpdateCallback | The callback function when the finger is pressed and moved |
6 | onLongPressUp | GestureLongPressUpCallback | Callback function when the finger is long pressed and released |
7 | onLongPressEnd | GestureLongPressEndCallback | Callback function when finger long press ends dragging |
We Container
added a long press gesture on the container, the code is as follows:
import 'package:flutter/material.dart';
class GestureDetectorExample extends StatefulWidget {
@override
_GestureDetectorExampleState createState() => _GestureDetectorExampleState();
}
class _GestureDetectorExampleState extends State<GestureDetectorExample> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("GestureDetector"),
),
body: Center(
child: Stack(
children: [
GestureDetector(
onLongPress: (){
print("onLongPress");
},
onLongPressCancel: () {
print("onLongPressCancel");
},
onLongPressUp: () {
print("onLongPressUp");
},
onLongPressDown: (details) {
print("onLongPressDown---${details.globalPosition}---${details.localPosition}");
},
onLongPressEnd: (details) {
print("onLongPressEnd---${details.globalPosition}---${details.localPosition}");
},
onLongPressStart: (details) {
print("onLongPressStart---${details.globalPosition}---${details.localPosition}");
},
onLongPressMoveUpdate: (details) {
print("onLongPressMoveUpdate---${details.globalPosition}---${details.localPosition}");
},
child: Container(
width: 200,
height: 200,
color: Colors.orange,
alignment: Alignment.center,
child: Text("Jimi",
style: TextStyle(
color: Colors.white,
fontSize: 30
),
),
),
)
],
),
),
);
}
}
GestureDetector long press gesture console output results
The first type: Click on the Container container
flutter: onLongPressDown---Offset(199.0, 336.0)---Offset(111.5, 64.5)
flutter: onLongPressCancel
The second method: Long press the Container container but release it after the finger does not move
flutter: onLongPressDown---Offset(215.0, 301.0)---Offset(127.5, 29.5)
flutter: onLongPressStart---Offset(215.0, 301.0)---Offset(127.5, 29.5)
flutter: onLongPress
flutter: onLongPressEnd---Offset(215.0, 301.0)---Offset(127.5, 29.5)
flutter: onLongPressUp
The third method: press and hold the Container container and drag it, and finally release your finger
flutter: onLongPressDown---Offset(169.0, 314.0)---Offset(81.5, 42.5)
flutter: onLongPressStart---Offset(169.0, 314.0)---Offset(81.5, 42.5)
flutter: onLongPress
flutter: onLongPressMoveUpdate---Offset(168.5, 314.5)---Offset(81.0, 43.0)
flutter: onLongPressMoveUpdate---Offset(165.0, 318.5)---Offset(77.5, 47.0)
flutter: onLongPressMoveUpdate---Offset(164.0, 319.0)---Offset(76.5, 47.5)
flutter: onLongPressMoveUpdate---Offset(158.5, 323.5)---Offset(71.0, 52.0)
flutter: onLongPressMoveUpdate---Offset(153.0, 329.5)---Offset(65.5, 58.0)
flutter: onLongPressMoveUpdate---Offset(148.5, 335.0)---Offset(61.0, 63.5)
flutter: onLongPressMoveUpdate---Offset(146.5, 339.0)---Offset(59.0, 67.5)
flutter: onLongPressMoveUpdate---Offset(146.5, 339.5)---Offset(59.0, 68.0)
flutter: onLongPressEnd---Offset(146.5, 339.5)---Offset(59.0, 68.0)
flutter: onLongPressUp
The fourth type: Long press the Container container and move out of the area immediately
flutter: onLongPressDown---Offset(97.0, 277.5)---Offset(9.5, 6.0)
flutter: onLongPressCancel
flutter: onLongPressDown---Offset(91.5, 275.5)---Offset(4.0, 4.0)
flutter: onLongPressCancel
4. GestureDetector vertical sliding gesture
serial number | field | Attributes | describe |
---|---|---|---|
1 | onVerticalDragDown | GestureDragDownCallback | Callback function when the finger is pressed |
2 | onVerticalDragStart | GestureDragStartCallback | Callback function when the finger starts to slide vertically |
3 | onVerticalDragUpdate | GestureDragUpdateCallback | Callback function when the finger slides vertically |
4 | onVerticalDragEnd | GestureDragEndCallback | Callback function when the finger slides vertically |
5 | onVerticalDragCancel | GestureDragCancelCallback | Callback function when the finger slides vertically to cancel |
We Container
added a vertical swipe gesture on the container, the code is as follows:
import 'package:flutter/material.dart';
class GestureDetectorExample extends StatefulWidget {
@override
_GestureDetectorExampleState createState() => _GestureDetectorExampleState();
}
class _GestureDetectorExampleState extends State<GestureDetectorExample> {
double _left = 0;
double _top = 0;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("GestureDetector"),
),
body: Center(
child: Stack(
children: [
GestureDetector(
onVerticalDragCancel: () {
print("onVerticalDragCancel");
},
onVerticalDragDown: (details) {
print("onVerticalDragDown---${details.globalPosition}---${details.localPosition}");
},
onVerticalDragEnd: (details) {
print("onVerticalDragEnd---${details.velocity}---${details.primaryVelocity}");
},
onVerticalDragStart: (details) {
print("onVerticalDragStart---${details.globalPosition}---${details.localPosition}");
},
onVerticalDragUpdate: (details) {
print("onVerticalDragUpdate---${details.globalPosition}---${details.localPosition}---${details.delta}");
setState(() {
_top += details.delta.dy;
});
},
child: Stack(
children: [
Positioned(
left: _left,
top: _top,
child: Container(
width: 200,
height: 200,
color: Colors.orange,
alignment: Alignment.center,
child: Text("Jimi",
style: TextStyle(
color: Colors.white,
fontSize: 30
),
),
),
)
],
),
)
],
),
),
);
}
}
GestureDetector vertical swipe gesture console output
The first one: Click on the Container container
flutter: onVerticalDragDown---Offset(76.5, 114.5)---Offset(76.5, 38.5)
flutter: onVerticalDragStart---Offset(76.5, 114.5)---Offset(76.5, 38.5)
flutter: onVerticalDragEnd---Velocity(0.0, 0.0)---0.0
The second method: drag the Container container
flutter: onVerticalDragDown---Offset(185.5, 332.5)---Offset(185.5, 256.5)
flutter: onVerticalDragStart---Offset(185.5, 332.5)---Offset(185.5, 256.5)
flutter: onVerticalDragUpdate---Offset(185.5, 332.0)---Offset(185.5, 256.0)
flutter: onVerticalDragUpdate---Offset(187.5, 322.0)---Offset(187.5, 246.0)
flutter: onVerticalDragUpdate---Offset(192.0, 307.0)---Offset(192.0, 231.0)
flutter: onVerticalDragUpdate---Offset(193.5, 298.0)---Offset(193.5, 222.0)
flutter: onVerticalDragUpdate---Offset(193.5, 297.0)---Offset(193.5, 221.0)
flutter: onVerticalDragEnd---Velocity(131.3, -548.9)----548.8773895303548
The third method: drag the Container container and release it immediately
flutter: onVerticalDragDown---Offset(10.5, 93.5)---Offset(10.5, 17.5)
flutter: onVerticalDragCancel
5.GestureDetector horizontal sliding gesture
serial number | field | Attributes | describe |
---|---|---|---|
1 | onHorizontalDragDown | GestureDragDownCallback | Callback function when the finger is pressed |
2 | onHorizontalDragStart | GestureDragStartCallback | Callback function when the finger starts to slide horizontally |
3 | onHorizontalDragUpdate | GestureDragUpdateCallback | Callback function when the finger slides horizontally |
4 | onHorizontalDragEnd | GestureDragEndCallback | Callback function when the finger slides horizontally |
5 | onHorizontalDragCancel | GestureDragCancelCallback | Callback function when the finger slides horizontally to cancel |
We Container
added a horizontal swipe gesture on the container, the code is as follows:
import 'package:flutter/material.dart';
class GestureDetectorExample extends StatefulWidget {
@override
_GestureDetectorExampleState createState() => _GestureDetectorExampleState();
}
class _GestureDetectorExampleState extends State<GestureDetectorExample> {
double _left = 0;
double _top = 0;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("GestureDetector"),
),
body: Center(
child: Stack(
children: [
/// 水平滑动
GestureDetector(
onHorizontalDragCancel: () {
print("onHorizontalDragCancel");
},
onHorizontalDragDown: (details) {
print("onHorizontalDragDown---${details.globalPosition}---${details.localPosition}");
},
onHorizontalDragEnd: (details) {
print("onHorizontalDragEnd---${details.velocity}---${details.primaryVelocity}");
},
onHorizontalDragStart: (details) {
print("onHorizontalDragStart---${details.globalPosition}---${details.localPosition}");
},
onHorizontalDragUpdate: (details) {
print("onHorizontalDragUpdate---${details.globalPosition}---${details.localPosition}---${details.delta}");
setState(() {
_left += details.delta.dx;
});
},
child: Stack(
children: [
Positioned(
left: _left,
top: _top,
child: Container(
width: 200,
height: 200,
color: Colors.orange,
alignment: Alignment.center,
child: Text("Jimi",
style: TextStyle(
color: Colors.white,
fontSize: 30
),
),
),
)
],
),
)
],
),
),
);
}
}
GestureDetector sliding console output horizontally
The first one: Click on the Container container
flutter: onHorizontalDragDown---Offset(151.5, 118.0)---Offset(151.5, 42.0)
flutter: onHorizontalDragStart---Offset(151.5, 118.0)---Offset(151.5, 42.0)
flutter: onHorizontalDragEnd---Velocity(0.0, 0.0)---0.0
The second method: drag the Container container
flutter: onHorizontalDragDown---Offset(97.5, 135.5)---Offset(97.5, 59.5)
flutter: onHorizontalDragStart---Offset(97.5, 135.5)---Offset(97.5, 59.5)
flutter: onHorizontalDragUpdate---Offset(100.0, 136.0)---Offset(100.0, 60.0)---Offset(2.5, 0.0)
flutter: onHorizontalDragUpdate---Offset(100.5, 136.0)---Offset(100.5, 60.0)---Offset(0.5, 0.0)
flutter: onHorizontalDragUpdate---Offset(102.0, 136.0)---Offset(102.0, 60.0)---Offset(1.5, 0.0)
flutter: onHorizontalDragUpdate---Offset(105.0, 136.5)---Offset(105.0, 60.5)---Offset(3.0, 0.0)
flutter: onHorizontalDragUpdate---Offset(107.0, 137.0)---Offset(107.0, 61.0)---Offset(2.0, 0.0)
flutter: onHorizontalDragUpdate---Offset(108.5, 137.0)---Offset(108.5, 61.0)---Offset(1.5, 0.0)
flutter: onHorizontalDragUpdate---Offset(109.0, 137.0)---Offset(109.0, 61.0)---Offset(0.5, 0.0)
flutter: onHorizontalDragUpdate---Offset(110.0, 137.0)---Offset(110.0, 61.0)---Offset(1.0, 0.0)
flutter: onHorizontalDragUpdate---Offset(111.0, 137.0)---Offset(111.0, 61.0)---Offset(1.0, 0.0)
flutter: onHorizontalDragEnd---Velocity(0.0, 0.0)---0.0
The third method: drag the Container container and release it immediately
flutter: onHorizontalDragDown---Offset(6.0, 109.0)---Offset(6.0, 33.0)
flutter: onHorizontalDragCancel
6.GestureDetector drag gesture
serial number | field | Attributes | describe |
---|---|---|---|
1 | onPanDown | GestureDragDownCallback | Callback function when the finger is pressed |
2 | onPanStart | GestureDragStartCallback | Callback function when the finger starts dragging |
3 | onPanUpdate | GestureDragUpdateCallback | Callback function when finger moves |
4 | onPanEnd | GestureDragEndCallback | Callback function when the finger is lifted |
5 | onPanCancel | GestureDragCancelCallback | Callback function when the finger cancels dragging |
We Container
added a drag gesture to the container, the code is as follows:
import 'package:flutter/material.dart';
class GestureDetectorExample extends StatefulWidget {
@override
_GestureDetectorExampleState createState() => _GestureDetectorExampleState();
}
class _GestureDetectorExampleState extends State<GestureDetectorExample> {
double _left = 0;
double _top = 0;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("GestureDetector"),
),
body: Center(
child: Stack(
children: [
// 拖动手势
GestureDetector(
onPanCancel: () {
print("onPanCancel");
},
onPanDown: (details) {
print("onPanDown---${details.globalPosition}---${details.localPosition}");
},
onPanEnd: (details) {
print("onPanEnd---${details.velocity}---${details.primaryVelocity}");
},
onPanStart: (details) {
print("onPanStart---${details.globalPosition}---${details.localPosition}");
},
onPanUpdate: (details) {
print("onPanUpdate---${details.globalPosition}---${details.localPosition}---${details.delta}");
setState(() {
_left += details.delta.dx;
_top += details.delta.dy;
});
},
child: Stack(
children: [
Positioned(
left: _left,
top: _top,
child: Container(
width: 200,
height: 200,
color: Colors.orange,
alignment: Alignment.center,
child: Text("Jimi",
style: TextStyle(
color: Colors.white,
fontSize: 30
),
),
),
)
],
),
)
],
),
),
);
}
}
GestureDetector drag gesture console output
The first one: Click on the Container container
flutter: onPanDown---Offset(161.0, 233.0)---Offset(161.0, 157.0)
flutter: onPanStart---Offset(161.0, 233.0)---Offset(161.0, 157.0)
flutter: onPanEnd---Velocity(0.0, 0.0)---0.0
The second method: drag the Container container
flutter: onPanDown---Offset(123.5, 193.5)---Offset(123.5, 117.5)
flutter: onPanStart---Offset(123.5, 193.5)---Offset(123.5, 117.5)
flutter: onPanUpdate---Offset(123.5, 193.0)---Offset(123.5, 117.0)---Offset(0.0, -0.5)
flutter: onPanUpdate---Offset(124.0, 193.0)---Offset(124.0, 117.0)---Offset(0.5, 0.0)
flutter: onPanUpdate---Offset(124.5, 192.0)---Offset(124.5, 116.0)---Offset(0.5, -1.0)
flutter: onPanUpdate---Offset(125.5, 190.5)---Offset(125.5, 114.5)---Offset(1.0, -1.5)
flutter: onPanUpdate---Offset(126.0, 190.0)---Offset(126.0, 114.0)---Offset(0.5, -0.5)
flutter: onPanUpdate---Offset(126.5, 189.5)---Offset(126.5, 113.5)---Offset(0.5, -0.5)
flutter: onPanUpdate---Offset(127.0, 189.0)---Offset(127.0, 113.0)---Offset(0.5, -0.5)
flutter: onPanEnd---Velocity(0.0, 0.0)---0.0
The third method: drag the Container container and release it immediately
flutter: onPanDown---Offset(5.5, 162.5)---Offset(5.5, 86.5)
flutter: onPanCancel
7. GestureDetector zoom gesture
serial number | field | Attributes | describe |
---|---|---|---|
1 | onScaleStart | GestureScaleStartCallback | Callback function when zooming starts |
2 | onScaleUpdate | GestureScaleUpdateCallback | Callback function when zooming and moving |
3 | onScaleEnd | GestureScaleEndCallback | Callback function when zooming ends |
We Container
added a zoom gesture to the container, the code is as follows:
import 'package:flutter/material.dart';
class GestureDetectorExample extends StatefulWidget {
@override
_GestureDetectorExampleState createState() => _GestureDetectorExampleState();
}
class _GestureDetectorExampleState extends State<GestureDetectorExample> {
double _left = 0;
double _top = 0;
double _widthAndHeight = 200;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("GestureDetector"),
),
body: Center(
child: Stack(
children: [
/// 缩放手势
GestureDetector(
onScaleEnd: (details) {
print("onScaleEnd---${details.velocity}---${details.pointerCount}");
},
onScaleStart: (details) {
print("onScaleStart---${details.focalPoint}---${details.pointerCount}");
},
onScaleUpdate: (details) {
print("onScaleUpdate---${details.scale}---${details.scale.clamp(0.1, 1.2)}");
setState(() {
_widthAndHeight = 200 * details.scale.clamp(0.3, 1.8);
});
},
child: Container(
width: _widthAndHeight,
height: _widthAndHeight,
color: Colors.orange,
alignment: Alignment.center,
child: Text("Jimi",
style: TextStyle(
color: Colors.white,
fontSize: 30
),
),
),
)
],
),
),
);
}
}
The first one: Click on the Container container
flutter: onScaleStart---Offset(149.5, 348.0)---1
flutter: onScaleEnd---Velocity(0.0, 0.0)---0
Type 2: Drag the Container with one finger
flutter: onScaleStart---Offset(178.0, 304.5)---1
flutter: onScaleUpdate---1.0---1.0
flutter: onScaleUpdate---1.0---1.0
flutter: onScaleUpdate---1.0---1.0
flutter: onScaleUpdate---1.0---1.0
flutter: onScaleEnd---Velocity(0.0, 0.0)---0
The third type: two-finger zoom Container container
flutter: onScaleStart---Offset(187.5, 333.5)---2
flutter: onScaleUpdate---1.0055027720002572---1.0055027720002572
flutter: onScaleUpdate---1.0110087715145855---1.0110087715145855
flutter: onScaleUpdate---1.0293231946761667---1.0293231946761667
flutter: onScaleUpdate---1.04763763435052---1.04763763435052
flutter: onScaleUpdate---1.0531463022961167---1.0531463022961167
flutter: onScaleEnd---Velocity(0.0, 0.0)---1
8. With 3D Touch function pressure device to trigger gestures
serial number | field | Attributes | describe |
---|---|---|---|
1 | onForcePressStart | GestureForcePressStartCallback | The callback function when the finger is forced to press |
2 | onForcePressPeak | GestureForcePressPeakCallback | 手指按压力度最大时的回调函数 |
3 | onForcePressUpdate | GestureForcePressUpdateCallback | 手指按下后移动时的回调函数 |
4 | onForcePressEnd | GestureForcePressEndCallback | 手指离开时的回调函数 |
9.辅助按钮触发手势
序列号 | 字段 | 属性 | 描述 |
---|---|---|---|
1 | onSecondaryTap | GestureTapCallback | 辅助按钮单击时的回调函数 |
2 | onSecondaryTapDown | GestureTapDownCallback | 辅助按钮按下时的回调函数 |
3 | onSecondaryTapUp | GestureTapUpCallback | 辅助按钮松开时的回调函数 |
4 | onSecondaryTapCancel | GestureTapCancelCallback | 辅助按钮取消点击时的回调函数 |
5 | onSecondaryLongPressDown | GestureLongPressDownCallback | 辅助按钮按下去时的回调函数 |
6 | onSecondaryLongPressCancel | GestureLongPressCancelCallback | 辅助按钮长按取消时的回调函数 |
7 | onSecondaryLongPress | GestureLongPressCallback | 辅助按钮长按时的回调函数 |
8 | onSecondaryLongPressStart | GestureLongPressStartCallback | 辅助按钮长按并开始拖动时的回调函数 |
9 | onSecondaryLongPressMoveUpdate | GestureLongPressMoveUpdateCallback | 辅助按钮长按并移动时的回调函数 |
10 | onSecondaryLongPressUp | GestureLongPressUpCallback | 辅助按钮长按并松开时的回调函数 |
11 | onSecondaryLongPressEnd | GestureLongPressEndCallback | 辅助按钮长按结束拖动时的回调函数 |
10.三指触发手势
序列号 | 字段 | 属性 | 描述 |
---|---|---|---|
1 | onTertiaryTapDown | GestureTapDownCallback | 三指按下时的回调函数 |
2 | onTertiaryTapUp | GestureTapUpCallback | 三指点击时的回调函数 |
3 | onTertiaryTapCancel | GestureTapCancelCallback | 三指取消时的回调函数 |
4 | onTertiaryLongPressDown | GestureLongPressDownCallback | 三指按下去时的回调函数 |
5 | onTertiaryLongPressCancel | GestureLongPressCancelCallback | 三指长按取消时的回调函数 |
6 | onTertiaryLongPress | GestureLongPressCallback | 三指长按时的回调函数 |
7 | onTertiaryLongPressStart | GestureLongPressStartCallback | 三指长按并开始拖动时的回调函数 |
8 | onTertiaryLongPressMoveUpdate | GestureLongPressMoveUpdateCallback | 三指长按并移动时的回调函数 |
9 | onTertiaryLongPressUp | GestureLongPressUpCallback | 三指长按并松开时的回调函数 |
10 | onTertiaryLongPressEnd | GestureLongPressEndCallback | 三指长按结束拖动时的回调函数 |
11.其他属性
序列号 | 字段 | 属性 | 描述 |
---|---|---|---|
1 | child | Widget | 子组件 |
2 | behavior | HitTestBehavior | 在命中测试期间如何表现 |
3 | excludeFromSemantics | bool | 是否从语义树中排除这些手势,默认false |
4 | dragStartBehavior | DragStartBehavior | 拖拽行为的处理方式 |