SfSliderThemeData class

Holds the color and typography values for a SfSliderTheme. Use this class to configure a SfSliderTheme widget, or to set the SfThemeData.sliderThemeData for a SfTheme widget.

To obtain the current theme, use SfSliderTheme.of.

The slider elements are:

  • The "track", which is the rounded rectangle in which the thumb is slides over.
  • The "thumb", which is a shape that slides horizontally when the user drags it.
  • The "active" side of the slider is between the min value and thumb.
  • The "inactive" side of the slider is between the thumb and the max value.
  • The "dividers", which is a shape that renders on the track based on the given interval value.
  • The "ticks", which is a shape that rendered based on given interval value. Basically, it is rendered below the track. It is also called “major ticks”.
  • The "minor ticks", which is a shape that renders between two major ticks based on given minorTicksPerInterval value. Basically, it is rendered below the track.
  • The "labels", which is a text that rendered based on given interval value. Basically, it is rendered below the track and the major ticks.

The slider will be disabled if onChanged is null or min is equal to max.

See also:

Mixed-in types
Implementers
Annotations

Constructors

SfSliderThemeData({Brightness? brightness, double? activeTrackHeight, double? inactiveTrackHeight, Size? tickSize, Size? minorTickSize, Offset? tickOffset, Offset? labelOffset, TextStyle? inactiveLabelStyle, TextStyle? activeLabelStyle, TextStyle? tooltipTextStyle, Color? inactiveTrackColor, Color? activeTrackColor, Color? thumbColor, Color? activeTickColor, Color? inactiveTickColor, Color? disabledActiveTickColor, Color? disabledInactiveTickColor, Color? activeMinorTickColor, Color? inactiveMinorTickColor, Color? disabledActiveMinorTickColor, Color? disabledInactiveMinorTickColor, Color? overlayColor, Color? inactiveDividerColor, Color? activeDividerColor, Color? disabledActiveTrackColor, Color? disabledInactiveTrackColor, Color? disabledActiveDividerColor, Color? disabledInactiveDividerColor, Color? disabledThumbColor, Color? tooltipBackgroundColor, Color? thumbStrokeColor, Color? activeDividerStrokeColor, Color? inactiveDividerStrokeColor, double? trackCornerRadius, double? overlayRadius, double? thumbRadius, double? activeDividerRadius, double? inactiveDividerRadius, double? thumbStrokeWidth, double? activeDividerStrokeWidth, double? inactiveDividerStrokeWidth})
Returns a new instance of SfSliderThemeData.raw for the given values.
factory
SfSliderThemeData.raw({required Brightness brightness, required double activeTrackHeight, required double inactiveTrackHeight, required Size? tickSize, required Size? minorTickSize, required Offset? tickOffset, required Offset? labelOffset, required TextStyle? inactiveLabelStyle, required TextStyle? activeLabelStyle, required TextStyle? tooltipTextStyle, required Color? inactiveTrackColor, required Color? activeTrackColor, required Color? thumbColor, required Color? thumbStrokeColor, required Color? activeDividerStrokeColor, required Color? inactiveDividerStrokeColor, required Color? activeTickColor, required Color? inactiveTickColor, required Color? disabledActiveTickColor, required Color? disabledInactiveTickColor, required Color? activeMinorTickColor, required Color? inactiveMinorTickColor, required Color? disabledActiveMinorTickColor, required Color? disabledInactiveMinorTickColor, required Color? overlayColor, required Color? inactiveDividerColor, required Color? activeDividerColor, required Color? disabledActiveTrackColor, required Color? disabledInactiveTrackColor, required Color? disabledActiveDividerColor, required Color? disabledInactiveDividerColor, required Color? disabledThumbColor, required Color? tooltipBackgroundColor, required double? trackCornerRadius, required double overlayRadius, required double thumbRadius, required double? activeDividerRadius, required double? inactiveDividerRadius, required double? thumbStrokeWidth, required double? activeDividerStrokeWidth, required double? inactiveDividerStrokeWidth})
Create a SfSliderThemeData given a set of exact values. All the values must be specified.
const

Properties

