pub struct DropSliderValueIndicatorShape;Expand description
The default shape of a Material 3 Slider’s value indicator.
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 DropSliderValueIndicatorShape
impl DropSliderValueIndicatorShape
Sourcepub const fn new() -> DropSliderValueIndicatorShape
pub const fn new() -> DropSliderValueIndicatorShape
Create a slider value indicator that resembles a drop shape.
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 DropSliderValueIndicatorShape
Source§impl SliderComponentShape for DropSliderValueIndicatorShape
impl SliderComponentShape for DropSliderValueIndicatorShape
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.
Source§fn get_preferred_size(&self, is_enabled: bool, is_discrete: bool) -> Size
fn get_preferred_size(&self, is_enabled: bool, is_discrete: bool) -> Size
Returns the preferred size of the shape, based on the given conditions.
Source§fn paint(
&self,
app: &mut App,
context: &mut PaintingContext,
center: Offset,
activation_animation: AnyAnimation<f64>,
_enable_animation: AnyAnimation<f64>,
_is_discrete: bool,
label_painter: &mut TextPainter,
parent_box: AnyRenderBox,
slider_theme: &SliderThemeData,
_text_direction: TextDirection,
_value: f64,
text_scale_factor: f64,
size_with_overflow: Size,
)
fn paint( &self, app: &mut App, context: &mut PaintingContext, center: Offset, activation_animation: AnyAnimation<f64>, _enable_animation: AnyAnimation<f64>, _is_discrete: bool, label_painter: &mut TextPainter, parent_box: AnyRenderBox, slider_theme: &SliderThemeData, _text_direction: TextDirection, _value: f64, text_scale_factor: f64, size_with_overflow: Size, )
Paints the shape, taking into account the state passed to it. Read more
impl StructuralPartialEq for DropSliderValueIndicatorShape
Auto Trait Implementations§
impl Forget for DropSliderValueIndicatorShape
impl Freeze for DropSliderValueIndicatorShape
impl Move for DropSliderValueIndicatorShape
impl RefUnwindSafe for DropSliderValueIndicatorShape
impl Send for DropSliderValueIndicatorShape
impl Sync for DropSliderValueIndicatorShape
impl Unpin for DropSliderValueIndicatorShape
impl UnsafeUnpin for DropSliderValueIndicatorShape
impl UnwindSafe for DropSliderValueIndicatorShape
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more