AutoScroller<TKey> class
Edge-zone autoscroll. Owns its ticker per session, created here and disposed in detach, so no ticker state outlives a drag. Keys off the FINGER's viewport position, never the probe, because an edge zone is about where the hand is, not where the card is.
Constructors
-
AutoScroller({required TickerProvider vsync, required PointerSpace<
TKey> space, required Offset pointerGlobal(), required double edgeZone, required double maxVelocity})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
detach(
SessionExit exit) → void - Stops and disposes the ticker. The exit reason does not matter: autoscroll leaves no state behind to unwind differently.
-
evaluate(
PointerSample? sample) → void -
Starts or stops the ticker for the pointer's current edge-zone
membership. A null
samplemeans the scrollable is gone: stop. -
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
Static Methods
-
velocityAt(
{required double viewportDy, required double viewportHeight, required double edgeZone, required double maxVelocity}) → double -
Pure velocity ramp: 0 at the zone's inner edge,
maxVelocityat the viewport edge, negative in the leading zone, and 0 between them. Static and side-effect-free so it can be exercised without a session.