I want to have two containers in a Row that each have their own lists of Card widgets.
- The first (left) container is a library of Cards which is a Wrap to make the cards flow horizontally. The Cards in this Wrap should be draggable/droppable to rearrange the order of the cards, and I was looking at this library to solve that.
- The second (right) container should be a Column containing another list of Card widgets. This container should also be draggable/droppable within itself, to rearrange the order of the cards.
- In addition to this, I want to be able to drag a Card from the library (left container) to the right container, adding the Card to the right containers list in the correct dropped position.
- The card should not be moved/removed from the left container, it should still stay there in the same place, but it should create a duplicate in the right container.
- There should be some kind of indicator as to where the Card will be added when dragging from left to right container (between other cards).
I think that combining the linked library with Flutter DragTarget could possibly be one working solution, but I’m not sure.
2
Answers
Based on Kumah Andrews' answer I fixed the reorder in the right column. Stillstuggling with combining reordering in the left. Using the library caused it to only accept one drag-action at a time.
Here's the updated code: