Draggable element with tracking x and y position in flutter

Posted by Jennifer | Updated on

Draggable element with tracking x and y position in flutter. To use a Draggable like this,

1. You’ll need to be able to set the element’s position, something like Positioned and its left,top.

2. Then you’ll need to get the ending coordinates of the drag, using dragDetails from onDragEnd: (dragDetails) { }

Here’s a simple sample to start you off:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers