fix: reorder attribute
This commit is contained in:
@@ -348,16 +348,17 @@ class _MatchResultViewState extends State<MatchResultView> {
|
|||||||
onReorderEnd: (int n) async {
|
onReorderEnd: (int n) async {
|
||||||
await HapticFeedback.selectionClick();
|
await HapticFeedback.selectionClick();
|
||||||
},
|
},
|
||||||
onReorder: (int oldIndex, int newIndex) {
|
onReorderItem:
|
||||||
setState(() {
|
(int oldIndex, int newIndex) {
|
||||||
if (newIndex > oldIndex) {
|
setState(() {
|
||||||
newIndex -= 1;
|
if (newIndex > oldIndex) {
|
||||||
}
|
newIndex -= 1;
|
||||||
final Player item = allPlayers
|
}
|
||||||
.removeAt(oldIndex);
|
final Player item = allPlayers
|
||||||
allPlayers.insert(newIndex, item);
|
.removeAt(oldIndex);
|
||||||
});
|
allPlayers.insert(newIndex, item);
|
||||||
},
|
});
|
||||||
|
},
|
||||||
itemCount: allPlayers.length,
|
itemCount: allPlayers.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
return TextIconListTile(
|
return TextIconListTile(
|
||||||
|
|||||||
Reference in New Issue
Block a user