PositionScroller class

Scroller backed by a ScrollPosition directly.

Inheritance

Constructors

PositionScroller({required ScrollPosition scrollPosition, double stepFraction = 0.32, Duration duration = const Duration(milliseconds: 650), Curve curve = Curves.decelerate})

Properties

curve → Curve
See ControllerScroller.curve.
final
duration → Duration
See ControllerScroller.duration.
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
scrollPosition → ScrollPosition
final
stepFraction → double
See ControllerScroller.stepFraction.
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 snapshot instead 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 pixels delta (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