TreeDropTarget<TKey> class
Resolved semantic drop target for the current pointer position during a drag.
Immutable snapshot produced by DropZoneResolver from the pointer and the hovered row's painted geometry. Consumed two ways:
- Commit (
TreeReorderController.endDrag): parentKey + indexInFinalList drivemoveNode/reorderChildren/reorderRoots. - Feedback (the make-room preview): gapVisibleIndex names the row the gap opens before. Derived from the resolved slot, NOT from the hovered row, so the gap and the commit cannot disagree.
- Annotations
Constructors
- TreeDropTarget({required TKey targetKey, required TreeDropZone zone, required TKey? parentKey, required int indexInFinalList, required int depth, required int gapVisibleIndex, required double targetPaintedY, required double targetExtent})
-
const
Properties
- depth → int
-
Depth of the dragged node after the move (0 for roots).
final
- gapVisibleIndex → int
-
Visible-order index of the resolved slot's leading edge: the
make-room gap opens BEFORE the row at this index.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- indexInFinalList → int
-
The index the dragged node should occupy in the final sibling list
of parentKey after the move / reorder has completed.
final
- parentKey → TKey?
-
The dragged node's new parent after commit.
nullmeans "root".final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- targetExtent → double
-
Painted extent of targetKey's row at resolve time.
final
- targetKey → TKey
-
The row the pointer is over.
final
- targetPaintedY → double
-
Sliver-local painted y of targetKey's row at resolve time: the
space
RenderSliverTree.findRowAtPaintedYspeaks (first tree row at 0, including any active FLIP slide delta). Convert to viewport scroll space by adding the tree sliver'sprecedingScrollExtent(ReorderRenderPort.precedingScrollExtent).final - zone → TreeDropZone
-
Where the pointer sits relative to targetKey.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited