fix onReorder deprication
This commit is contained in:
1 parent
577e1772d3
commit
5c612b9a46
3 files changed
+3
-9
No files matched your search
@@ -142,9 +142,6 @@ class _PathEditorSheetState extends State<PathEditorSheet> {
|
||||
|
||||
void _reorderHop(int oldIndex, int newIndex) {
|
||||
setState(() {
|
||||
if (oldIndex < newIndex) {
|
||||
newIndex -= 1;
|
||||
}
|
||||
final hop = _hops.removeAt(oldIndex);
|
||||
_hops.insert(newIndex, hop);
|
||||
_syncHexFromHops();
|
||||
@@ -287,7 +284,7 @@ class _PathEditorSheetState extends State<PathEditorSheet> {
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
buildDefaultDragHandles: false,
|
||||
itemCount: _hops.length,
|
||||
onReorder: _reorderHop,
|
||||
onReorderItem: _reorderHop,
|
||||
itemBuilder: _hopTile,
|
||||
),
|
||||
const Divider(),
|
||||
|
||||
Reference in new issue
Block a user