Closed mregnauld closed 2 years ago
OK, so here is how I managed to achieve that: use the reorderModel
attribute of AutomaticAnimatedListView
:
AutomaticAnimatedListView<ItemData>(
reorderModel: AnimatedListReorderModel(
onReorderStart: (index, dx, dy) {
return index > 1;
},
onReorderMove: (index, dropIndex) {
return index > 1;
},
onReorderComplete: (index, dropIndex, slot) {
if (dropIndex > 1)
{
currentList.insert(dropIndex, currentList.removeAt(index));
return true;
}
return false;
}
),
...
)
In my project, I have a list of 100 items, all reorderable, except the first 2 items. I need 2 things:
How can I achieve that?
Thanks.