JULIUS
JULIUS

Reputation: 121

GestureDetector in Flutter: how to detect long press into vertical drag?

I have a question about the GestureDetector widget in Flutter. I have the following situation: I have two buttons. I want to do something when the first button is long pressed. Then I want to do something when the user drags vertically over the second button still in press from the first button.

How can I do this with the GestureDetector widget in Flutter?

Upvotes: 1

Views: 1819

Answers (1)

Christos Christou
Christos Christou

Reputation: 192

There is a draggable class on flutter that will serve better your purpose check this https://api.flutter.dev/flutter/widgets/Draggable-class.html

Upvotes: 2

Related Questions