diff --git a/packages/flutter/lib/src/material/reorderable_list.dart b/packages/flutter/lib/src/material/reorderable_list.dart index 1b874ef8603..ed6b815b093 100644 --- a/packages/flutter/lib/src/material/reorderable_list.dart +++ b/packages/flutter/lib/src/material/reorderable_list.dart @@ -23,7 +23,19 @@ import 'theme.dart'; /// removing the item at oldIndex from the list will /// reduce the list's length by one. /// Implementations will need to account for this -/// when inserting before newIndex. +/// when inserting before newIndex. Typically the [onReorder] +/// callback adjusts its index parameters like this: +/// +/// ``` +/// onReorder: (int oldIndex, int newIndex) { +/// if (oldIndex < newIndex) { +/// // removing the item at oldIndex will shorten the list by 1. +/// newIndex -= 1; +/// } +/// .... +/// } +/// ``` +/// /// /// {@tool dartpad} ///