-
Notifications
You must be signed in to change notification settings - Fork 498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ReorderableListView
Control
#4865
Conversation
To test this new feature/control, do one of the following:
You can use the code from my comment above as starting point. |
FREAKING AWESOME |
@ndonkoHenri I think there is need "Spacing". Just like in row or column. Is it possible to add? |
I think the best option is to give the user the ability to use their own widget that will allow them to move elements. As a result, the design developer will be able to make a widget that will move when dragging. Like when you hover over the mouse, an icon appears smoothly, or the entire element begins to change color. That is, the widget is created inside the flet, and is transferred to the dart itself to control the movement of the element. Such customization ppl would love. |
Yeah, will be nice. But it seems like it isnt yet officially possible in Flutter. The workarounds from the Flutter community doesnt help either. (1, 2, 3)
In 0.28 it will be possible to define a custom drag handle, which I guess will solve this concern. |
Issue: The order is reset after the window is refreshed. 2025-03-08.05-10-41.mp4 |
I didnt test it. Must to work. We are saving orders after reorder and taking orders from list before rebuilding interface.
|
Test Code
Screenshot
Note
Custom handles could be implemented with the use of
ReorderableDragStartListener
. We could discuss on the best approach for it's addition.Summary by Sourcery
New Features:
ReorderableListView
to enable reordering of list items.