ReorderableListView(
children: <Widget>[
for (int index = 0; index < _items.length; index++)
ListTile(
key: Key('$index'),
title: Container(
padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
color: Colors.white,
child: Text('Item ${_items[index]}')
),
),
],
onReorder: (int oldIndex, int newIndex) {
setState(() {
if (oldIndex < newIndex) {
newIndex -= 1;
}
final int item = _items.removeAt(oldIndex);
_items.insert(newIndex, item);
});
},
),
tkx ur solution