ScrollbarHandler class abstract
Abstract interface for handling scrollbar interactions and state.
Defines the contract for scrollbar behavior including scroll position tracking, thumb metrics calculation, and user interaction handling (pan, tap).
- Implemented types
Constructors
Properties
- contentSize → double
-
The total size of the scrollable content.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxScroll → double
-
The maximum scroll offset in pixels.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scroll → double
-
The current scroll offset in pixels.
no setter
- scrollDirection → Axis
-
The scroll direction (horizontal or vertical).
no setter
- scrollProgress ↔ double
-
The scroll progress as a value between 0.0 and 1.0.
getter/setter pair
- shouldShowScrollbar → bool
-
Whether the scrollbar should be visible (true if content exceeds viewport).
no setter
- viewportSize → double
-
The size of the visible viewport.
no setter
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object notifies its listeners.
inherited
-
computeThumbMetrics(
double viewportSize, double minThumbLength) → ({double thumbLength, double thumbOffset}) - Computes the thumb length and offset for the scrollbar.
-
handlePanUpdate(
DragUpdateDetails details) → void - Handles pan/drag updates on the scrollbar.
-
handleTapDown(
BuildContext context, TapDownDetails details, Duration jumpDuration, Curve curve) → void - Handles tap events on the scrollbar track.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that the
object notifies.
inherited
-
setScrollProgress(
double value, Duration duration, Curve curve) → void -
Animates the scroll progress to
valueoverdurationwith the givencurve. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
of(
BuildContext context) → ScrollbarHandler - Retrieves the ScrollbarHandler from the widget tree.