pub trait BaseRangeSliderTrackShape {
// Provided method
fn get_preferred_rect(
&self,
app: &App,
parent_box: AnyRenderBox,
offset: Offset,
slider_theme: &SliderThemeData,
is_enabled: Option<bool>,
is_discrete: Option<bool>,
) -> Rect { ... }
}Expand description
Base range slider track shape that provides an implementation of
get_preferred_rect for default sizing.
The height is set from SliderThemeData::track_height and the width of the
parent box less the larger of the widths of SliderThemeData::range_thumb_shape and
SliderThemeData::overlay_shape.
A track that mixes it in calls this body from its RangeSliderTrackShape method.
See also:
RectangularRangeSliderTrackShape, which is a track shape with sharp rectangular edges
Provided Methods§
Sourcefn get_preferred_rect(
&self,
app: &App,
parent_box: AnyRenderBox,
offset: Offset,
slider_theme: &SliderThemeData,
is_enabled: Option<bool>,
is_discrete: Option<bool>,
) -> Rect
fn get_preferred_rect( &self, app: &App, parent_box: AnyRenderBox, offset: Offset, slider_theme: &SliderThemeData, is_enabled: Option<bool>, is_discrete: Option<bool>, ) -> Rect
Returns a rect that represents the track bounds that fits within the
Slider.
The width is the width of the RangeSlider, but padded by the max
of the overlay and thumb radius. The height is defined by the
SliderThemeData::track_height.
The Rect is centered both horizontally and vertically within the slider
bounds.
None for is_enabled or is_discrete is Dart’s default, false.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".