activeDividerColor Color?
Specifies the color for the active dividers in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
activeDividerRadius double?
Specifies the radius for the active divider in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
activeDividerStrokeColor Color?
Specifies the stroke color for the active divider in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
activeDividerStrokeWidth double?
Specifies the stroke width for the active divider in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
activeLabelStyle TextStyle?
Specifies the appearance for active label in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
activeMinorTickColor Color?
Specifies the color for the active minor ticks in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
activeTickColor Color?
Specifies the color for active tick. Specifies the color for the active major ticks in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
activeTrackColor Color?
Specifies the color for active track in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
activeTrackHeight double
Specifies the height for the active track in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
brightness Brightness
Specifies the light and dark theme for the SfSlider, SfRangeSlider, and SfRangeSelector.
final
disabledActiveDividerColor Color?
Specifies the color for the disabled active dividers in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
disabledActiveMinorTickColor Color?
Specifies the color for the disabled active minor ticks in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
disabledActiveTickColor Color?
Specifies the color for the disabled active major ticks in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
disabledActiveTrackColor Color?
Specifies the color for the disabled active track in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
disabledInactiveDividerColor Color?
Specifies the color for the disabled inactive dividers in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
disabledInactiveMinorTickColor Color?
Specifies the color for the disabled inactive minor ticks in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
disabledInactiveTickColor Color?
Specifies the color for the disabled inactive major ticks in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
disabledInactiveTrackColor Color?
Specifies the color for the disabled inactive track in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
disabledThumbColor Color?
Specifies the color for the disabled thumb in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
hashCode int
The hash code for this object.
no setteroverride
inactiveDividerColor Color?
Specifies the color for the inactive dividers in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
inactiveDividerRadius double?
Specifies the radius for the inactive divider in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
inactiveDividerStrokeColor Color?
Specifies the stroke color for the inactive divider in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
inactiveDividerStrokeWidth double?
Specifies the stroke width for the inactive divider in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
inactiveLabelStyle TextStyle?
Specifies the appearance for inactive label in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
inactiveMinorTickColor Color?
Specifies the color for the inactive minor ticks in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
inactiveTickColor Color?
Specifies the color for the inactive major ticks in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
inactiveTrackColor Color?
Specifies the color for the inactive track in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
inactiveTrackHeight double
Specifies the height for the inactive track in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
labelOffset Offset?
Adjust the space around labels in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
minorTickSize Size?
Specifies the size for the minor ticks in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
overlayColor Color?
Specifies the color for the overlay in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
overlayRadius double
Specifies the radius for the overlay in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
thumbColor Color?
Specifies the color for the thumb in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
thumbRadius double
Specifies the radius for the thumb in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
thumbStrokeColor Color?
Specifies the stroke color for the thumb in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
thumbStrokeWidth double?
Specifies the stroke width for the thumb in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
tickOffset Offset?
Adjust the space around ticks in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
tickSize Size?
Specifies the size for tick. Specifies the size for the major ticks in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
tooltipBackgroundColor Color?
Specifies the color for the tooltip background in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
tooltipTextStyle TextStyle?
Specifies the appearance for the tooltip in the SfSlider, SfRangeSlider, and SfRangeSelector.
final
trackCornerRadius double?
Specifies the radius for the track corners in the SfSlider, SfRangeSlider, and SfRangeSelector.
final

Methods

copyWith({Brightness? brightness, double? activeTrackHeight, double? inactiveTrackHeight, Size? tickSize, Size? minorTickSize, Offset? tickOffset, Offset? labelOffset, TextStyle? inactiveLabelStyle, TextStyle? activeLabelStyle, TextStyle? tooltipTextStyle, Color? inactiveTrackColor, Color? activeTrackColor, Color? thumbColor, Color? thumbStrokeColor, Color? activeDividerStrokeColor, Color? inactiveDividerStrokeColor, Color? activeTickColor, Color? inactiveTickColor, Color? disabledActiveTickColor, Color? disabledInactiveTickColor, Color? activeMinorTickColor, Color? inactiveMinorTickColor, Color? disabledActiveMinorTickColor, Color? disabledInactiveMinorTickColor, Color? overlayColor, Color? inactiveDividerColor, Color? activeDividerColor, Color? disabledActiveTrackColor, Color? disabledInactiveTrackColor, Color? disabledActiveDividerColor, Color? disabledInactiveDividerColor, Color? disabledThumbColor, Color? activeRegionColor, Color? inactiveRegionColor, Color? tooltipBackgroundColor, double? trackCornerRadius, double? overlayRadius, double? thumbRadius, double? activeDividerRadius, double? inactiveDividerRadius, double? thumbStrokeWidth, double? activeDividerStrokeWidth, double? inactiveDividerStrokeWidth}) SfSliderThemeData
Creates a copy of this theme but 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(SfSliderThemeData? a, SfSliderThemeData? b, double t) SfSliderThemeData?
Linearly interpolate between two themes.