Move a draggable to a dragtarget automatically for the user in Flutter
No, that is not possible. As the name says Draggables
meaning it has to be dragged. Look what the official documentation says about Draggables and DragTarget
Draggable
A widget that can be dragged from to a DragTarget.
DragTarget
A widget that receives data when a Draggable widget is dropped.
I hope this helps.
Finaff17
Updated on December 20, 2022Comments
-
Finaff17 over 1 year
Here is my use case, I'm using draggable containers and a dragtarget (container with the question mark) for this little game (see linked image).
I've built that logic so far, so if the user drags the "i" in the image linked below, it will be accepted and go to the next word.
My question is: is there a way in flutter to allow the user to just tap on the draggable containers and make them move automatically to the dragtarget (using the logic already defined in the onAccept property of the dragtarget widget) ?