sliver_tree/tree_reorder_controller library

Orchestrates drag-and-drop reorder over a TreeController-backed SliverTree: gesture lifecycle, drop-target resolution, autoscroll near viewport edges, and FLIP slide animation on commit.

The controller is stateless when idle — it holds no per-frame state outside an active drag. A drag session begins with startDrag, receives pointer updates via updateDrag, and ends with endDrag (commit) or cancelDrag (no-op). Only one session can be active at a time.

Coordinate space is exclusively scroll-space (distance from the start of the sliver's scroll extent, matching SliverTreeParentData.layoutOffset and RenderSliverTree.snapshotVisibleOffsets). The global pointer is converted once per updateDrag.

Classes

TreeDropTarget<TKey>
Resolved drop target for the current pointer position during a drag.
TreeReorderController<TKey, TData>
Controls a drag-and-drop reorder over a TreeController.

Enums

TreeDropZone
Where the pointer lies relative to a candidate drop-target row.