VsScrollbar class
To add a VsScrollbar to a ScrollView, wrap the scroll view widget in a VsScrollbar widget.
The color of the VsScrollbar will change when dragged. A hover animation is
also triggered when used on web and desktop platforms. A VsScrollbar track
can also been drawn when triggered by a hover event, which is controlled by
showTrackOnHover. The thickness of the track and VsScrollbar thumb will
become larger when hovering, unless overridden by hoverThickness
.
See also:
- RawScrollbar, a basic VsScrollbar that fades in and out, extended by this class to add more animations and behaviors.
- ScrollbarTheme, which configures the VsScrollbar's appearance.
- ListView, which displays a linear, scrollable list of children.
- GridView, which displays a 2 dimensional, scrollable array of children.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- VsScrollbar
Constructors
- VsScrollbar({Key? key, required Widget child, ScrollController? controller, VsScrollbarStyle style = _kScrollbarStyle, Duration? scrollbarFadeDuration, Duration? scrollbarTimeToFade, bool? isAlwaysShown, bool? showTrackOnHover, ScrollNotificationPredicate? notificationPredicate})
-
Creates a material design VsScrollbar that by default will connect to the
closest Scrollable descendant of
child
.const
Properties
- child → Widget
-
final
- controller → ScrollController?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAlwaysShown → bool?
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- notificationPredicate → ScrollNotificationPredicate?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollbarFadeDuration → Duration?
-
default 300ms
final
- scrollbarTimeToFade → Duration?
-
default 600ms
final
- showTrackOnHover → bool?
-
If this property is null, then
ScrollbarThemeData.showTrackOnHover
of ThemeData.scrollbarTheme is used. If that is also null, the default value is false.final - style → VsScrollbarStyle
-
Style Property for VsScrollbar
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _ScrollbarState -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited