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
nodeis a strict descendant ofancestor, excludingancestoritself. 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
draggedKeywith the pointer atpointerY(sliver-local) over the rowtargetKey, whose painted geometry istargetPaintedY/targetExtent. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited