I am capturing an image and want to do some calculation on that image, for that I need to get the position of some spots on the image. For that, I am using the draggable element, my idea is to drag an element to spot on the image, get x and y position of the draggable elements to do calculations.
I have used the following code
body: Container(
child: Stack(
children: <Widget>[
Image.file(File(widget.imagePath)),
Draggable(
axis: Axis.vertical,
child: Text('_________', style: TextStyle(color: Colors.blue, fontSize: 90) ),
feedback:Text('____',style: TextStyle(color: Colors.blue, fontSize: 90)) ,
childWhenDragging: Text(''),
),
SizedBox(height: 50.0,),
],
),
)
Problem with this is 1. when an element is getting drag, that element position should move with touch, currently wile drag, element getting shifted by a few pixels. 2. Element position is not getting shifted to final drag position, when i remove touch element go back to original position.
Please help me with this.