pub struct RoundSliderOverlayShape {
pub overlay_radius: f64,
}Expand description
The default shape of a Slider’s thumb overlay.
The shape of the overlay is a circle with the same center as the thumb, but with a larger radius. It animates to full size when the thumb is pressed, and animates back down to size 0 when it is released. It is painted behind the thumb, and is expected to extend beyond the bounds of the thumb so that it is visible.
The overlay color is defined by SliderThemeData::overlay_color.
See also:
Slider, which includes an overlay defined by this shape.SliderTheme, which can be used to configure the overlay shape of all sliders in a widget subtree.
Fields§
§overlay_radius: f64The preferred radius of the round thumb shape when enabled.
If it is not provided, then half of the SliderThemeData::track_height is
used.
Implementations§
Source§impl RoundSliderOverlayShape
impl RoundSliderOverlayShape
Sourcepub const fn new() -> RoundSliderOverlayShape
pub const fn new() -> RoundSliderOverlayShape
Create a slider thumb overlay that draws a circle.
Sourcepub const fn overlay_radius(
self,
overlay_radius: f64,
) -> RoundSliderOverlayShape
pub const fn overlay_radius( self, overlay_radius: f64, ) -> RoundSliderOverlayShape
Dart RoundSliderOverlayShape(overlayRadius:).
Trait Implementations§
Source§impl Clone for RoundSliderOverlayShape
impl Clone for RoundSliderOverlayShape
impl Copy for RoundSliderOverlayShape
Source§impl Debug for RoundSliderOverlayShape
impl Debug for RoundSliderOverlayShape
Source§impl Default for RoundSliderOverlayShape
impl Default for RoundSliderOverlayShape
Source§fn default() -> RoundSliderOverlayShape
fn default() -> RoundSliderOverlayShape
Returns the “default value” for a type. Read more
Source§impl PartialEq for RoundSliderOverlayShape
impl PartialEq for RoundSliderOverlayShape
Source§impl SliderComponentShape for RoundSliderOverlayShape
impl SliderComponentShape for RoundSliderOverlayShape
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 RoundSliderOverlayShape
Auto Trait Implementations§
impl Forget for RoundSliderOverlayShape
impl Freeze for RoundSliderOverlayShape
impl Move for RoundSliderOverlayShape
impl RefUnwindSafe for RoundSliderOverlayShape
impl Send for RoundSliderOverlayShape
impl Sync for RoundSliderOverlayShape
impl Unpin for RoundSliderOverlayShape
impl UnsafeUnpin for RoundSliderOverlayShape
impl UnwindSafe for RoundSliderOverlayShape
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