I know for swipe down detection there is onVerticalDragDown
but for swipe up detection there is no onVerticalDragUp
parameter in GestureDetector
widget.
Asked
Active
Viewed 2,306 times
-1

Yudhishthir Singh
- 2,941
- 2
- 23
- 42

Aadarsh Patel
- 167
- 4
- 14
-
1check this out: https://stackoverflow.com/a/55850504/7652758 – ibhavikmakwana May 19 '20 at 07:33
1 Answers
3
You are looking for onPanUpdate method in GestureDetector class.
GestureDetector(onPanUpdate: (details) {
if (details.delta.dx > 0)
print("Dragging in +X direction");
else
print("Dragging in -X direction");
if (details.delta.dy > 0)
print("Dragging in +Y direction");
else
print("Dragging in -Y direction");
});
Note: Do not use this method with the ones that you are already using (onVerticalDragDown) or onVerticalDragUpdate().

Yudhishthir Singh
- 2,941
- 2
- 23
- 42