sliver_tree/tree_drag_handle library
Caller-placed drag handles for a SliverReorderableTree row.
The package ARMS a child; it does not decide where that child sits. Put a TreeDragHandle anywhere inside a row: across the top of a card, at the leading edge, inline with a title, or two of them. The row is wrapped for you either way, so a handle-less row still hides itself while dragged, still exposes its reorder semantics actions, and is still a drop TARGET.
Ownership follows Flutter's ReorderableDragStartListener in
widgets/reorderable_list.dart: the handle owns NO recognizer.
It reports a single pointer-down to the enclosing row through
TreeRowDragScope, and the ROW owns the recognizer, the per-pointer
bookkeeping, and one Drag per gesture. That is what makes two
handles in one row safe, a handle inside a nested scrollable
harmless, and an unmounted handle a non-event for a live drag.
Classes
- TreeDelayedDragHandle
- A TreeDragHandle that waits for a long press before lifting the row.
- TreeDragHandle
- Arms child as a drag handle for the row that encloses it.
- TreeRowDragScope
- Published by each reorderable row; found by TreeDragHandle.build.