DragSession<TKey> class
Per-drag state held only while a drag is active. It owns the two consolidation sites: resolve (the ONE choreography site) and detachAll (the ONE teardown site, dispatched on SessionExit). Behaviors are reached by direct calls, with no interface and no registration list. Notification channels stay with the controller: this class never notifies listeners.
Constructors
-
DragSession({required TKey draggedKey, required ReorderRenderPort<
TKey> renderPort, required PointerSpace<TKey> pointerSpace, required DragProbe<TKey> probe, required Offset pointerGlobal, required TreeAnimationSpec commitSlideSpec})
Properties
-
autoScroller
↔ AutoScroller<
TKey> -
Behavior collaborators, assigned by
startDragright after construction, because they need the session's identity for their callbacks. makeRoomDriver is null when the session runs without make-room, settler when it runs without a proxy: absence IS the mode flag.latefinal - commitSlideSpec → TreeAnimationSpec
-
Commit-slide timing, resolved from the tree controller's
animationStyle.reorderSlideONCE at session start, so a mid-drag restyle never retimes a live session; the next drag picks it up. Consumed by the commit script's baseline staging.final -
currentTarget
↔ TreeDropTarget<
TKey> ? -
The slot the last resolution landed on, and the slot a commit uses.
Null when no row sits under the probe, but deliberately HELD when
the scrollable is gone, since DragProbe.resolveTarget returns the
previous target rather than dropping it.
getter/setter pair
- draggedKey → TKey
-
final
-
dwell
↔ DwellExpander<
TKey> -
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
makeRoomDriver
↔ MakeRoomDriver<
TKey> ? -
getter/setter pair
- pointerGlobal ↔ Offset
-
Latest pointer position in global coordinates. Updated on every
TreeReorderController.updateDragcall so the autoscroll ticker can re-evaluate without extra callback plumbing.getter/setter pair -
pointerSpace
→ PointerSpace<
TKey> -
The session's ONLY route to coordinates and scrollable liveness: a
null PointerSpace.sample means the scrollable is gone, and every
consumer handles it.
final
-
probe
→ DragProbe<
TKey> -
The resolution core and the ONE owner of grab geometry + probeDy.
dragProxyGeometryand the settler read through it.final -
renderPort
→ ReorderRenderPort<
TKey> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
settler
↔ DropSettler<
TKey> ? -
getter/setter pair
Methods
-
bindScroll(
VoidCallback listener) → void -
Installs the session's scroll listener through PointerSpace, the
one owner of the subscription: wheel/trackpad/second-finger scrolls
move content under a stationary pointer, and the autoscroll ticker's
own
jumpTonotifies this same listener, giving one re-resolution path for every scroll source. detachAll unsubscribes. -
detachAll(
SessionExit exit) → void -
THE teardown site: every behavior's release, dispatched on
exit, then the session-common resources, being the scroll subscription and the dragged row's eviction pin. A new behavior joins teardown by one edit here. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolve(
) → void - THE choreography site: one PointerSpace.sample per event (the single viewport lookup), the probe's resolution core, then every behavior in a fixed order. A new behavior joins the pipeline by one edit here. Re-entrant only from a behavior's ASYNC callback, meaning the dwell fire, never synchronously from inside this sequence.
-
resolveTargetOnly(
) → void - Target-only re-resolution for the commit script: the same probe core as resolve, so the committed slot is always the slot the feedback showed, but WITHOUT the behavior fan-out. Syncing the behaviors at commit time could re-target the make-room gap between the FLIP baseline capture and its snap, corrupting the slide.
-
resyncScroll(
) → void - Re-points the scroll subscription at the scrollable's current position (see PointerSpace.syncScrollSubscription).
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited