Reputation: 63
I have an application where there is multiple cards in a grid that each have their own gesture detector. I want to be able to long press on one of the cards and then drag over the other cards and activate each cards gesture detector separately. I am not sure if this is possible.
Upvotes: 0
Views: 1158
Reputation: 31
It might be too late, but use onLongPressMoveUpdate(updates)
and check localOffsetFromOrigin.dx
or localOffsetFromOrigin.dy
for positive and negative values for left,right,up,down drag respectively.
Upvotes: 3
Reputation: 5628
GestureDetector
has an event onPanStart
which might be what you are looking for. Listen to this event on the other Cards
after the LongPress
event is activated.
onPanStart
A pointer has contacted the screen and has begun to move.
or else there is another widget to look into, the swipedetector
, here
Upvotes: 0