Smueez / floating_animated_widget

a flutter package for floating widget
Other
17 stars 9 forks source link

OnDragEvent with the current position of the the button #12

Closed InspectlyMads closed 5 days ago

InspectlyMads commented 1 week ago

Summary: It would be highly beneficial to have an OnDragEvent that provides access to the current position of the button as it is being dragged. This would allow for more control and flexibility when implementing drag-and-drop functionality.

Feature Details:

Benefits:

  1. Increased Control: Developers would be able to track the button's position dynamically and handle complex drag-and-drop layouts.
  2. Improved UI Feedback: UI elements can react more fluidly to the drag action, providing better visual feedback for the user.
  3. Custom Interactions: This allows for interactions such as snapping the button to certain areas or boundaries, highlighting target areas dynamically, or interacting with other draggable elements in real-time.

Example onDragUpdate: (DragUpdateDetails details) { return details.localPosition; }

saalmi098 commented 5 days ago

+1 I’m also facing the same issue and would really appreciate having the feature to retrieve the position during or after dragging.

Smueez commented 5 days ago

Hello, The new feature has been added in the new version. Please take a look. Thank you for this amazing feedback. Happy coding