DraggableScrollbar class
A widget that will display a BoxScrollView with a ScrollThumb that can be dragged for quick navigation of the BoxScrollView.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- DraggableScrollbar
Constructors
- DraggableScrollbar({Key? key, bool alwaysVisibleScrollThumb = false, required double heightScrollThumb, required Color backgroundColor, required ScrollThumbBuilder scrollThumbBuilder, required BoxScrollView child, required ScrollController controller, EdgeInsetsGeometry? padding, Duration scrollbarAnimationDuration = const Duration(milliseconds: 300), Duration scrollbarTimeToFade = const Duration(milliseconds: 600), LabelTextBuilder? labelTextBuilder, BoxConstraints? labelConstraints})
- DraggableScrollbar.arrows({Key? key, Key? scrollThumbKey, bool alwaysVisibleScrollThumb = false, required BoxScrollView child, required ScrollController controller, double heightScrollThumb = 48.0, Color backgroundColor = Colors.white, EdgeInsetsGeometry? padding, Duration scrollbarAnimationDuration = const Duration(milliseconds: 300), Duration scrollbarTimeToFade = const Duration(milliseconds: 600), LabelTextBuilder? labelTextBuilder, BoxConstraints? labelConstraints})
- DraggableScrollbar.rrect({Key? key, Key? scrollThumbKey, bool alwaysVisibleScrollThumb = false, required BoxScrollView child, required ScrollController controller, double heightScrollThumb = 48.0, Color backgroundColor = Colors.white, EdgeInsetsGeometry? padding, Duration scrollbarAnimationDuration = const Duration(milliseconds: 300), Duration scrollbarTimeToFade = const Duration(milliseconds: 600), LabelTextBuilder? labelTextBuilder, BoxConstraints? labelConstraints})
- DraggableScrollbar.semicircle({Key? key, Key? scrollThumbKey, bool alwaysVisibleScrollThumb = false, required BoxScrollView child, required ScrollController controller, double heightScrollThumb = 48.0, Color backgroundColor = Colors.white, EdgeInsetsGeometry? padding, Duration scrollbarAnimationDuration = const Duration(milliseconds: 300), Duration scrollbarTimeToFade = const Duration(milliseconds: 600), LabelTextBuilder? labelTextBuilder, BoxConstraints? labelConstraints})
Properties
- alwaysVisibleScrollThumb → bool
-
Determines scrollThumb displaying. If you draw own ScrollThumb and it is true you just don't need to use animation parameters in scrollThumbBuilder
final
- backgroundColor → Color
-
The background color of the label and thumb
final
- child → BoxScrollView
-
The view that will be scrolled with the scroll thumb
final
- controller → ScrollController
-
The ScrollController for the BoxScrollView
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- heightScrollThumb → double
-
The height of the scroll thumb
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- labelConstraints → BoxConstraints?
-
Determines box constraints for Container displaying label
final
- labelTextBuilder → LabelTextBuilder?
-
Build a Text widget from the current offset in the BoxScrollView
final
- padding → EdgeInsetsGeometry?
-
The amount of padding that should surround the thumb
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollbarAnimationDuration → Duration
-
Determines how quickly the scrollbar will animate in and out
final
- scrollbarTimeToFade → Duration
-
How long should the thumb be visible before fading out
final
- scrollThumbBuilder → ScrollThumbBuilder
-
A function that builds a thumb using the current configuration
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _DraggableScrollbarState -
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}) → 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
Static Methods
-
buildScrollThumbAndLabel(
{required Widget scrollThumb, required Color backgroundColor, required Animation< double> ? thumbAnimation, required Animation<double> ? labelAnimation, required Text? labelText, required BoxConstraints? labelConstraints, required bool alwaysVisibleScrollThumb}) → dynamic