Site icon Flutter Packages | Pub dev Packages – Flutter Mobile App World

Drag & Drop InteractiveViewer Widget for Flutter

Know where you drag & drop!

This project demonstrates the use of the new, in Flutter 1.20, onAcceptWithDetails callback on DragTarget. It enables you to determine the coordinates of the drop.

Before Flutter 1.20, these coordinates were only available from the Draggable.onDragEnd(details) callback. Getting the drop coordinates (say, for use in painting in/around your DragTarget) was:

The example shows usage to paint the last drop position on the DragTarget.

Download drag & drop flutter app widget source code on GitHub

https://github.com/monkeyswarm/DragTargetDetailsExample

Exit mobile version