ControllerScroller class
Scroller backed by a ScrollController.
Constructors
- ControllerScroller({required ScrollController controller, double stepFraction = 0.32, Duration duration = const Duration(milliseconds: 650), Curve curve = Curves.decelerate})
Properties
- controller → ScrollController
-
final
- curve → Curve
-
Easing curve.
final
- duration → Duration
-
Animation length per step. 220ms matches the host's default scrollable
physics (
ClampingScrollPhysicssettles ~200-260ms); going much shorter starts to clip the deceleration curve and looks janky.final - hashCode → int
-
The hash code for this object.
no setterinherited
- position → double?
-
Current logical scroll position (e.g.
position.pixels).no setteroverride - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stepFraction → double
-
Fraction of viewport to advance per step.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
positionFromSnapshot(
UiSnapshot snapshot) → double? -
Like position, but reuses an already-captured
snapshotinstead of forcing the scroller to capture its own.inherited -
reset(
) → void -
Clear any per-exploration state (exhaustion sets, caches, step counters).
inherited
-
scrollByPixels(
double pixels) → Future< bool> -
Scroll by an exact
pixelsdelta (positive = forward / toward end, negative = backward / toward start).override -
stepBackward(
) → Future< bool> -
Advance one step backward (toward the start of the scrollable).
override
-
stepForward(
) → Future< bool> -
Advance one step forward.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited