pub struct RadioThemeData {
pub mouse_cursor: Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>,
pub fill_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub overlay_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub splash_radius: Option<f64>,
pub material_tap_target_size: Option<MaterialTapTargetSize>,
pub visual_density: Option<VisualDensity>,
pub background_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub side: Option<AnyBorderSide>,
pub inner_radius: Option<WidgetStatePropertyRef<Option<f64>>>,
}Expand description
Defines default property values for descendant Radio widgets.
Descendant widgets obtain the current RadioThemeData object using
RadioTheme::of. Instances of RadioThemeData can be customized
with RadioThemeData::copy_with.
Typically a RadioThemeData is specified as part of the overall Theme
with ThemeData::radio_theme.
All RadioThemeData properties are None by default. When None, the
Radio will use the values from ThemeData if they exist, otherwise it
will provide its own defaults based on the overall Theme’s color_scheme.
See the individual Radio properties for details.
See also:
ThemeData, which describes the overall theme information for the application.RadioTheme, which is used by descendants to obtain theRadioThemeData.
Fields§
§mouse_cursor: Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>The cursor for a mouse pointer when it enters or is hovering over the widget.
If specified, overrides the default value of Radio::mouse_cursor. The
default value is WidgetStateMouseCursor::clickable.
fill_color: Option<WidgetStatePropertyRef<Option<Color>>>The color that fills the radio button, in all WidgetStates.
If specified, overrides the default value of Radio::fill_color.
overlay_color: Option<WidgetStatePropertyRef<Option<Color>>>The color for the radio’s Material.
If specified, overrides the default value of Radio::overlay_color.
splash_radius: Option<f64>The splash radius of the circular Material ink response.
If specified, overrides the default value of Radio::splash_radius. The
default value is K_RADIAL_REACTION_RADIUS.
material_tap_target_size: Option<MaterialTapTargetSize>Configures the minimum size of the tap target.
If specified, overrides the default value of
Radio::material_tap_target_size. The default value is the value of
ThemeData::material_tap_target_size.
visual_density: Option<VisualDensity>Defines how compact the radio’s layout will be.
If specified, overrides the default value of Radio::visual_density. The
default value is the value of ThemeData::visual_density.
background_color: Option<WidgetStatePropertyRef<Option<Color>>>The color of the background of the radio button, in all WidgetStates.
If specified, overrides the default value of Radio::background_color. The
default value is transparent in all states.
side: Option<AnyBorderSide>The side for the circular border of the radio button, in all
WidgetStates.
If specified, overrides the default value of Radio::side. The default
value is a border using the fill color.
inner_radius: Option<WidgetStatePropertyRef<Option<f64>>>The radius of the inner circle of the radio button, in all WidgetStates.
If specified, overrides the default value of Radio::inner_radius. The
default value is 4.5 in all states.
Implementations§
Source§impl RadioThemeData
impl RadioThemeData
Sourcepub fn new() -> RadioThemeData
pub fn new() -> RadioThemeData
Creates a theme that can be used for ThemeData::radio_theme.
Sourcepub fn mouse_cursor(
self,
mouse_cursor: WidgetStatePropertyRef<Option<MouseCursorRef>>,
) -> RadioThemeData
pub fn mouse_cursor( self, mouse_cursor: WidgetStatePropertyRef<Option<MouseCursorRef>>, ) -> RadioThemeData
Dart RadioThemeData(mouseCursor:).
Sourcepub fn fill_color(
self,
fill_color: WidgetStatePropertyRef<Option<Color>>,
) -> RadioThemeData
pub fn fill_color( self, fill_color: WidgetStatePropertyRef<Option<Color>>, ) -> RadioThemeData
Dart RadioThemeData(fillColor:).
Sourcepub fn overlay_color(
self,
overlay_color: WidgetStatePropertyRef<Option<Color>>,
) -> RadioThemeData
pub fn overlay_color( self, overlay_color: WidgetStatePropertyRef<Option<Color>>, ) -> RadioThemeData
Dart RadioThemeData(overlayColor:).
Sourcepub fn splash_radius(self, splash_radius: f64) -> RadioThemeData
pub fn splash_radius(self, splash_radius: f64) -> RadioThemeData
Dart RadioThemeData(splashRadius:).
Sourcepub fn material_tap_target_size(
self,
material_tap_target_size: MaterialTapTargetSize,
) -> RadioThemeData
pub fn material_tap_target_size( self, material_tap_target_size: MaterialTapTargetSize, ) -> RadioThemeData
Dart RadioThemeData(materialTapTargetSize:).
Sourcepub fn visual_density(self, visual_density: VisualDensity) -> RadioThemeData
pub fn visual_density(self, visual_density: VisualDensity) -> RadioThemeData
Dart RadioThemeData(visualDensity:).
Sourcepub fn background_color(
self,
background_color: WidgetStatePropertyRef<Option<Color>>,
) -> RadioThemeData
pub fn background_color( self, background_color: WidgetStatePropertyRef<Option<Color>>, ) -> RadioThemeData
Dart RadioThemeData(backgroundColor:).
Sourcepub fn side(self, side: impl Into<AnyBorderSide>) -> RadioThemeData
pub fn side(self, side: impl Into<AnyBorderSide>) -> RadioThemeData
Dart RadioThemeData(side:).
Sourcepub fn inner_radius(
self,
inner_radius: WidgetStatePropertyRef<Option<f64>>,
) -> RadioThemeData
pub fn inner_radius( self, inner_radius: WidgetStatePropertyRef<Option<f64>>, ) -> RadioThemeData
Dart RadioThemeData(innerRadius:).
Sourcepub fn copy_with(&self) -> RadioThemeData
pub fn copy_with(&self) -> RadioThemeData
Creates a copy of this object but with the given fields replaced with the new values.
Dart’s named arguments are the fluent setters on the copy
(data.copy_with().splash_radius(1.0)).
Sourcepub fn lerp(
a: Option<&RadioThemeData>,
b: Option<&RadioThemeData>,
t: f64,
) -> RadioThemeData
pub fn lerp( a: Option<&RadioThemeData>, b: Option<&RadioThemeData>, t: f64, ) -> RadioThemeData
Linearly interpolate between two RadioThemeDatas.
The argument t represents position on the timeline, with 0.0 meaning
that the interpolation has not started, returning a (or something
equivalent to a), 1.0 meaning that the interpolation has finished,
returning b (or something equivalent to b), and values in between
meaning that the interpolation is at the relevant point on the timeline
between a and b.
Trait Implementations§
Source§impl Clone for RadioThemeData
impl Clone for RadioThemeData
Source§impl Debug for RadioThemeData
impl Debug for RadioThemeData
Source§impl Default for RadioThemeData
impl Default for RadioThemeData
Source§impl Diagnosticable for RadioThemeData
impl Diagnosticable for RadioThemeData
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:).Source§impl Display for RadioThemeData
impl Display for RadioThemeData
Source§impl PartialEq for RadioThemeData
impl PartialEq for RadioThemeData
Source§impl RadioThemeDataGetters for RadioThemeData
impl RadioThemeDataGetters for RadioThemeData
Source§fn radio_theme_data(&self) -> &RadioThemeData
fn radio_theme_data(&self) -> &RadioThemeData
super(...)
arguments a defaults struct keeps.Source§fn mouse_cursor(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>
fn mouse_cursor( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>
mouse_cursor getter.Source§fn fill_color(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<Color>>>
fn fill_color( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<Color>>>
fill_color getter.Source§fn overlay_color(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<Color>>>
fn overlay_color( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<Color>>>
overlay_color getter.Source§fn material_tap_target_size(
&self,
app: &mut App,
) -> Option<MaterialTapTargetSize>
fn material_tap_target_size( &self, app: &mut App, ) -> Option<MaterialTapTargetSize>
material_tap_target_size getter.Source§fn visual_density(&self, app: &mut App) -> Option<VisualDensity>
fn visual_density(&self, app: &mut App) -> Option<VisualDensity>
visual_density getter.Source§fn background_color(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<Color>>>
fn background_color( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<Color>>>
background_color getter.Source§fn inner_radius(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<f64>>>
fn inner_radius( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<f64>>>
inner_radius getter.Source§fn copy_with(&self, app: &mut App) -> RadioThemeData
fn copy_with(&self, app: &mut App) -> RadioThemeData
copyWith() with no arguments: a plain value holding what every getter
answers, for the caller’s setters to change.