pub struct ScrollbarThemeData {
pub thumb_visibility: Option<WidgetStatePropertyRef<Option<bool>>>,
pub thickness: Option<WidgetStatePropertyRef<Option<f64>>>,
pub track_visibility: Option<WidgetStatePropertyRef<Option<bool>>>,
pub interactive: Option<bool>,
pub radius: Option<Radius>,
pub thumb_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub track_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub track_border_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub cross_axis_margin: Option<f64>,
pub main_axis_margin: Option<f64>,
pub min_thumb_length: Option<f64>,
}Expand description
Defines default property values for descendant Scrollbar widgets.
Descendant widgets obtain the current ScrollbarThemeData object with
ScrollbarTheme::of. Instances of ScrollbarThemeData can be
customized with ScrollbarThemeData::copy_with.
Typically the ScrollbarThemeData of a ScrollbarTheme is specified as
part of the overall Theme with ThemeData::scrollbar_theme.
All ScrollbarThemeData properties are None by default. When None, the
Scrollbar computes its own default values, typically based on the overall
theme’s ThemeData::color_scheme.
See also:
ThemeData, which describes the overall theme information for the application.
Fields§
§thumb_visibility: Option<WidgetStatePropertyRef<Option<bool>>>Overrides the default value of Scrollbar::thumb_visibility in all
descendant Scrollbar widgets.
thickness: Option<WidgetStatePropertyRef<Option<f64>>>Overrides the default value of Scrollbar::thickness in all
descendant Scrollbar widgets.
Resolves in the following states:
WidgetState::Hoveredon web and desktop platforms.
track_visibility: Option<WidgetStatePropertyRef<Option<bool>>>Overrides the default value of Scrollbar::track_visibility in all
descendant Scrollbar widgets.
interactive: Option<bool>Overrides the default value of Scrollbar::interactive in all
descendant Scrollbar widgets.
radius: Option<Radius>Overrides the default value of Scrollbar::radius in all
descendant widgets.
thumb_color: Option<WidgetStatePropertyRef<Option<Color>>>Overrides the default Color of the Scrollbar thumb in all descendant
Scrollbar widgets.
Resolves in the following states:
WidgetState::Dragged.WidgetState::Hoveredon web and desktop platforms.
track_color: Option<WidgetStatePropertyRef<Option<Color>>>Overrides the default Color of the Scrollbar track when
track_visibility is true in all descendant Scrollbar
widgets.
Resolves in the following states:
WidgetState::Hoveredon web and desktop platforms.
track_border_color: Option<WidgetStatePropertyRef<Option<Color>>>Overrides the default Color of the Scrollbar track border when
track_visibility is true in all descendant Scrollbar
widgets.
Resolves in the following states:
WidgetState::Hoveredon web and desktop platforms.
cross_axis_margin: Option<f64>Overrides the default value of the ScrollbarPainter::cross_axis_margin
property in all descendant Scrollbar widgets.
See also:
ScrollbarPainter::cross_axis_margin, which sets the distance from the scrollbar’s side to the nearest edge in logical pixels.
main_axis_margin: Option<f64>Overrides the default value of the ScrollbarPainter::main_axis_margin
property in all descendant Scrollbar widgets.
See also:
ScrollbarPainter::main_axis_margin, which sets the distance from the scrollbar’s start and end to the edge of the viewport in logical pixels.
min_thumb_length: Option<f64>Overrides the default value of the ScrollbarPainter::min_length
property in all descendant Scrollbar widgets.
See also:
ScrollbarPainter::min_length, which sets the preferred smallest size the scrollbar can shrink to when the total scrollable extent is large, the current visible viewport is small, and the viewport is not overscrolled.
Implementations§
Source§impl ScrollbarThemeData
impl ScrollbarThemeData
Sourcepub fn new() -> ScrollbarThemeData
pub fn new() -> ScrollbarThemeData
Creates a theme that can be used for ThemeData::scrollbar_theme; Dart’s optional
named arguments are the fluent setters.
Sourcepub fn thumb_visibility(
self,
thumb_visibility: WidgetStatePropertyRef<Option<bool>>,
) -> ScrollbarThemeData
pub fn thumb_visibility( self, thumb_visibility: WidgetStatePropertyRef<Option<bool>>, ) -> ScrollbarThemeData
Dart ScrollbarThemeData(thumbVisibility:).
Sourcepub fn thickness(
self,
thickness: WidgetStatePropertyRef<Option<f64>>,
) -> ScrollbarThemeData
pub fn thickness( self, thickness: WidgetStatePropertyRef<Option<f64>>, ) -> ScrollbarThemeData
Dart ScrollbarThemeData(thickness:).
Sourcepub fn track_visibility(
self,
track_visibility: WidgetStatePropertyRef<Option<bool>>,
) -> ScrollbarThemeData
pub fn track_visibility( self, track_visibility: WidgetStatePropertyRef<Option<bool>>, ) -> ScrollbarThemeData
Dart ScrollbarThemeData(trackVisibility:).
Sourcepub fn radius(self, radius: Radius) -> ScrollbarThemeData
pub fn radius(self, radius: Radius) -> ScrollbarThemeData
Dart ScrollbarThemeData(radius:).
Sourcepub fn thumb_color(
self,
thumb_color: WidgetStatePropertyRef<Option<Color>>,
) -> ScrollbarThemeData
pub fn thumb_color( self, thumb_color: WidgetStatePropertyRef<Option<Color>>, ) -> ScrollbarThemeData
Dart ScrollbarThemeData(thumbColor:).
Sourcepub fn track_color(
self,
track_color: WidgetStatePropertyRef<Option<Color>>,
) -> ScrollbarThemeData
pub fn track_color( self, track_color: WidgetStatePropertyRef<Option<Color>>, ) -> ScrollbarThemeData
Dart ScrollbarThemeData(trackColor:).
Sourcepub fn track_border_color(
self,
track_border_color: WidgetStatePropertyRef<Option<Color>>,
) -> ScrollbarThemeData
pub fn track_border_color( self, track_border_color: WidgetStatePropertyRef<Option<Color>>, ) -> ScrollbarThemeData
Dart ScrollbarThemeData(trackBorderColor:).
Sourcepub fn cross_axis_margin(self, cross_axis_margin: f64) -> ScrollbarThemeData
pub fn cross_axis_margin(self, cross_axis_margin: f64) -> ScrollbarThemeData
Dart ScrollbarThemeData(crossAxisMargin:).
Sourcepub fn main_axis_margin(self, main_axis_margin: f64) -> ScrollbarThemeData
pub fn main_axis_margin(self, main_axis_margin: f64) -> ScrollbarThemeData
Dart ScrollbarThemeData(mainAxisMargin:).
Sourcepub fn min_thumb_length(self, min_thumb_length: f64) -> ScrollbarThemeData
pub fn min_thumb_length(self, min_thumb_length: f64) -> ScrollbarThemeData
Dart ScrollbarThemeData(minThumbLength:).
Sourcepub fn interactive(self, interactive: bool) -> ScrollbarThemeData
pub fn interactive(self, interactive: bool) -> ScrollbarThemeData
Dart ScrollbarThemeData(interactive:).
Sourcepub fn copy_with(&self) -> ScrollbarThemeData
pub fn copy_with(&self) -> ScrollbarThemeData
Creates a copy of this object with the given fields replaced with the new values.
Dart’s named arguments are the fluent setters on the copy
(data.copy_with().interactive(false)).
Sourcepub fn lerp(
a: Option<&ScrollbarThemeData>,
b: Option<&ScrollbarThemeData>,
t: f64,
) -> ScrollbarThemeData
pub fn lerp( a: Option<&ScrollbarThemeData>, b: Option<&ScrollbarThemeData>, t: f64, ) -> ScrollbarThemeData
Linearly interpolate between two Scrollbar themes.
{@macro dart.ui.shadow.lerp}
Trait Implementations§
Source§impl Clone for ScrollbarThemeData
impl Clone for ScrollbarThemeData
Source§impl Debug for ScrollbarThemeData
impl Debug for ScrollbarThemeData
Source§impl Default for ScrollbarThemeData
impl Default for ScrollbarThemeData
Source§impl Diagnosticable for ScrollbarThemeData
impl Diagnosticable for ScrollbarThemeData
Source§fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)
Source§fn type_name(&self) -> &'static str
fn type_name(&self) -> &'static str
Object.runtimeType as diagnostics print it: the last segment of
the Rust type path, without generic arguments.Source§fn identity_hash(&self) -> u64
fn identity_hash(&self) -> u64
Object.hashCode as diagnostics print it: the object’s address.Source§fn to_string_short(&self) -> String
fn to_string_short(&self) -> String
Source§fn to_diagnostics_node(&self) -> DiagnosticableNode
fn to_diagnostics_node(&self) -> DiagnosticableNode
DiagnosticsNode::to_string_deep.Source§fn to_diagnostics_node_with(
&self,
name: Option<String>,
style: Option<DiagnosticsTreeStyle>,
) -> DiagnosticableNode
fn to_diagnostics_node_with( &self, name: Option<String>, style: Option<DiagnosticsTreeStyle>, ) -> DiagnosticableNode
toDiagnosticsNode(name:, style:).Source§fn to_string(&self) -> String
fn to_string(&self) -> String
toString: a single-line description with properties and no
children. Read moreSource§fn to_string_at(&self, min_level: DiagnosticLevel) -> String
fn to_string_at(&self, min_level: DiagnosticLevel) -> String
toString(minLevel:).