mirror of
https://github.com/FoggedLens/deflock-app.git
synced 2026-10-08 00:51:13 +02:00
2.10.2 fixes reorderlist deprecation
This commit is contained in:
1 parent
036ac8c5e6
commit
41479e7ee4
9 files changed
+70
-15
No files matched your search
@@ -47,10 +47,7 @@ class OperatorProfileState extends ChangeNotifier {
|
||||
void reorderProfiles(int oldIndex, int newIndex) {
|
||||
final orderedProfiles = _getOrderedProfiles();
|
||||
|
||||
// Standard Flutter reordering logic
|
||||
if (oldIndex < newIndex) {
|
||||
newIndex -= 1;
|
||||
}
|
||||
// With onReorderItem callback, newIndex is already adjusted
|
||||
final item = orderedProfiles.removeAt(oldIndex);
|
||||
orderedProfiles.insert(newIndex, item);
|
||||
|
||||
|
||||
@@ -129,10 +129,7 @@ class ProfileState extends ChangeNotifier {
|
||||
void reorderProfiles(int oldIndex, int newIndex) {
|
||||
final orderedProfiles = _getOrderedProfiles();
|
||||
|
||||
// Standard Flutter reordering logic
|
||||
if (oldIndex < newIndex) {
|
||||
newIndex -= 1;
|
||||
}
|
||||
// With onReorderItem callback, newIndex is already adjusted
|
||||
final item = orderedProfiles.removeAt(oldIndex);
|
||||
orderedProfiles.insert(newIndex, item);
|
||||
|
||||
|
||||
Reference in new issue
Block a user