philip-brink / DragAndDropLists

Flutter package for drag-and-drop reordering of two-level lists
BSD 3-Clause "New" or "Revised" License
250 stars 129 forks source link

When dragging a colored ListTile item causes drop ghost tile of color to appear in list after drop completes #52

Open GraemePerrins opened 3 years ago

GraemePerrins commented 3 years ago

When using listtiles that are colored that are dragged into a list the list grows on drag (ghost tile?) and then once tisttile item is dropped to the target list the list is rebuilt but the drag_and_drop_list does not refresh correctly . Subsequent mouse click (emulator) causes a frame redraw to correctly update the display.

Before drag: image

Post drag: The tile "[g_m" is dragged up the doing list image

Post mouse click in emulator post drag image

GraemePerrins commented 3 years ago

Managed to fix the behaviour by adding a ValueKey to the DragAndDropLists instance and then on list reorder I update the valuekey to force the lists to be re-rendered on any list reorder.