onReorder property
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
に順番が入れ替わった対象の要素、oldPosition
、newPosition
に新旧の位置、reordered
に順番が入れ替わった後のリストが渡されます。
Implementation
final void Function(
int oldPosition,
int newPosition,
T item,
List<T> reordered,
) onReorder;