pub struct ButtonStyle {Show 28 fields
pub text_style: Option<WidgetStatePropertyRef<Option<TextStyle>>>,
pub background_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub foreground_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub overlay_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub shadow_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub surface_tint_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub elevation: Option<WidgetStatePropertyRef<Option<f64>>>,
pub padding: Option<WidgetStatePropertyRef<Option<EdgeInsetsGeometry>>>,
pub minimum_size: Option<WidgetStatePropertyRef<Option<Size>>>,
pub fixed_size: Option<WidgetStatePropertyRef<Option<Size>>>,
pub maximum_size: Option<WidgetStatePropertyRef<Option<Size>>>,
pub icon_color: Option<WidgetStatePropertyRef<Option<Color>>>,
pub icon_size: Option<WidgetStatePropertyRef<Option<f64>>>,
pub icon_alignment: Option<IconAlignment>,
pub side: Option<WidgetStatePropertyRef<Option<BorderSide>>>,
pub shape: Option<WidgetStatePropertyRef<Option<OutlinedBorderRef>>>,
pub mouse_cursor: Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>,
pub visual_density: Option<VisualDensity>,
pub tap_target_size: Option<MaterialTapTargetSize>,
pub animation_duration: Option<Duration>,
pub enable_feedback: Option<bool>,
pub alignment: Option<AlignmentGeometry>,
pub splash_factory: Option<InteractiveInkFeatureFactoryRef>,
pub background_builder: Option<ButtonLayerBuilder>,
pub foreground_builder: Option<ButtonLayerBuilder>,
pub size_variant: Option<ButtonSizeVariant>,
pub icon_button_width: Option<IconButtonWidthVariant>,
pub shape_variant: Option<ButtonShapeVariant>,
}Expand description
The visual properties that most buttons have in common.
Buttons and their themes have a ButtonStyle property which defines the visual
properties whose default values are to be overridden. The default values are
defined by the individual button widgets and are typically based on overall
theme’s ThemeData::color_scheme and ThemeData::text_theme.
All of the ButtonStyle properties are null by default.
Many of the ButtonStyle properties are WidgetStateProperty objects which
resolve to different values depending on the button’s state. For example
the Color properties are defined with WidgetStateProperty<Option<Color>> and
can resolve to different colors depending on if the button is pressed,
hovered, focused, disabled, etc.
These properties can override the default value for just one state or all of
them. For example to create an ElevatedButton whose background color is the
color scheme’s primary color with 50% opacity, but only when the button is
pressed, one could write:
ElevatedButton::new(on_pressed, Text::new("Fly me to the moon"))
.style(ButtonStyle::new().background_color(
<dyn WidgetStateProperty<Option<Color>>>::resolve_with(move |states| {
if states.contains(&WidgetState::Pressed) {
return Some(primary.with_opacity(0.5));
}
None // Use the component's default.
}),
))In this case the background color for all other button states would fallback
to the ElevatedButton’s default values. To unconditionally set the button’s
background_color for all states one could write:
ElevatedButton::new(on_pressed, Text::new("Let me play among the stars"))
.style(ButtonStyle::new().background_color(Rc::new(WidgetStatePropertyAll::new(
Some(Colors::GREEN.primary()),
))))Configuring a ButtonStyle directly makes it possible to very
precisely control the button’s visual attributes for all states.
This level of control is typically required when a custom
“branded” look and feel is desirable. However, in many cases it’s
useful to make relatively sweeping changes based on a few initial
parameters with simple values. The button style_from() methods
enable such sweeping changes. See for example:
ElevatedButton::style_from, FilledButton::style_from,
OutlinedButton::style_from, TextButton::style_from.
For example, to override the default text and icon colors for a
TextButton, as well as its overlay color, with all of the
standard opacity adjustments for the pressed, focused, and
hovered states, one could write:
TextButton::new(on_pressed, Text::new("Let me see what spring is like"))
.style(TextButton::style_from().foreground_color(Colors::GREEN.primary()))To configure all of the application’s text buttons in the same
way, specify the overall theme’s text_button_theme.
§Material 3 button types
Material Design 3 specifies five types of common buttons. Flutter provides support for these using the following button classes:
| Type | Flutter implementation |
|---|---|
| Elevated | ElevatedButton |
| Filled | FilledButton |
| Filled Tonal | FilledButton::tonal |
| Outlined | OutlinedButton |
| Text | TextButton |
See also:
ElevatedButtonTheme, the theme forElevatedButtons.FilledButtonTheme, the theme forFilledButtons.OutlinedButtonTheme, the theme forOutlinedButtons.TextButtonTheme, the theme forTextButtons.
Fields§
§text_style: Option<WidgetStatePropertyRef<Option<TextStyle>>>The style for a button’s Text widget descendants.
The color of the text_style is typically not used directly, the
foreground_color is used instead.
background_color: Option<WidgetStatePropertyRef<Option<Color>>>The button’s background fill color.
foreground_color: Option<WidgetStatePropertyRef<Option<Color>>>The color for the button’s Text widget descendants.
This color is typically used instead of the color of the
text_style. All of the components that compute defaults from
ButtonStyle values compute a default foreground_color
and use that instead of the text_style’s color.
overlay_color: Option<WidgetStatePropertyRef<Option<Color>>>The highlight color that’s typically used to indicate that the button is focused, hovered, or pressed.
shadow_color: Option<WidgetStatePropertyRef<Option<Color>>>The shadow color of the button’s Material.
The material’s elevation shadow can be difficult to see for
dark themes, so by default the button classes add a
semi-transparent overlay to indicate elevation. See
ThemeData::apply_elevation_overlay_color.
surface_tint_color: Option<WidgetStatePropertyRef<Option<Color>>>The surface tint color of the button’s Material.
See Material::surface_tint_color for more details.
elevation: Option<WidgetStatePropertyRef<Option<f64>>>The elevation of the button’s Material.
padding: Option<WidgetStatePropertyRef<Option<EdgeInsetsGeometry>>>The padding between the button’s boundary and its child.
The vertical aspect of the default or user-specified padding is adjusted
automatically based on visual_density.
When the visual density is VisualDensity::COMPACT, the top and bottom insets
are reduced by 8 pixels or set to 0 pixels if the result of the reduced padding
is negative. For example: the visual density defaults to VisualDensity::COMPACT
on desktop and web, so if the provided padding is 16 pixels on the top and bottom,
it will be reduced to 8 pixels on the top and bottom. If the provided padding
is 4 pixels, the result will be no padding on the top and bottom.
When the visual density is VisualDensity::COMFORTABLE, the top and bottom insets
are reduced by 4 pixels or set to 0 pixels if the result of the reduced padding
is negative.
When the visual density is VisualDensity::STANDARD the top and bottom insets
are not changed. The visual density defaults to VisualDensity::STANDARD on mobile.
See ThemeData::visual_density for more details.
minimum_size: Option<WidgetStatePropertyRef<Option<Size>>>The minimum size of the button itself before applying
visual_density.
The size of the rectangle the button lies within may be larger
per tap_target_size.
This value must be less than or equal to maximum_size.
The minimum size is adjusted automatically based on
visual_density.
When visual density is VisualDensity::COMPACT, the minimum size is
reduced by 8 pixels on both dimensions.
When visual density is VisualDensity::COMFORTABLE, the minimum size is
minimum_size reduced by 4 pixels on both dimensions.
When visual density is VisualDensity::STANDARD, the minimum size is
minimum_size.
fixed_size: Option<WidgetStatePropertyRef<Option<Size>>>The button’s size.
This size is still constrained by the style’s minimum_size
and maximum_size. Fixed size dimensions whose value is
f64::INFINITY are ignored.
The size of the rectangle the button lies within may be larger
per tap_target_size.
To specify buttons with a fixed width and the default height use
Size::from_width(320.0). Similarly, to specify a fixed
height and the default width use Size::from_height(100.0).
maximum_size: Option<WidgetStatePropertyRef<Option<Size>>>The maximum size of the button itself.
A Size::INFINITE or null value for this property means that
the button’s maximum size is not constrained.
This value must be greater than or equal to minimum_size.
icon_color: Option<WidgetStatePropertyRef<Option<Color>>>The icon’s color inside of the button.
icon_size: Option<WidgetStatePropertyRef<Option<f64>>>The icon’s size inside of the button.
icon_alignment: Option<IconAlignment>The alignment of the button’s icon.
This property is supported for the following button types:
ElevatedButton::icon.FilledButton::icon.FilledButton::tonal_icon.OutlinedButton::icon.TextButton::icon.
See also:
IconAlignment, for more information about the different icon alignments.
side: Option<WidgetStatePropertyRef<Option<BorderSide>>>The color and weight of the button’s outline.
This value is combined with shape to create a shape decorated
with an outline.
shape: Option<WidgetStatePropertyRef<Option<OutlinedBorderRef>>>The shape of the button’s underlying Material.
This shape is combined with side to create a shape decorated
with an outline.
mouse_cursor: Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>The cursor for a mouse pointer when it enters or is hovering over
this button’s InkWell.
visual_density: Option<VisualDensity>Defines how compact the button’s layout will be.
See also:
ThemeData::visual_density, which specifies thevisual_densityfor all widgets within aTheme.
tap_target_size: Option<MaterialTapTargetSize>Configures the minimum size of the area within which the button may be pressed.
If the tap_target_size is larger than
minimum_size, the button will include a transparent margin
that responds to taps.
Always defaults to ThemeData::material_tap_target_size.
animation_duration: Option<Duration>Defines the duration of animated changes for shape and
elevation.
Typically the component default value is K_THEME_CHANGE_DURATION.
enable_feedback: Option<bool>Whether detected gestures should provide acoustic and/or haptic feedback.
For example, on Android a tap will produce a clicking sound and a long-press will produce a short vibration, when feedback is enabled.
Typically the component default value is true.
See also:
Feedbackfor providing platform-specific feedback to certain actions.
alignment: Option<AlignmentGeometry>The alignment of the button’s child.
Typically buttons are sized to be just big enough to contain the child and its
padding. If the button’s size is constrained to a fixed size, for example by
enclosing it with a SizedBox, this property defines how the child is aligned
within the available space.
Always defaults to Alignment::CENTER.
splash_factory: Option<InteractiveInkFeatureFactoryRef>Creates the InkWell splash factory, which defines the appearance of
“ink” splashes that occur in response to taps.
Use NoSplash::splash_factory() to defeat ink splash rendering.
background_builder: Option<ButtonLayerBuilder>Creates a widget that becomes the child of the button’s Material
and whose child is the rest of the button, including the button’s
child parameter.
The widget created by background_builder is
constrained to be the same size as the overall button and will appear behind the
button’s child. The widget created by foreground_builder
is constrained to be the same size as the button’s child, i.e. it’s
inset by ButtonStyle::padding and aligned by the button’s
ButtonStyle::alignment.
By default the returned widget is clipped to the Material’s ButtonStyle::shape.
See also:
foreground_builder, to create a widget that’s as big as the button’s child and is layered behind the child.ButtonStyleButtonData::clip_behavior, for more information about configuring clipping.
foreground_builder: Option<ButtonLayerBuilder>Creates a Widget that contains the button’s child parameter which is used instead of the button’s child.
The returned widget is clipped by the button’s
ButtonStyle::shape, inset by the button’s ButtonStyle::padding
and aligned by the button’s ButtonStyle::alignment.
See also:
background_builder, to create a widget that’s as big as the button and is layered behind the button’s child.ButtonStyleButtonData::clip_behavior, for more information about configuring clipping.
size_variant: Option<ButtonSizeVariant>The Material 3 Expressive size variant for this button.
A size variant selects a component-defined token set rather than a single
dimension. For example, an IconButton uses this value to choose its
default container size, padding, and icon size when it is using
StyleVariant::Material3Expressive.
Use minimum_size, fixed_size,
maximum_size, padding, or
icon_size to directly override those individual style
properties.
The Material 3 Expressive width variant for an IconButton.
A width variant selects the leading and trailing space tokens used to
compute an icon button’s default horizontal padding and minimum width when
it is using StyleVariant::Material3Expressive. It does not change the
button’s height or icon size.
This property is only used by icon buttons. Use padding,
minimum_size, fixed_size, or
maximum_size to directly override the resulting layout.
shape_variant: Option<ButtonShapeVariant>The Material 3 Expressive shape variant for this button.
A shape variant selects between component-defined token families, such as
round and square shapes. For IconButton, this affects the default
container and selected-state shapes when it is using
StyleVariant::Material3Expressive; state-specific tokens, such as the
pressed shape, are still resolved by the component defaults.
Use shape to provide a specific [OutlinedBorder] or stateful shape
override instead of selecting one of the Material 3 Expressive shape
variants.
Implementations§
Source§impl ButtonStyle
impl ButtonStyle
Sourcepub fn new() -> ButtonStyle
pub fn new() -> ButtonStyle
Create a ButtonStyle.
Sourcepub fn text_style(
self,
text_style: WidgetStatePropertyRef<Option<TextStyle>>,
) -> ButtonStyle
pub fn text_style( self, text_style: WidgetStatePropertyRef<Option<TextStyle>>, ) -> ButtonStyle
Dart ButtonStyle(textStyle:).
Sourcepub fn background_color(
self,
background_color: WidgetStatePropertyRef<Option<Color>>,
) -> ButtonStyle
pub fn background_color( self, background_color: WidgetStatePropertyRef<Option<Color>>, ) -> ButtonStyle
Dart ButtonStyle(backgroundColor:).
Sourcepub fn foreground_color(
self,
foreground_color: WidgetStatePropertyRef<Option<Color>>,
) -> ButtonStyle
pub fn foreground_color( self, foreground_color: WidgetStatePropertyRef<Option<Color>>, ) -> ButtonStyle
Dart ButtonStyle(foregroundColor:).
Sourcepub fn overlay_color(
self,
overlay_color: WidgetStatePropertyRef<Option<Color>>,
) -> ButtonStyle
pub fn overlay_color( self, overlay_color: WidgetStatePropertyRef<Option<Color>>, ) -> ButtonStyle
Dart ButtonStyle(overlayColor:).
Sourcepub fn shadow_color(
self,
shadow_color: WidgetStatePropertyRef<Option<Color>>,
) -> ButtonStyle
pub fn shadow_color( self, shadow_color: WidgetStatePropertyRef<Option<Color>>, ) -> ButtonStyle
Dart ButtonStyle(shadowColor:).
Sourcepub fn surface_tint_color(
self,
surface_tint_color: WidgetStatePropertyRef<Option<Color>>,
) -> ButtonStyle
pub fn surface_tint_color( self, surface_tint_color: WidgetStatePropertyRef<Option<Color>>, ) -> ButtonStyle
Dart ButtonStyle(surfaceTintColor:).
Sourcepub fn elevation(
self,
elevation: WidgetStatePropertyRef<Option<f64>>,
) -> ButtonStyle
pub fn elevation( self, elevation: WidgetStatePropertyRef<Option<f64>>, ) -> ButtonStyle
Dart ButtonStyle(elevation:).
Sourcepub fn padding(
self,
padding: WidgetStatePropertyRef<Option<EdgeInsetsGeometry>>,
) -> ButtonStyle
pub fn padding( self, padding: WidgetStatePropertyRef<Option<EdgeInsetsGeometry>>, ) -> ButtonStyle
Dart ButtonStyle(padding:).
Sourcepub fn minimum_size(
self,
minimum_size: WidgetStatePropertyRef<Option<Size>>,
) -> ButtonStyle
pub fn minimum_size( self, minimum_size: WidgetStatePropertyRef<Option<Size>>, ) -> ButtonStyle
Dart ButtonStyle(minimumSize:).
Sourcepub fn fixed_size(
self,
fixed_size: WidgetStatePropertyRef<Option<Size>>,
) -> ButtonStyle
pub fn fixed_size( self, fixed_size: WidgetStatePropertyRef<Option<Size>>, ) -> ButtonStyle
Dart ButtonStyle(fixedSize:).
Sourcepub fn maximum_size(
self,
maximum_size: WidgetStatePropertyRef<Option<Size>>,
) -> ButtonStyle
pub fn maximum_size( self, maximum_size: WidgetStatePropertyRef<Option<Size>>, ) -> ButtonStyle
Dart ButtonStyle(maximumSize:).
Sourcepub fn icon_color(
self,
icon_color: WidgetStatePropertyRef<Option<Color>>,
) -> ButtonStyle
pub fn icon_color( self, icon_color: WidgetStatePropertyRef<Option<Color>>, ) -> ButtonStyle
Dart ButtonStyle(iconColor:).
Sourcepub fn icon_size(
self,
icon_size: WidgetStatePropertyRef<Option<f64>>,
) -> ButtonStyle
pub fn icon_size( self, icon_size: WidgetStatePropertyRef<Option<f64>>, ) -> ButtonStyle
Dart ButtonStyle(iconSize:).
Sourcepub fn icon_alignment(self, icon_alignment: IconAlignment) -> ButtonStyle
pub fn icon_alignment(self, icon_alignment: IconAlignment) -> ButtonStyle
Dart ButtonStyle(iconAlignment:).
Sourcepub fn side(
self,
side: WidgetStatePropertyRef<Option<BorderSide>>,
) -> ButtonStyle
pub fn side( self, side: WidgetStatePropertyRef<Option<BorderSide>>, ) -> ButtonStyle
Dart ButtonStyle(side:).
Sourcepub fn shape(
self,
shape: WidgetStatePropertyRef<Option<OutlinedBorderRef>>,
) -> ButtonStyle
pub fn shape( self, shape: WidgetStatePropertyRef<Option<OutlinedBorderRef>>, ) -> ButtonStyle
Dart ButtonStyle(shape:).
Sourcepub fn mouse_cursor(
self,
mouse_cursor: WidgetStatePropertyRef<Option<MouseCursorRef>>,
) -> ButtonStyle
pub fn mouse_cursor( self, mouse_cursor: WidgetStatePropertyRef<Option<MouseCursorRef>>, ) -> ButtonStyle
Dart ButtonStyle(mouseCursor:).
Sourcepub fn visual_density(self, visual_density: VisualDensity) -> ButtonStyle
pub fn visual_density(self, visual_density: VisualDensity) -> ButtonStyle
Dart ButtonStyle(visualDensity:).
Sourcepub fn tap_target_size(
self,
tap_target_size: MaterialTapTargetSize,
) -> ButtonStyle
pub fn tap_target_size( self, tap_target_size: MaterialTapTargetSize, ) -> ButtonStyle
Dart ButtonStyle(tapTargetSize:).
Sourcepub fn animation_duration(self, animation_duration: Duration) -> ButtonStyle
pub fn animation_duration(self, animation_duration: Duration) -> ButtonStyle
Dart ButtonStyle(animationDuration:).
Sourcepub fn enable_feedback(self, enable_feedback: bool) -> ButtonStyle
pub fn enable_feedback(self, enable_feedback: bool) -> ButtonStyle
Dart ButtonStyle(enableFeedback:).
Sourcepub fn alignment(self, alignment: AlignmentGeometry) -> ButtonStyle
pub fn alignment(self, alignment: AlignmentGeometry) -> ButtonStyle
Dart ButtonStyle(alignment:).
Sourcepub fn splash_factory(
self,
splash_factory: InteractiveInkFeatureFactoryRef,
) -> ButtonStyle
pub fn splash_factory( self, splash_factory: InteractiveInkFeatureFactoryRef, ) -> ButtonStyle
Dart ButtonStyle(splashFactory:).
Sourcepub fn background_builder(
self,
background_builder: ButtonLayerBuilder,
) -> ButtonStyle
pub fn background_builder( self, background_builder: ButtonLayerBuilder, ) -> ButtonStyle
Dart ButtonStyle(backgroundBuilder:).
Sourcepub fn foreground_builder(
self,
foreground_builder: ButtonLayerBuilder,
) -> ButtonStyle
pub fn foreground_builder( self, foreground_builder: ButtonLayerBuilder, ) -> ButtonStyle
Dart ButtonStyle(foregroundBuilder:).
Sourcepub fn size_variant(self, size_variant: ButtonSizeVariant) -> ButtonStyle
pub fn size_variant(self, size_variant: ButtonSizeVariant) -> ButtonStyle
Dart ButtonStyle(sizeVariant:).
Dart ButtonStyle(iconButtonWidth:).
Sourcepub fn shape_variant(self, shape_variant: ButtonShapeVariant) -> ButtonStyle
pub fn shape_variant(self, shape_variant: ButtonShapeVariant) -> ButtonStyle
Dart ButtonStyle(shapeVariant:).
Sourcepub fn copy_with(&self) -> ButtonStyle
pub fn copy_with(&self) -> ButtonStyle
Returns a copy of this ButtonStyle with the given fields replaced with the new values.
Chain setters: style.copy_with().elevation(e).
Sourcepub fn merge(&self, style: Option<&ButtonStyle>) -> ButtonStyle
pub fn merge(&self, style: Option<&ButtonStyle>) -> ButtonStyle
Returns a copy of this ButtonStyle where the non-null fields in style
have replaced the corresponding null fields in this ButtonStyle.
In other words, style is used to fill in unspecified (null) fields
this ButtonStyle.
Sourcepub fn lerp(
a: Option<&ButtonStyle>,
b: Option<&ButtonStyle>,
t: f64,
) -> Option<ButtonStyle>
pub fn lerp( a: Option<&ButtonStyle>, b: Option<&ButtonStyle>, t: f64, ) -> Option<ButtonStyle>
Linearly interpolate between two ButtonStyles.
Trait Implementations§
Source§impl ButtonStyleGetters for ButtonStyle
impl ButtonStyleGetters for ButtonStyle
super(...)
arguments a defaults struct keeps.Source§fn text_style(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<TextStyle>>>
fn text_style( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<TextStyle>>>
text_style 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 foreground_color(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<Color>>>
fn foreground_color( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<Color>>>
foreground_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 shadow_color(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<Color>>>
fn shadow_color( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<Color>>>
shadow_color getter.Source§fn surface_tint_color(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<Color>>>
fn surface_tint_color( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<Color>>>
surface_tint_color getter.Source§fn elevation(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<f64>>>
fn elevation( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<f64>>>
elevation getter.Source§fn padding(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<EdgeInsetsGeometry>>>
fn padding( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<EdgeInsetsGeometry>>>
padding getter.Source§fn minimum_size(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<Size>>>
fn minimum_size( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<Size>>>
minimum_size getter.Source§fn fixed_size(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<Size>>>
fn fixed_size( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<Size>>>
fixed_size getter.Source§fn maximum_size(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<Size>>>
fn maximum_size( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<Size>>>
maximum_size getter.Source§fn icon_color(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<Color>>>
fn icon_color( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<Color>>>
icon_color getter.Source§fn icon_size(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<f64>>>
fn icon_size( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<f64>>>
icon_size getter.Source§fn icon_alignment(&self, app: &mut App) -> Option<IconAlignment>
fn icon_alignment(&self, app: &mut App) -> Option<IconAlignment>
icon_alignment getter.Source§fn side(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<BorderSide>>>
fn side( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<BorderSide>>>
side getter.Source§fn shape(
&self,
app: &mut App,
) -> Option<WidgetStatePropertyRef<Option<OutlinedBorderRef>>>
fn shape( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<OutlinedBorderRef>>>
shape getter.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 visual_density(&self, app: &mut App) -> Option<VisualDensity>
fn visual_density(&self, app: &mut App) -> Option<VisualDensity>
visual_density getter.Source§fn tap_target_size(&self, app: &mut App) -> Option<MaterialTapTargetSize>
fn tap_target_size(&self, app: &mut App) -> Option<MaterialTapTargetSize>
tap_target_size getter.Source§fn animation_duration(&self, app: &mut App) -> Option<Duration>
fn animation_duration(&self, app: &mut App) -> Option<Duration>
animation_duration getter.Source§fn splash_factory(
&self,
app: &mut App,
) -> Option<InteractiveInkFeatureFactoryRef>
fn splash_factory( &self, app: &mut App, ) -> Option<InteractiveInkFeatureFactoryRef>
splash_factory getter.Source§fn background_builder(&self, app: &mut App) -> Option<ButtonLayerBuilder>
fn background_builder(&self, app: &mut App) -> Option<ButtonLayerBuilder>
background_builder getter.Source§fn foreground_builder(&self, app: &mut App) -> Option<ButtonLayerBuilder>
fn foreground_builder(&self, app: &mut App) -> Option<ButtonLayerBuilder>
foreground_builder getter.Source§fn size_variant(&self, app: &mut App) -> Option<ButtonSizeVariant>
fn size_variant(&self, app: &mut App) -> Option<ButtonSizeVariant>
size_variant getter.icon_button_width getter.Source§fn shape_variant(&self, app: &mut App) -> Option<ButtonShapeVariant>
fn shape_variant(&self, app: &mut App) -> Option<ButtonShapeVariant>
shape_variant getter.Source§fn copy_with(&self, app: &mut App) -> ButtonStyle
fn copy_with(&self, app: &mut App) -> ButtonStyle
copyWith() with no arguments: a plain value holding what every getter
answers, for the caller’s setters to change.Source§impl Clone for ButtonStyle
impl Clone for ButtonStyle
Source§impl Debug for ButtonStyle
impl Debug for ButtonStyle
Source§impl Default for ButtonStyle
impl Default for ButtonStyle
Source§impl Diagnosticable for ButtonStyle
impl Diagnosticable for ButtonStyle
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:).