pub struct RectangularSliderValueIndicatorShape;Expand description
The default shape of a 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 RectangularSliderValueIndicatorShape
impl RectangularSliderValueIndicatorShape
Sourcepub const fn new() -> RectangularSliderValueIndicatorShape
pub const fn new() -> RectangularSliderValueIndicatorShape
Create a slider value indicator that resembles a rectangular tooltip.
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 RectangularSliderValueIndicatorShape
Source§impl SliderComponentShape for RectangularSliderValueIndicatorShape
impl SliderComponentShape for RectangularSliderValueIndicatorShape
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 RectangularSliderValueIndicatorShape
Auto Trait Implementations§
impl Forget for RectangularSliderValueIndicatorShape
impl Freeze for RectangularSliderValueIndicatorShape
impl Move for RectangularSliderValueIndicatorShape
impl RefUnwindSafe for RectangularSliderValueIndicatorShape
impl Send for RectangularSliderValueIndicatorShape
impl Sync for RectangularSliderValueIndicatorShape
impl Unpin for RectangularSliderValueIndicatorShape
impl UnsafeUnpin for RectangularSliderValueIndicatorShape
impl UnwindSafe for RectangularSliderValueIndicatorShape
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