onReorder property

void Function(int oldPosition, int newPosition, T item, List<T> reordered) onReorder
final

Callback when the order is changed. This callback can be used to change the actual data.

The elements to be reordered are passed to item, the old and new positions to oldPosition and newPosition, and the list after the reordering to reordered.

順番が変更されたときのコールバック。このコールバックで実データの変更を行うことが可能です。

itemに順番が入れ替わった対象の要素、oldPositionnewPositionに新旧の位置、reorderedに順番が入れ替わった後のリストが渡されます。

Implementation

final void Function(
  int oldPosition,
  int newPosition,
  T item,
  List<T> reordered,
) onReorder;