ScrollbarDecoration class
This class provides both styling and functionality configuration for the scrollbar used in the CodeForge. Only vertical scrollbar can be tweaked using this class.
Constructors
- ScrollbarDecoration({bool showLineNumberIndicator = true, TextStyle? lineNumberStyle, Color? thumbColor, double? thickness, bool? thumbVisibility, BorderRadius borderRadius = BorderRadius.zero, double minThumbLength = 18.0, double? minOverscrollLength, bool? trackVisibility, Radius? trackRadius, Color? trackColor, Color? trackBorderColor, Duration fadeDuration = const Duration(milliseconds: 300), Duration timeToFade = const Duration(milliseconds: 600), Duration pressDuration = Duration.zero, ScrollNotificationPredicate notificationPredicate = defaultScrollNotificationPredicate, bool? interactive, ScrollbarOrientation? scrollbarOrientation, double mainAxisMargin = 0.0, double crossAxisMargin = 0.0, EdgeInsetsGeometry? padding})
-
const
Properties
- borderRadius → BorderRadius
-
final
- crossAxisMargin → double
-
Distance from the scrollbar thumb's side to the nearest cross axis edge
in logical pixels.
final
- fadeDuration → Duration
-
The Duration of the fade animation.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- interactive → bool?
-
Whether the Scrollbar should be interactive and respond to dragging on the
thumb, or tapping in the track area.
final
- lineNumberStyle → TextStyle?
-
The TextStyle style apllied on the line number indicator.
Dosen't have any effect if showLineNumberIndicator set to false;
final
- mainAxisMargin → double
-
Distance from the scrollbar thumb's start or end to the nearest edge of
the viewport in logical pixels. It affects the amount of available
paint area.
final
- minOverscrollLength → double?
-
The preferred smallest size the scrollbar thumb can shrink to when viewport is
overscrolled.
final
- minThumbLength → double
-
The preferred smallest size the scrollbar thumb can shrink to when the total
scrollable extent is large, the current visible viewport is small, and the
viewport is not overscrolled.
final
- notificationPredicate → ScrollNotificationPredicate
-
A check that specifies whether a ScrollNotification should be
handled by this widget.
final
- padding → EdgeInsetsGeometry?
-
The insets by which the scrollbar thumb and track should be padded.
final
- pressDuration → Duration
-
The Duration of time that a LongPress will trigger the drag gesture of
the scrollbar thumb.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollbarOrientation → ScrollbarOrientation?
-
Dictates the orientation of the scrollbar.
final
- showLineNumberIndicator → bool
-
Whether to show the current line number near the scrollbar.
Defaults to true
final
- thickness → double?
-
The thickness of the scrollbar in the cross axis of the scrollable.
final
- thumbColor → Color?
-
The color of the scrollbar thumb.
final
- thumbVisibility → bool?
-
Indicates that the scrollbar thumb should be visible, even when a scroll
is not underway.
final
- timeToFade → Duration
-
The Duration of time until the fade animation begins.
final
- trackBorderColor → Color?
-
The color of the scrollbar track's border.
final
- trackColor → Color?
-
The color of the scrollbar track.
final
- trackRadius → Radius?
-
The Radius of the scrollbar track's rounded rectangle corners.
final
- trackVisibility → bool?
-
Indicates that the scrollbar track should be visible.
final
Methods
-
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