onReorder property

void Function(int oldIndex, int newIndex)? onReorder
final

Every a child changes his position, this function is called.

When a child was moved, you get the old index where the child was and the new index where the child is positioned now.

You should always update your list if you want to make use of the new order. Otherwise this widget is just a good-looking widget.

See more on the example.

Implementation

final void Function(int oldIndex, int newIndex)? onReorder = null;