pub struct RoundSliderThumbShape {
pub enabled_thumb_radius: f64,
pub disabled_thumb_radius: Option<f64>,
pub elevation: f64,
pub pressed_elevation: f64,
}Expand description
The default shape of a Slider’s thumb.
There is a shadow for the resting, pressed, hovered, and focused state.
See also:
Slider, which includes a thumb defined by this shape.SliderTheme, which can be used to configure the thumb shape of all sliders in a widget subtree.
Fields§
§enabled_thumb_radius: f64The preferred radius of the round thumb shape when the slider is enabled.
If it is not provided, then the Material Design default of 10 is used.
disabled_thumb_radius: Option<f64>The preferred radius of the round thumb shape when the slider is disabled.
If no disabledRadius is provided, then it is equal to the
enabled_thumb_radius
elevation: f64The resting elevation adds shadow to the unpressed thumb.
The default is 1.
Use 0 for no shadow. The higher the value, the larger the shadow. For example, a value of 12 will create a very large shadow.
pressed_elevation: f64The pressed elevation adds shadow to the pressed thumb.
The default is 6.
Use 0 for no shadow. The higher the value, the larger the shadow. For example, a value of 12 will create a very large shadow.
Implementations§
Source§impl RoundSliderThumbShape
impl RoundSliderThumbShape
Sourcepub const fn new() -> RoundSliderThumbShape
pub const fn new() -> RoundSliderThumbShape
Create a slider thumb that draws a circle.
Sourcepub const fn enabled_thumb_radius(
self,
enabled_thumb_radius: f64,
) -> RoundSliderThumbShape
pub const fn enabled_thumb_radius( self, enabled_thumb_radius: f64, ) -> RoundSliderThumbShape
Dart RoundSliderThumbShape(enabledThumbRadius:).
Sourcepub const fn disabled_thumb_radius(
self,
disabled_thumb_radius: f64,
) -> RoundSliderThumbShape
pub const fn disabled_thumb_radius( self, disabled_thumb_radius: f64, ) -> RoundSliderThumbShape
Dart RoundSliderThumbShape(disabledThumbRadius:).
Sourcepub const fn elevation(self, elevation: f64) -> RoundSliderThumbShape
pub const fn elevation(self, elevation: f64) -> RoundSliderThumbShape
Dart RoundSliderThumbShape(elevation:).
Sourcepub const fn pressed_elevation(
self,
pressed_elevation: f64,
) -> RoundSliderThumbShape
pub const fn pressed_elevation( self, pressed_elevation: f64, ) -> RoundSliderThumbShape
Dart RoundSliderThumbShape(pressedElevation:).
Trait Implementations§
Source§impl Clone for RoundSliderThumbShape
impl Clone for RoundSliderThumbShape
impl Copy for RoundSliderThumbShape
Source§impl Debug for RoundSliderThumbShape
impl Debug for RoundSliderThumbShape
Source§impl Default for RoundSliderThumbShape
impl Default for RoundSliderThumbShape
Source§fn default() -> RoundSliderThumbShape
fn default() -> RoundSliderThumbShape
Source§impl PartialEq for RoundSliderThumbShape
impl PartialEq for RoundSliderThumbShape
Source§impl SliderComponentShape for RoundSliderThumbShape
impl SliderComponentShape for RoundSliderThumbShape
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.