ScrollbarThemeData class

Defines default property values for descendant Scrollbar widgets.

Descendant widgets obtain the current ScrollbarThemeData object with ScrollbarTheme.of(context). Instances of ScrollbarThemeData can be customized with ScrollbarThemeData.copyWith.

Typically the ScrollbarThemeData of a ScrollbarTheme is specified as part of the overall Theme with ThemeData.scrollbarTheme.

All ScrollbarThemeData properties are null by default. When null, the Scrollbar computes its own default values, typically based on the overall theme's ThemeData.colorScheme.

See also:

  • ThemeData, which describes the overall theme information for the application.
Mixed in types
Annotations

Constructors

ScrollbarThemeData({MaterialStateProperty<bool?>? thumbVisibility, MaterialStateProperty<double?>? thickness, MaterialStateProperty<bool?>? trackVisibility, Radius? radius, MaterialStateProperty<Color?>? thumbColor, MaterialStateProperty<Color?>? trackColor, MaterialStateProperty<Color?>? trackBorderColor, double? crossAxisMargin, double? mainAxisMargin, double? minThumbLength, bool? interactive, @Deprecated('Use ScrollbarThemeData.trackVisibility to resolve based on the current state instead. ' 'This feature was deprecated after v3.4.0-19.0.pre.') bool? showTrackOnHover})
Creates a theme that can be used for ThemeData.scrollbarTheme.
const

Properties

crossAxisMargin double?
Overrides the default value of the ScrollbarPainter.crossAxisMargin property in all descendant Scrollbar widgets.
final
hashCode int
The hash code for this object.
no setteroverride
interactive bool?
Overrides the default value of Scrollbar.interactive in all descendant Scrollbar widgets.
final
mainAxisMargin double?
Overrides the default value of the ScrollbarPainter.mainAxisMargin property in all descendant Scrollbar widgets.
final
minThumbLength double?
Overrides the default value of the ScrollbarPainter.minLength property in all descendant Scrollbar widgets.
final
radius Radius?
Overrides the default value of Scrollbar.radius in all descendant widgets.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showTrackOnHover bool?
Overrides the default value of Scrollbar.showTrackOnHover in all descendant Scrollbar widgets.
final
thickness MaterialStateProperty<double?>?
Overrides the default value of Scrollbar.thickness in all descendant Scrollbar widgets.
final
thumbColor MaterialStateProperty<Color?>?
Overrides the default Color of the Scrollbar thumb in all descendant Scrollbar widgets.
final
thumbVisibility MaterialStateProperty<bool?>?
Overrides the default value of Scrollbar.thumbVisibility in all descendant Scrollbar widgets.
final
trackBorderColor MaterialStateProperty<Color?>?
Overrides the default Color of the Scrollbar track border when showTrackOnHover is true in all descendant Scrollbar widgets.
final
trackColor MaterialStateProperty<Color?>?
Overrides the default Color of the Scrollbar track when showTrackOnHover is true in all descendant Scrollbar widgets.
final
trackVisibility MaterialStateProperty<bool?>?
Overrides the default value of Scrollbar.trackVisibility in all descendant Scrollbar widgets.
final

Methods

copyWith({MaterialStateProperty<bool?>? thumbVisibility, MaterialStateProperty<double?>? thickness, MaterialStateProperty<bool?>? trackVisibility, bool? interactive, Radius? radius, MaterialStateProperty<Color?>? thumbColor, MaterialStateProperty<Color?>? trackColor, MaterialStateProperty<Color?>? trackBorderColor, double? crossAxisMargin, double? mainAxisMargin, double? minThumbLength, bool? showTrackOnHover}) ScrollbarThemeData
Creates a copy of this object with the given fields replaced with the new values.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
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
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

lerp(ScrollbarThemeData? a, ScrollbarThemeData? b, double t) ScrollbarThemeData
Linearly interpolate between two Scrollbar themes.