onReorder property

void Function(TKey key, TKey? newParent, int index)? onReorder
final

Reports every committed reorder, whatever initiated it: a pointer drop, moveTo, or one of the four semantic moves.

index follows the package's live-space FINAL-list convention: the position among the destination's live children AFTER key has been removed from wherever it was. A same-parent downward move therefore reports one less than a caller computing against the pre-removal list would expect.

Fires exactly once per commit, and never for a refused or no-op move. On the drag path it fires after the session has been torn down and before the session-end notification, so a synchronous setState here cannot land mid-commit.

This is the only way to observe a reorder that did not come from a pointer. Assistive technology drives the semantic moves directly, and without this a consumer holding authoritative data would never hear about them.

Implementation

final void Function(TKey key, TKey? newParent, int index)? onReorder;