Fixing example

This commit is contained in:
Leigha Jarett 2023-06-19 15:38:07 -04:00
parent 196c19178a
commit 17899ebb5b

View File

@ -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}
///