Well, looking inside the drag_taget.dart file we can find that _lastOffset is the return value in details.offset.
_lastOffset = globalPosition - dragStartPoint;
And here is the problem. When we are dragging a panel over a dragTarget and we watch details.offset
in onMove: (details){
is the _lastOffset
value that we are receiving.
So imagine if we have one draggable in the left of the screen and a dragTarget in the right. When we click over and hold and drag this container until it hover the dreagTarget to fire the onMove event, we are receiving all this space between where we clicked less where we hover the target.
If we just do it: _lastOffset = globalPosition;
everything works fine but change the original code doesn't seen a good idea.
In data of the draggable we can set the dragStartPoint in details.data.startDragPoint
and then subtract it from the details.offset
for instance.
-->Pskink, you are a master here, so your opinion is important, what do you think?
Thank you!