DropZoneResolver<TKey> class

Classifies a pointer position over a hovered row into a TreeDropZone and translates it to a semantic TreeDropTarget against current TreeController state.

Stateless between calls; safe to share for the lifetime of the owning reorder controller.

Constructors

DropZoneResolver({required TreeController<TKey, Object?> treeController, bool canAcceptDrop({int? index, required TKey movingKey, TKey? newParent})?})

Properties

canAcceptDrop → bool Function({int? index, required TKey movingKey, TKey? newParent})?
If set, rejected drop targets resolve to null. Receives the dragged key, the candidate new parent, and the final-list index.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
treeController → TreeController<TKey, Object?>
The controller whose structure resolution reads (parents, depths, live indices, expansion).
final

Methods

isStrictDescendantOf(TKey node, TKey ancestor) → bool
Whether node is a strict descendant of ancestor, excluding ancestor itself. An O(depth) ancestor walk that allocates nothing, which matters because drop-target resolution asks it up to three times per pointer move.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve({required TKey draggedKey, required TKey targetKey, required double targetPaintedY, required double targetExtent, required double pointerY, int? preferredDepth}) → TreeDropTarget<TKey>?
Resolves the drop target for draggedKey with the pointer at pointerY (sliver-local) over the row targetKey, whose painted geometry is targetPaintedY / targetExtent.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited