pub struct RoundedRectSliderValueIndicatorShape;Expand description
The rounded rectangle shape of a Slider’s value indicator.
If the SliderThemeData::value_indicator_color is null, then the shape uses the
ColorScheme::inverse_surface color to draw the value indicator.
If the SliderThemeData::value_indicator_text_style is null, then the indicator label
text style defaults to TextTheme::label_medium with the color set to
ColorScheme::on_inverse_surface. If the ThemeData::use_material3 is set to false, then
the indicator label text style defaults to TextTheme::body_large with the color set to
ColorScheme::on_inverse_surface.
If the SliderThemeData::value_indicator_stroke_color is provided, then the value
indicator is drawn with a stroke border with the color provided.
This is the default value indicator shape for Slider. If ThemeData::use_material3 is
false, then the default value indicator shape is RectangularSliderValueIndicatorShape.
See also:
Slider, which includes a value indicator defined by this shape.SliderTheme, which can be used to configure the slider value indicator of all sliders in a widget subtree.
Implementations§
Source§impl RoundedRectSliderValueIndicatorShape
impl RoundedRectSliderValueIndicatorShape
Sourcepub const fn new() -> RoundedRectSliderValueIndicatorShape
pub const fn new() -> RoundedRectSliderValueIndicatorShape
Create a slider value indicator that resembles a rounded rectangle.
Sourcepub fn get_preferred_size(
&self,
_is_enabled: bool,
_is_discrete: bool,
label_painter: Option<&TextPainter>,
text_scale_factor: Option<f64>,
) -> Size
pub fn get_preferred_size( &self, _is_enabled: bool, _is_discrete: bool, label_painter: Option<&TextPainter>, text_scale_factor: Option<f64>, ) -> Size
Dart’s getPreferredSize with its optional labelPainter and textScaleFactor,
which this shape needs.
Trait Implementations§
impl Copy for RoundedRectSliderValueIndicatorShape
Source§impl SliderComponentShape for RoundedRectSliderValueIndicatorShape
impl SliderComponentShape for RoundedRectSliderValueIndicatorShape
Source§fn eq_shape(&self, other: &dyn SliderComponentShape) -> bool
fn eq_shape(&self, other: &dyn SliderComponentShape) -> bool
Value equality, as Dart’s canonicalized const instances are identical.