reorderItem method
Reorders the item at the specified index to a new position in the list or grid.
This method triggers the reordering animation to smoothly move the item
from its current position to the destIndex within the AnimatedReorderable widget.
If onReorder callback is not specified, then this function will throw an exception.
The index parameter represents the original position of the item.
The destIndex parameter represents the new position to which the item will be moved.
Note: The reordering animation is handled by the underlying controller.
Parameters:
index: The original position of the item to be reordered.destIndex: The new position to which the item will be moved.
Implementation
void reorderItem(
int index, {
required int destIndex,
}) =>
_controller.reorderItem(index, destIndex: destIndex);