ScrollbarThemeData class Null safety

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<double?>? thickness, bool? showTrackOnHover, bool? isAlwaysShown, Radius? radius, MaterialStateProperty<Color?>? thumbColor, MaterialStateProperty<Color?>? trackColor, MaterialStateProperty<Color?>? trackBorderColor, double? crossAxisMargin, double? mainAxisMargin, double? minThumbLength})
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. [...]
read-only, override
isAlwaysShown bool?
Overrides the default value of Scrollbar.isAlwaysShown 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.
read-only, inherited
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
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

Methods

copyWith({MaterialStateProperty<double?>? thickness, bool? showTrackOnHover, bool? isAlwaysShown, Radius? radius, MaterialStateProperty<Color?>? thumbColor, MaterialStateProperty<Color?>? trackColor, MaterialStateProperty<Color?>? trackBorderColor, double? crossAxisMargin, double? mainAxisMargin, double? minThumbLength}) 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 non-existent 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. [...]