You don't need the keyed subtree, you can just add a UniqueKey
to the Column you return in your builder
. A key will identify each element in your listview so when you're rearranging them, they're correctly identified, so you have to add the key at the topmost widget in the subtree, in this case for each view card, the topmost element would be the Column
, so just give it a UniqueKey()
, that should sort it.
If you wanna understand it more, you can check this video