pub struct SliderThemeData {Show 36 fields
pub track_height: Option<f64>,
pub active_track_color: Option<Color>,
pub inactive_track_color: Option<Color>,
pub secondary_active_track_color: Option<Color>,
pub disabled_active_track_color: Option<Color>,
pub disabled_secondary_active_track_color: Option<Color>,
pub disabled_inactive_track_color: Option<Color>,
pub active_tick_mark_color: Option<Color>,
pub inactive_tick_mark_color: Option<Color>,
pub disabled_active_tick_mark_color: Option<Color>,
pub disabled_inactive_tick_mark_color: Option<Color>,
pub thumb_color: Option<Color>,
pub overlapping_shape_stroke_color: Option<Color>,
pub disabled_thumb_color: Option<Color>,
pub overlay_color: Option<AnyColor>,
pub value_indicator_color: Option<Color>,
pub value_indicator_stroke_color: Option<Color>,
pub overlay_shape: Option<SliderComponentShapeRef>,
pub tick_mark_shape: Option<SliderTickMarkShapeRef>,
pub thumb_shape: Option<SliderComponentShapeRef>,
pub track_shape: Option<SliderTrackShapeRef>,
pub value_indicator_shape: Option<SliderComponentShapeRef>,
pub range_tick_mark_shape: Option<RangeSliderTickMarkShapeRef>,
pub range_thumb_shape: Option<RangeSliderThumbShapeRef>,
pub range_track_shape: Option<RangeSliderTrackShapeRef>,
pub range_value_indicator_shape: Option<RangeSliderValueIndicatorShapeRef>,
pub show_value_indicator: Option<ShowValueIndicator>,
pub value_indicator_text_style: Option<TextStyle>,
pub min_thumb_separation: Option<f64>,
pub thumb_selector: Option<RangeThumbSelector>,
pub mouse_cursor: Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>,
pub allowed_interaction: Option<SliderInteraction>,
pub padding: Option<EdgeInsetsGeometry>,
pub thumb_size: Option<WidgetStatePropertyRef<Option<Size>>>,
pub track_gap: Option<f64>,
pub year2023: Option<bool>,
}Expand description
Overrides the default values of visual properties for descendant
Slider widgets.
Descendant widgets obtain the current SliderThemeData object with
SliderTheme::of. Instances of SliderThemeData can
be customized with SliderThemeData::copy_with.
Typically a SliderThemeData is specified as part of the overall
Theme with ThemeData::slider_theme.
This theme is for both the Slider and the RangeSlider. The properties
that are only for the Slider are: tick_mark_shape,
thumb_shape, track_shape, and
value_indicator_shape. The properties that are only for
the RangeSlider are range_tick_mark_shape,
range_thumb_shape, range_track_shape,
range_value_indicator_shape,
overlapping_shape_stroke_color,
min_thumb_separation, and
thumb_selector.
All other properties are used by both the Slider and the RangeSlider.
The parts of a slider are:
- The “thumb”, which is a shape that slides horizontally when the user drags it.
- The “track”, which is the line that the slider thumb slides along.
- The “tick marks”, which are regularly spaced marks that are drawn when using discrete divisions.
- The “value indicator”, which appears when the user is dragging the thumb to indicate the value being selected.
- The “overlay”, which appears around the thumb, and is shown when the thumb is pressed, focused, or hovered. It is painted underneath the thumb, so it must extend beyond the bounds of the thumb itself to actually be visible.
- The “active” side of the slider is the side between the thumb and the minimum value.
- The “inactive” side of the slider is the side between the thumb and the maximum value.
- The
Slideris disabled when it is not accepting user input. SeeSliderfor details on when this happens.
The thumb, track, tick marks, value indicator, and overlay can be customized
by creating subclasses of SliderTrackShape,
SliderComponentShape, and/or SliderTickMarkShape. See
RoundSliderThumbShape, RectangularSliderTrackShape,
RoundSliderTickMarkShape, RectangularSliderValueIndicatorShape, and
RoundSliderOverlayShape for examples.
The track painting can be skipped by specifying 0 for track_height.
The thumb painting can be skipped by specifying
SliderComponentShape::no_thumb for thumb_shape.
The overlay painting can be skipped by specifying
SliderComponentShape::no_overlay for overlay_shape.
The tick mark painting can be skipped by specifying
SliderTickMarkShape::no_tick_mark for tick_mark_shape.
The value indicator painting can be skipped by specifying the
appropriate ShowValueIndicator for show_value_indicator.
overlay_color is an AnyColor: the slider resolves it by state
when it is a WidgetStateColor, as Dart’s WidgetStateProperty.resolveAs does.
See also:
SliderThemewidget, which can override the slider theme of its children.Themewidget, which performs a similar function toSliderTheme, but for overall themes.ThemeData, which has a defaultSliderThemeData.
Fields§
§track_height: Option<f64>The height of the Slider track.
active_track_color: Option<Color>The color of the Slider track between the Slider::min position and the
current thumb position.
inactive_track_color: Option<Color>The color of the Slider track between the current thumb position and the
Slider::max position.
secondary_active_track_color: Option<Color>The color of the Slider track between the current thumb position and the
Slider::secondary_track_value position.
disabled_active_track_color: Option<Color>The color of the Slider track between the Slider::min position and the
current thumb position when the Slider is disabled.
disabled_secondary_active_track_color: Option<Color>The color of the Slider track between the current thumb position and the
Slider::secondary_track_value position when the Slider is disabled.
disabled_inactive_track_color: Option<Color>The color of the Slider track between the current thumb position and the
Slider::max position when the Slider is disabled.
active_tick_mark_color: Option<Color>The color of the track’s tick marks that are drawn between the Slider::min
position and the current thumb position.
inactive_tick_mark_color: Option<Color>The color of the track’s tick marks that are drawn between the current
thumb position and the Slider::max position.
disabled_active_tick_mark_color: Option<Color>The color of the track’s tick marks that are drawn between the Slider::min
position and the current thumb position when the Slider is disabled.
disabled_inactive_tick_mark_color: Option<Color>The color of the track’s tick marks that are drawn between the current
thumb position and the Slider::max position when the Slider is
disabled.
thumb_color: Option<Color>The color given to the thumb_shape to draw itself with.
overlapping_shape_stroke_color: Option<Color>The color given to the perimeter of the top range_thumb_shape
when the thumbs are overlapping and the top
range_value_indicator_shape when the value
indicators are overlapping.
disabled_thumb_color: Option<Color>The color given to the thumb_shape to draw itself with when the
Slider is disabled.
overlay_color: Option<AnyColor>The color of the overlay drawn around the slider thumb when it is pressed, focused, or hovered.
This is typically a semi-transparent color.
value_indicator_color: Option<Color>The color given to the value_indicator_shape to draw
itself with.
value_indicator_stroke_color: Option<Color>The color given to the value_indicator_shape stroke.
overlay_shape: Option<SliderComponentShapeRef>The shape that will be used to draw the Slider’s overlay.
Both the overlay_color and a non default
overlay_shape may be specified. The default
overlay_shape refers to the overlay_color.
The default value is RoundSliderOverlayShape.
tick_mark_shape: Option<SliderTickMarkShapeRef>The shape that will be used to draw the Slider’s tick marks.
The SliderTickMarkShape::get_preferred_size is used to help determine the
location of each tick mark on the track. The slider’s minimum size will
be at least this big.
The default value is RoundSliderTickMarkShape.
See also:
RoundRangeSliderTickMarkShape, which is the default tick mark shape for the range slider.
thumb_shape: Option<SliderComponentShapeRef>The shape that will be used to draw the Slider’s thumb.
The default value is RoundSliderThumbShape.
See also:
RoundRangeSliderThumbShape, which is the default thumb shape for theRangeSlider.
track_shape: Option<SliderTrackShapeRef>The shape that will be used to draw the Slider’s track.
The SliderTrackShape::get_preferred_rect method is used to map
slider-relative gesture coordinates to the correct thumb position on the
track. It is also used to horizontally position tick marks, when the
slider is discrete.
The default value is RoundedRectSliderTrackShape.
See also:
RoundedRectRangeSliderTrackShape, which is the default track shape for theRangeSlider.
value_indicator_shape: Option<SliderComponentShapeRef>The shape that will be used to draw the Slider’s value
indicator.
The default value is PaddleSliderValueIndicatorShape.
See also:
PaddleRangeSliderValueIndicatorShape, which is the default value indicator shape for theRangeSlider.
range_tick_mark_shape: Option<RangeSliderTickMarkShapeRef>The shape that will be used to draw the RangeSlider’s tick marks.
The RangeSliderTickMarkShape::get_preferred_size is used to help determine
the location of each tick mark on the track. The slider’s minimum size
will be at least this big.
The default value is RoundRangeSliderTickMarkShape.
See also:
RoundSliderTickMarkShape, which is the default tick mark shape for theSlider.
range_thumb_shape: Option<RangeSliderThumbShapeRef>The shape that will be used for the RangeSlider’s thumbs.
By default the same shape is used for both thumbs, but strokes the top thumb when it overlaps the bottom thumb. The top thumb is always the last selected thumb.
The default value is RoundRangeSliderThumbShape.
See also:
RoundSliderThumbShape, which is the default thumb shape for theSlider.
range_track_shape: Option<RangeSliderTrackShapeRef>The shape that will be used to draw the RangeSlider’s track.
The SliderTrackShape::get_preferred_rect method is used to map
slider-relative gesture coordinates to the correct thumb position on the
track. It is also used to horizontally position the tick marks, when the
slider is discrete.
The default value is RoundedRectRangeSliderTrackShape.
See also:
RoundedRectSliderTrackShape, which is the default track shape for theSlider.
range_value_indicator_shape: Option<RangeSliderValueIndicatorShapeRef>The shape that will be used for the RangeSlider’s value indicators.
The default shape uses the same value indicator for each thumb, but strokes the top value indicator when it overlaps the bottom value indicator. The top indicator corresponds to the top thumb, which is always the most recently selected thumb.
The default value is PaddleRangeSliderValueIndicatorShape.
See also:
PaddleSliderValueIndicatorShape, which is the default value indicator shape for theSlider.
show_value_indicator: Option<ShowValueIndicator>Whether the value indicator should be shown for different types of sliders.
By default, show_value_indicator is set to
ShowValueIndicator::OnlyForDiscrete. The value indicator is only shown
when the thumb is being touched.
value_indicator_text_style: Option<TextStyle>The text style for the text on the value indicator.
min_thumb_separation: Option<f64>Limits the thumb’s separation distance.
Use this only if you want to control the visual appearance of the thumbs in terms of a logical pixel value. This can be done when you want a specific look for thumbs when they are close together. To limit with the real values, rather than logical pixels, the values can be restricted by the parent.
thumb_selector: Option<RangeThumbSelector>Determines which thumb should be selected when the slider is interacted with.
If null, the default thumb selector finds the closest thumb, excluding taps that are between the thumbs and not within any one touch target. When the selection is within the touch target bounds of both thumbs, no thumb is selected until the selection is moved.
Override this for custom thumb selection.
mouse_cursor: Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>The cursor for a mouse pointer when it enters or is hovering over the widget.
If specified, overrides the default value of Slider::mouse_cursor.
allowed_interaction: Option<SliderInteraction>Allowed way for the user to interact with the Slider.
If specified, overrides the default value of Slider::allowed_interaction.
padding: Option<EdgeInsetsGeometry>Determines the padding around the Slider.
If specified, this padding overrides the default vertical padding of
the Slider, defaults to the height of the overlay shape, and the
horizontal padding, defaults to the width of the thumb shape or
overlay shape, whichever is larger.
thumb_size: Option<WidgetStatePropertyRef<Option<Size>>>The size of the HandleThumbShape thumb.
If thumb_shape is HandleThumbShape, this property is used to
set the size of the thumb. Otherwise, the default thumb size is 4 pixels for the
width and 44 pixels for the height.
track_gap: Option<f64>The size of the gap between the active and inactive tracks of the
GappedSliderTrackShape.
If track_shape is GappedSliderTrackShape, this property
is used to set the gap between the active and inactive tracks. Otherwise,
the default gap size is 6.0 pixels.
The Slider defaults to GappedSliderTrackShape when the track shape is
not specified, and the track_gap can be used to adjust the gap
size.
If Slider::year2023 is true or ThemeData::use_material3 is false, then
the Slider track shape defaults to RoundedRectSliderTrackShape and the
track_gap is ignored. In this case, set the track shape to
GappedSliderTrackShape to use the track_gap.
Defaults to 6.0 pixels of gap between the active and inactive tracks.
year2023: Option<bool>Overrides the default value of Slider::year2023 and RangeSlider::year2023.
When true, the Slider and RangeSlider will use the 2023 Material Design 3
appearance. Defaults to true.
If this is set to false, the Slider and RangeSlider will use the latest Material
Design 3 appearance, which was introduced in December 2023.
If ThemeData::use_material3 is false, then this property is ignored.
Deprecated in Flutter after v3.27.0-0.2.pre: set this flag to false to opt into the 2024 slider appearance. Its setter carries the deprecation.
Implementations§
Source§impl SliderThemeData
impl SliderThemeData
Sourcepub fn new() -> SliderThemeData
pub fn new() -> SliderThemeData
Create a SliderThemeData given a set of exact values.
This will rarely be used directly. It is used by lerp to
create intermediate themes based on two themes.
The simplest way to create a SliderThemeData is to use
copy_with on the one you get from SliderTheme::of, or create an
entirely new one with SliderThemeData::from_primary_colors.
Sourcepub fn from_primary_colors(
primary_color: Color,
primary_color_dark: Color,
primary_color_light: Color,
value_indicator_text_style: TextStyle,
) -> SliderThemeData
pub fn from_primary_colors( primary_color: Color, primary_color_dark: Color, primary_color_light: Color, value_indicator_text_style: TextStyle, ) -> SliderThemeData
Generates a SliderThemeData from three main colors.
Usually these are the primary, dark and light colors from
a ThemeData.
The opacities of these colors will be overridden with the Material Design defaults when assigning them to the slider theme component colors.
This is used to generate the default slider theme for a ThemeData.
Sourcepub fn track_height(self, track_height: f64) -> SliderThemeData
pub fn track_height(self, track_height: f64) -> SliderThemeData
Dart SliderThemeData(trackHeight:).
Sourcepub fn active_track_color(self, active_track_color: Color) -> SliderThemeData
pub fn active_track_color(self, active_track_color: Color) -> SliderThemeData
Dart SliderThemeData(activeTrackColor:).
Sourcepub fn inactive_track_color(
self,
inactive_track_color: Color,
) -> SliderThemeData
pub fn inactive_track_color( self, inactive_track_color: Color, ) -> SliderThemeData
Dart SliderThemeData(inactiveTrackColor:).
Sourcepub fn secondary_active_track_color(
self,
secondary_active_track_color: Color,
) -> SliderThemeData
pub fn secondary_active_track_color( self, secondary_active_track_color: Color, ) -> SliderThemeData
Dart SliderThemeData(secondaryActiveTrackColor:).
Sourcepub fn disabled_active_track_color(
self,
disabled_active_track_color: Color,
) -> SliderThemeData
pub fn disabled_active_track_color( self, disabled_active_track_color: Color, ) -> SliderThemeData
Dart SliderThemeData(disabledActiveTrackColor:).
Sourcepub fn disabled_inactive_track_color(
self,
disabled_inactive_track_color: Color,
) -> SliderThemeData
pub fn disabled_inactive_track_color( self, disabled_inactive_track_color: Color, ) -> SliderThemeData
Dart SliderThemeData(disabledInactiveTrackColor:).
Sourcepub fn disabled_secondary_active_track_color(
self,
disabled_secondary_active_track_color: Color,
) -> SliderThemeData
pub fn disabled_secondary_active_track_color( self, disabled_secondary_active_track_color: Color, ) -> SliderThemeData
Dart SliderThemeData(disabledSecondaryActiveTrackColor:).
Sourcepub fn active_tick_mark_color(
self,
active_tick_mark_color: Color,
) -> SliderThemeData
pub fn active_tick_mark_color( self, active_tick_mark_color: Color, ) -> SliderThemeData
Dart SliderThemeData(activeTickMarkColor:).
Sourcepub fn inactive_tick_mark_color(
self,
inactive_tick_mark_color: Color,
) -> SliderThemeData
pub fn inactive_tick_mark_color( self, inactive_tick_mark_color: Color, ) -> SliderThemeData
Dart SliderThemeData(inactiveTickMarkColor:).
Sourcepub fn disabled_active_tick_mark_color(
self,
disabled_active_tick_mark_color: Color,
) -> SliderThemeData
pub fn disabled_active_tick_mark_color( self, disabled_active_tick_mark_color: Color, ) -> SliderThemeData
Dart SliderThemeData(disabledActiveTickMarkColor:).
Sourcepub fn disabled_inactive_tick_mark_color(
self,
disabled_inactive_tick_mark_color: Color,
) -> SliderThemeData
pub fn disabled_inactive_tick_mark_color( self, disabled_inactive_tick_mark_color: Color, ) -> SliderThemeData
Dart SliderThemeData(disabledInactiveTickMarkColor:).
Sourcepub fn thumb_color(self, thumb_color: Color) -> SliderThemeData
pub fn thumb_color(self, thumb_color: Color) -> SliderThemeData
Dart SliderThemeData(thumbColor:).
Sourcepub fn overlapping_shape_stroke_color(
self,
overlapping_shape_stroke_color: Color,
) -> SliderThemeData
pub fn overlapping_shape_stroke_color( self, overlapping_shape_stroke_color: Color, ) -> SliderThemeData
Dart SliderThemeData(overlappingShapeStrokeColor:).
Sourcepub fn disabled_thumb_color(
self,
disabled_thumb_color: Color,
) -> SliderThemeData
pub fn disabled_thumb_color( self, disabled_thumb_color: Color, ) -> SliderThemeData
Dart SliderThemeData(disabledThumbColor:).
Sourcepub fn overlay_color(
self,
overlay_color: impl Into<AnyColor>,
) -> SliderThemeData
pub fn overlay_color( self, overlay_color: impl Into<AnyColor>, ) -> SliderThemeData
Dart SliderThemeData(overlayColor:).
Sourcepub fn value_indicator_color(
self,
value_indicator_color: Color,
) -> SliderThemeData
pub fn value_indicator_color( self, value_indicator_color: Color, ) -> SliderThemeData
Dart SliderThemeData(valueIndicatorColor:).
Sourcepub fn value_indicator_stroke_color(
self,
value_indicator_stroke_color: Color,
) -> SliderThemeData
pub fn value_indicator_stroke_color( self, value_indicator_stroke_color: Color, ) -> SliderThemeData
Dart SliderThemeData(valueIndicatorStrokeColor:).
Sourcepub fn overlay_shape(
self,
overlay_shape: SliderComponentShapeRef,
) -> SliderThemeData
pub fn overlay_shape( self, overlay_shape: SliderComponentShapeRef, ) -> SliderThemeData
Dart SliderThemeData(overlayShape:).
Sourcepub fn tick_mark_shape(
self,
tick_mark_shape: SliderTickMarkShapeRef,
) -> SliderThemeData
pub fn tick_mark_shape( self, tick_mark_shape: SliderTickMarkShapeRef, ) -> SliderThemeData
Dart SliderThemeData(tickMarkShape:).
Sourcepub fn thumb_shape(
self,
thumb_shape: SliderComponentShapeRef,
) -> SliderThemeData
pub fn thumb_shape( self, thumb_shape: SliderComponentShapeRef, ) -> SliderThemeData
Dart SliderThemeData(thumbShape:).
Sourcepub fn track_shape(self, track_shape: SliderTrackShapeRef) -> SliderThemeData
pub fn track_shape(self, track_shape: SliderTrackShapeRef) -> SliderThemeData
Dart SliderThemeData(trackShape:).
Sourcepub fn value_indicator_shape(
self,
value_indicator_shape: SliderComponentShapeRef,
) -> SliderThemeData
pub fn value_indicator_shape( self, value_indicator_shape: SliderComponentShapeRef, ) -> SliderThemeData
Dart SliderThemeData(valueIndicatorShape:).
Sourcepub fn range_tick_mark_shape(
self,
range_tick_mark_shape: RangeSliderTickMarkShapeRef,
) -> SliderThemeData
pub fn range_tick_mark_shape( self, range_tick_mark_shape: RangeSliderTickMarkShapeRef, ) -> SliderThemeData
Dart SliderThemeData(rangeTickMarkShape:).
Sourcepub fn range_thumb_shape(
self,
range_thumb_shape: RangeSliderThumbShapeRef,
) -> SliderThemeData
pub fn range_thumb_shape( self, range_thumb_shape: RangeSliderThumbShapeRef, ) -> SliderThemeData
Dart SliderThemeData(rangeThumbShape:).
Sourcepub fn range_track_shape(
self,
range_track_shape: RangeSliderTrackShapeRef,
) -> SliderThemeData
pub fn range_track_shape( self, range_track_shape: RangeSliderTrackShapeRef, ) -> SliderThemeData
Dart SliderThemeData(rangeTrackShape:).
Sourcepub fn range_value_indicator_shape(
self,
range_value_indicator_shape: RangeSliderValueIndicatorShapeRef,
) -> SliderThemeData
pub fn range_value_indicator_shape( self, range_value_indicator_shape: RangeSliderValueIndicatorShapeRef, ) -> SliderThemeData
Dart SliderThemeData(rangeValueIndicatorShape:).
Sourcepub fn show_value_indicator(
self,
show_value_indicator: ShowValueIndicator,
) -> SliderThemeData
pub fn show_value_indicator( self, show_value_indicator: ShowValueIndicator, ) -> SliderThemeData
Dart SliderThemeData(showValueIndicator:).
Sourcepub fn value_indicator_text_style(
self,
value_indicator_text_style: TextStyle,
) -> SliderThemeData
pub fn value_indicator_text_style( self, value_indicator_text_style: TextStyle, ) -> SliderThemeData
Dart SliderThemeData(valueIndicatorTextStyle:).
Sourcepub fn min_thumb_separation(self, min_thumb_separation: f64) -> SliderThemeData
pub fn min_thumb_separation(self, min_thumb_separation: f64) -> SliderThemeData
Dart SliderThemeData(minThumbSeparation:).
Sourcepub fn thumb_selector(
self,
thumb_selector: RangeThumbSelector,
) -> SliderThemeData
pub fn thumb_selector( self, thumb_selector: RangeThumbSelector, ) -> SliderThemeData
Dart SliderThemeData(thumbSelector:).
Sourcepub fn mouse_cursor(
self,
mouse_cursor: WidgetStatePropertyRef<Option<MouseCursorRef>>,
) -> SliderThemeData
pub fn mouse_cursor( self, mouse_cursor: WidgetStatePropertyRef<Option<MouseCursorRef>>, ) -> SliderThemeData
Dart SliderThemeData(mouseCursor:).
Sourcepub fn allowed_interaction(
self,
allowed_interaction: SliderInteraction,
) -> SliderThemeData
pub fn allowed_interaction( self, allowed_interaction: SliderInteraction, ) -> SliderThemeData
Dart SliderThemeData(allowedInteraction:).
Sourcepub fn thumb_size(
self,
thumb_size: WidgetStatePropertyRef<Option<Size>>,
) -> SliderThemeData
pub fn thumb_size( self, thumb_size: WidgetStatePropertyRef<Option<Size>>, ) -> SliderThemeData
Dart SliderThemeData(thumbSize:).
Sourcepub fn track_gap(self, track_gap: f64) -> SliderThemeData
pub fn track_gap(self, track_gap: f64) -> SliderThemeData
Dart SliderThemeData(trackGap:).
Sourcepub fn padding(self, padding: impl Into<EdgeInsetsGeometry>) -> SliderThemeData
pub fn padding(self, padding: impl Into<EdgeInsetsGeometry>) -> SliderThemeData
Dart SliderThemeData(padding:).
Sourcepub fn year2023(self, year2023: bool) -> SliderThemeData
👎Deprecated: Set this flag to false to opt into the 2024 slider appearance. Defaults to true. In the future, this flag will default to false. Use SliderThemeData to customize individual properties. This feature was deprecated after v3.27.0-0.2.pre.
pub fn year2023(self, year2023: bool) -> SliderThemeData
Set this flag to false to opt into the 2024 slider appearance. Defaults to true. In the future, this flag will default to false. Use SliderThemeData to customize individual properties. This feature was deprecated after v3.27.0-0.2.pre.
Dart SliderThemeData(year2023:).
Sourcepub fn copy_with(&self) -> SliderThemeData
pub fn copy_with(&self) -> SliderThemeData
Creates a copy of this object but with the given fields replaced with the new values.
Dart’s named arguments are the fluent setters on the copy
(data.copy_with().track_height(4.0)).
Sourcepub fn lerp(a: &SliderThemeData, b: &SliderThemeData, t: f64) -> SliderThemeData
pub fn lerp(a: &SliderThemeData, b: &SliderThemeData, t: f64) -> SliderThemeData
Linearly interpolate between two slider themes.
{@macro dart.ui.shadow.lerp}
Trait Implementations§
Source§impl Clone for SliderThemeData
impl Clone for SliderThemeData
Source§impl Debug for SliderThemeData
impl Debug for SliderThemeData
Source§impl Default for SliderThemeData
impl Default for SliderThemeData
Source§impl Diagnosticable for SliderThemeData
impl Diagnosticable for SliderThemeData
Source§fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
Source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
Object.runtimeType as diagnostics print it: the last segment of
the Rust type path, without generic arguments.Source§fn identity_hash(&self) -> u64
fn identity_hash(&self) -> u64
Object.hashCode as diagnostics print it: the object’s address.Source§fn to_string_short(&self) -> String
fn to_string_short(&self) -> String
Source§fn to_diagnostics_node(&self) -> DiagnosticableNode
fn to_diagnostics_node(&self) -> DiagnosticableNode
DiagnosticsNode::to_string_deep.Source§fn to_diagnostics_node_with(
&self,
name: Option<String>,
style: Option<DiagnosticsTreeStyle>,
) -> DiagnosticableNode
fn to_diagnostics_node_with( &self, name: Option<String>, style: Option<DiagnosticsTreeStyle>, ) -> DiagnosticableNode
toDiagnosticsNode(name:, style:).Source§fn to_string(&self) -> String
fn to_string(&self) -> String
toString: a single-line description with properties and no
children. Read moreSource§fn to_string_at(&self, min_level: DiagnosticLevel) -> String
fn to_string_at(&self, min_level: DiagnosticLevel) -> String
toString(minLevel:).Source§impl Display for SliderThemeData
impl Display for SliderThemeData
Source§impl PartialEq for SliderThemeData
impl PartialEq for SliderThemeData
Source§impl SliderThemeDataGetters for SliderThemeData
impl SliderThemeDataGetters for SliderThemeData
Source§fn slider_theme_data(&self) -> &SliderThemeData
fn slider_theme_data(&self) -> &SliderThemeData
super(...)
arguments a defaults struct keeps.Source§fn active_track_color(&self, app: &mut App) -> Option<Color>
fn active_track_color(&self, app: &mut App) -> Option<Color>
active_track_color getter.Source§fn inactive_track_color(&self, app: &mut App) -> Option<Color>
fn inactive_track_color(&self, app: &mut App) -> Option<Color>
inactive_track_color getter.Source§fn secondary_active_track_color(&self, app: &mut App) -> Option<Color>
fn secondary_active_track_color(&self, app: &mut App) -> Option<Color>
secondary_active_track_color getter.Source§fn disabled_active_track_color(&self, app: &mut App) -> Option<Color>
fn disabled_active_track_color(&self, app: &mut App) -> Option<Color>
disabled_active_track_color getter.Source§fn disabled_secondary_active_track_color(&self, app: &mut App) -> Option<Color>
fn disabled_secondary_active_track_color(&self, app: &mut App) -> Option<Color>
disabled_secondary_active_track_color getter.Source§fn disabled_inactive_track_color(&self, app: &mut App) -> Option<Color>
fn disabled_inactive_track_color(&self, app: &mut App) -> Option<Color>
disabled_inactive_track_color getter.Source§fn active_tick_mark_color(&self, app: &mut App) -> Option<Color>
fn active_tick_mark_color(&self, app: &mut App) -> Option<Color>
active_tick_mark_color getter.Source§fn inactive_tick_mark_color(&self, app: &mut App) -> Option<Color>
fn inactive_tick_mark_color(&self, app: &mut App) -> Option<Color>
inactive_tick_mark_color getter.Source§fn disabled_active_tick_mark_color(&self, app: &mut App) -> Option<Color>
fn disabled_active_tick_mark_color(&self, app: &mut App) -> Option<Color>
disabled_active_tick_mark_color getter.Source§fn disabled_inactive_tick_mark_color(&self, app: &mut App) -> Option<Color>
fn disabled_inactive_tick_mark_color(&self, app: &mut App) -> Option<Color>
disabled_inactive_tick_mark_color getter.Source§fn overlapping_shape_stroke_color(&self, app: &mut App) -> Option<Color>
fn overlapping_shape_stroke_color(&self, app: &mut App) -> Option<Color>
overlapping_shape_stroke_color getter.Source§fn disabled_thumb_color(&self, app: &mut App) -> Option<Color>
fn disabled_thumb_color(&self, app: &mut App) -> Option<Color>
disabled_thumb_color getter.Source§fn value_indicator_color(&self, app: &mut App) -> Option<Color>
fn value_indicator_color(&self, app: &mut App) -> Option<Color>
value_indicator_color getter.Source§fn value_indicator_stroke_color(&self, app: &mut App) -> Option<Color>
fn value_indicator_stroke_color(&self, app: &mut App) -> Option<Color>
value_indicator_stroke_color getter.Source§fn overlay_shape(&self, app: &mut App) -> Option<SliderComponentShapeRef>
fn overlay_shape(&self, app: &mut App) -> Option<SliderComponentShapeRef>
overlay_shape getter.Source§fn tick_mark_shape(&self, app: &mut App) -> Option<SliderTickMarkShapeRef>
fn tick_mark_shape(&self, app: &mut App) -> Option<SliderTickMarkShapeRef>
tick_mark_shape getter.Source§fn thumb_shape(&self, app: &mut App) -> Option<SliderComponentShapeRef>
fn thumb_shape(&self, app: &mut App) -> Option<SliderComponentShapeRef>
thumb_shape getter.Source§fn track_shape(&self, app: &mut App) -> Option<SliderTrackShapeRef>
fn track_shape(&self, app: &mut App) -> Option<SliderTrackShapeRef>
track_shape getter.Source§fn value_indicator_shape(
&self,
app: &mut App,
) -> Option<SliderComponentShapeRef>
fn value_indicator_shape( &self, app: &mut App, ) -> Option<SliderComponentShapeRef>
value_indicator_shape getter.Source§fn range_tick_mark_shape(
&self,
app: &mut App,
) -> Option<RangeSliderTickMarkShapeRef>
fn range_tick_mark_shape( &self, app: &mut App, ) -> Option<RangeSliderTickMarkShapeRef>
range_tick_mark_shape getter.Source§fn range_thumb_shape(&self, app: &mut App) -> Option<RangeSliderThumbShapeRef>
fn range_thumb_shape(&self, app: &mut App) -> Option<RangeSliderThumbShapeRef>
range_thumb_shape getter.Source§fn range_track_shape(&self, app: &mut App) -> Option<RangeSliderTrackShapeRef>
fn range_track_shape(&self, app: &mut App) -> Option<RangeSliderTrackShapeRef>
range_track_shape getter.Source§fn range_value_indicator_shape(
&self,
app: &mut App,
) -> Option<RangeSliderValueIndicatorShapeRef>
fn range_value_indicator_shape( &self, app: &mut App, ) -> Option<RangeSliderValueIndicatorShapeRef>
range_value_indicator_shape getter.Source§fn show_value_indicator(&self, app: &mut App) -> Option<ShowValueIndicator>
fn show_value_indicator(&self, app: &mut App) -> Option<ShowValueIndicator>
show_value_indicator getter.Source§fn value_indicator_text_style(&self, app: &mut App) -> Option<TextStyle>
fn value_indicator_text_style(&self, app: &mut App) -> Option<TextStyle>
value_indicator_text_style getter.Source§fn min_thumb_separation(&self, app: &mut App) -> Option<f64>
fn min_thumb_separation(&self, app: &mut App) -> Option<f64>
min_thumb_separation getter.Source§fn thumb_selector(&self, app: &mut App) -> Option<RangeThumbSelector>
fn thumb_selector(&self, app: &mut App) -> Option<RangeThumbSelector>
thumb_selector getter.Source§fn mouse_cursor(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>
fn mouse_cursor( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>
mouse_cursor getter.Source§fn allowed_interaction(&self, app: &mut App) -> Option<SliderInteraction>
fn allowed_interaction(&self, app: &mut App) -> Option<SliderInteraction>
allowed_interaction getter.Source§fn thumb_size(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<Size>>>
fn thumb_size( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<Size>>>
thumb_size getter.Source§fn copy_with(&self, app: &mut App) -> SliderThemeData
fn copy_with(&self, app: &mut App) -> SliderThemeData
copyWith() with no arguments: a plain value holding what every getter
answers, for the caller’s setters to change.