diff --git a/lib/pro_image_editor/features/reorder_layer_example.dart b/lib/pro_image_editor/features/reorder_layer_example.dart index a8bb123..7b53d72 100644 --- a/lib/pro_image_editor/features/reorder_layer_example.dart +++ b/lib/pro_image_editor/features/reorder_layer_example.dart @@ -145,6 +145,10 @@ class _ReorderLayerSheetState extends State { if (oldIndex == 0 || newIndex == 0) { return; } + + if (oldIndex < newIndex) { + newIndex -= 1; + } widget.onReorder(oldIndex, newIndex); }, );