pub struct FloatingActionButtonThemeData {Show 21 fields
pub foreground_color: Option<Color>,
pub background_color: Option<Color>,
pub focus_color: Option<Color>,
pub hover_color: Option<Color>,
pub splash_color: Option<Color>,
pub elevation: Option<f64>,
pub focus_elevation: Option<f64>,
pub hover_elevation: Option<f64>,
pub disabled_elevation: Option<f64>,
pub highlight_elevation: Option<f64>,
pub shape: Option<ShapeBorderRef>,
pub enable_feedback: Option<bool>,
pub icon_size: Option<f64>,
pub size_constraints: Option<BoxConstraints>,
pub small_size_constraints: Option<BoxConstraints>,
pub large_size_constraints: Option<BoxConstraints>,
pub extended_size_constraints: Option<BoxConstraints>,
pub extended_icon_label_spacing: Option<f64>,
pub extended_padding: Option<EdgeInsetsGeometry>,
pub extended_text_style: Option<TextStyle>,
pub mouse_cursor: Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>,
}Expand description
Defines default property values for descendant FloatingActionButton
widgets.
Descendant widgets obtain the current FloatingActionButtonThemeData object
using FloatingActionButtonTheme::of. Instances of
FloatingActionButtonThemeData can be customized with
FloatingActionButtonThemeData::copy_with.
Typically a FloatingActionButtonThemeData is specified as part of the
overall Theme with ThemeData::floating_action_button_theme.
All FloatingActionButtonThemeData properties are null by default.
When null, the FloatingActionButton provides its own defaults.
See also:
ThemeData, which describes the overall theme information for the application.
Fields§
§foreground_color: Option<Color>Color to be used for the unselected, enabled FloatingActionButton’s
foreground.
background_color: Option<Color>Color to be used for the unselected, enabled FloatingActionButton’s
background.
focus_color: Option<Color>The color to use for filling the button when the button has input focus.
hover_color: Option<Color>The color to use for filling the button when the button has a pointer hovering over it.
splash_color: Option<Color>The splash color for this FloatingActionButton’s InkWell.
elevation: Option<f64>The z-coordinate to be used for the unselected, enabled
FloatingActionButton’s elevation foreground.
focus_elevation: Option<f64>The z-coordinate at which to place this button relative to its parent when the button has the input focus.
This controls the size of the shadow below the floating action button.
hover_elevation: Option<f64>The z-coordinate at which to place this button relative to its parent when the button is enabled and has a pointer hovering over it.
This controls the size of the shadow below the floating action button.
disabled_elevation: Option<f64>The z-coordinate to be used for the disabled FloatingActionButton’s
elevation foreground.
highlight_elevation: Option<f64>The z-coordinate to be used for the selected, enabled
FloatingActionButton’s elevation foreground.
shape: Option<ShapeBorderRef>The shape to be used for the floating action button’s Material.
enable_feedback: Option<bool>If specified, defines the feedback property for FloatingActionButton.
If FloatingActionButton::enable_feedback is provided, enable_feedback is
ignored.
icon_size: Option<f64>Overrides the default icon size for the FloatingActionButton;
size_constraints: Option<BoxConstraints>Overrides the default size constraints for the FloatingActionButton.
small_size_constraints: Option<BoxConstraints>Overrides the default size constraints for FloatingActionButton::small.
large_size_constraints: Option<BoxConstraints>Overrides the default size constraints for FloatingActionButton::large.
extended_size_constraints: Option<BoxConstraints>Overrides the default size constraints for FloatingActionButton::extended.
extended_icon_label_spacing: Option<f64>The spacing between the icon and the label for an extended
FloatingActionButton.
extended_padding: Option<EdgeInsetsGeometry>The padding for an extended FloatingActionButton’s content.
extended_text_style: Option<TextStyle>The text style for an extended FloatingActionButton’s label.
mouse_cursor: Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>The cursor for a mouse pointer when it enters or is hovering over the button.
If mouse_cursor is a WidgetStateMouseCursor,
WidgetStateProperty::resolve is used for the following WidgetStates:
WidgetState::Pressed.WidgetState::Hovered.WidgetState::Focused.WidgetState::Disabled.
If specified, overrides the default value of FloatingActionButton::mouse_cursor.
Implementations§
Source§impl FloatingActionButtonThemeData
impl FloatingActionButtonThemeData
Sourcepub fn new() -> FloatingActionButtonThemeData
pub fn new() -> FloatingActionButtonThemeData
Creates a theme that can be used for ThemeData::floating_action_button_theme and
FloatingActionButtonTheme; Dart’s optional named arguments are the fluent setters.
Sourcepub fn foreground_color(
self,
foreground_color: Color,
) -> FloatingActionButtonThemeData
pub fn foreground_color( self, foreground_color: Color, ) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(foregroundColor:).
Sourcepub fn background_color(
self,
background_color: Color,
) -> FloatingActionButtonThemeData
pub fn background_color( self, background_color: Color, ) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(backgroundColor:).
Sourcepub fn focus_color(self, focus_color: Color) -> FloatingActionButtonThemeData
pub fn focus_color(self, focus_color: Color) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(focusColor:).
Sourcepub fn hover_color(self, hover_color: Color) -> FloatingActionButtonThemeData
pub fn hover_color(self, hover_color: Color) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(hoverColor:).
Sourcepub fn splash_color(self, splash_color: Color) -> FloatingActionButtonThemeData
pub fn splash_color(self, splash_color: Color) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(splashColor:).
Sourcepub fn elevation(self, elevation: f64) -> FloatingActionButtonThemeData
pub fn elevation(self, elevation: f64) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(elevation:).
Sourcepub fn focus_elevation(
self,
focus_elevation: f64,
) -> FloatingActionButtonThemeData
pub fn focus_elevation( self, focus_elevation: f64, ) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(focusElevation:).
Sourcepub fn hover_elevation(
self,
hover_elevation: f64,
) -> FloatingActionButtonThemeData
pub fn hover_elevation( self, hover_elevation: f64, ) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(hoverElevation:).
Sourcepub fn disabled_elevation(
self,
disabled_elevation: f64,
) -> FloatingActionButtonThemeData
pub fn disabled_elevation( self, disabled_elevation: f64, ) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(disabledElevation:).
Sourcepub fn highlight_elevation(
self,
highlight_elevation: f64,
) -> FloatingActionButtonThemeData
pub fn highlight_elevation( self, highlight_elevation: f64, ) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(highlightElevation:).
Sourcepub fn shape(
self,
shape: impl Into<ShapeBorderRef>,
) -> FloatingActionButtonThemeData
pub fn shape( self, shape: impl Into<ShapeBorderRef>, ) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(shape:).
Sourcepub fn enable_feedback(
self,
enable_feedback: bool,
) -> FloatingActionButtonThemeData
pub fn enable_feedback( self, enable_feedback: bool, ) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(enableFeedback:).
Sourcepub fn icon_size(self, icon_size: f64) -> FloatingActionButtonThemeData
pub fn icon_size(self, icon_size: f64) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(iconSize:).
Sourcepub fn size_constraints(
self,
size_constraints: BoxConstraints,
) -> FloatingActionButtonThemeData
pub fn size_constraints( self, size_constraints: BoxConstraints, ) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(sizeConstraints:).
Sourcepub fn small_size_constraints(
self,
small_size_constraints: BoxConstraints,
) -> FloatingActionButtonThemeData
pub fn small_size_constraints( self, small_size_constraints: BoxConstraints, ) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(smallSizeConstraints:).
Sourcepub fn large_size_constraints(
self,
large_size_constraints: BoxConstraints,
) -> FloatingActionButtonThemeData
pub fn large_size_constraints( self, large_size_constraints: BoxConstraints, ) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(largeSizeConstraints:).
Sourcepub fn extended_size_constraints(
self,
extended_size_constraints: BoxConstraints,
) -> FloatingActionButtonThemeData
pub fn extended_size_constraints( self, extended_size_constraints: BoxConstraints, ) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(extendedSizeConstraints:).
Sourcepub fn extended_icon_label_spacing(
self,
extended_icon_label_spacing: f64,
) -> FloatingActionButtonThemeData
pub fn extended_icon_label_spacing( self, extended_icon_label_spacing: f64, ) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(extendedIconLabelSpacing:).
Sourcepub fn extended_padding(
self,
extended_padding: impl Into<EdgeInsetsGeometry>,
) -> FloatingActionButtonThemeData
pub fn extended_padding( self, extended_padding: impl Into<EdgeInsetsGeometry>, ) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(extendedPadding:).
Sourcepub fn extended_text_style(
self,
extended_text_style: TextStyle,
) -> FloatingActionButtonThemeData
pub fn extended_text_style( self, extended_text_style: TextStyle, ) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(extendedTextStyle:).
Sourcepub fn mouse_cursor(
self,
mouse_cursor: WidgetStatePropertyRef<Option<MouseCursorRef>>,
) -> FloatingActionButtonThemeData
pub fn mouse_cursor( self, mouse_cursor: WidgetStatePropertyRef<Option<MouseCursorRef>>, ) -> FloatingActionButtonThemeData
Dart FloatingActionButtonThemeData(mouseCursor:).
Sourcepub fn copy_with(&self) -> FloatingActionButtonThemeData
pub fn copy_with(&self) -> FloatingActionButtonThemeData
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().elevation(2.0)).
Sourcepub fn lerp(
a: Option<&FloatingActionButtonThemeData>,
b: Option<&FloatingActionButtonThemeData>,
t: f64,
) -> Option<FloatingActionButtonThemeData>
pub fn lerp( a: Option<&FloatingActionButtonThemeData>, b: Option<&FloatingActionButtonThemeData>, t: f64, ) -> Option<FloatingActionButtonThemeData>
Linearly interpolate between two floating action button themes.
If both arguments are null, then null is returned.
{@macro dart.ui.shadow.lerp}
Trait Implementations§
Source§impl Diagnosticable for FloatingActionButtonThemeData
impl Diagnosticable for FloatingActionButtonThemeData
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 FloatingActionButtonThemeDataGetters for FloatingActionButtonThemeData
impl FloatingActionButtonThemeDataGetters for FloatingActionButtonThemeData
super(...)
arguments a defaults struct keeps.Source§fn highlight_elevation(&self, app: &mut App) -> Option<f64>
fn highlight_elevation(&self, app: &mut App) -> Option<f64>
highlight_elevation getter.Source§fn size_constraints(&self, app: &mut App) -> Option<BoxConstraints>
fn size_constraints(&self, app: &mut App) -> Option<BoxConstraints>
size_constraints getter.Source§fn small_size_constraints(&self, app: &mut App) -> Option<BoxConstraints>
fn small_size_constraints(&self, app: &mut App) -> Option<BoxConstraints>
small_size_constraints getter.Source§fn large_size_constraints(&self, app: &mut App) -> Option<BoxConstraints>
fn large_size_constraints(&self, app: &mut App) -> Option<BoxConstraints>
large_size_constraints getter.Source§fn extended_size_constraints(&self, app: &mut App) -> Option<BoxConstraints>
fn extended_size_constraints(&self, app: &mut App) -> Option<BoxConstraints>
extended_size_constraints getter.Source§fn extended_icon_label_spacing(&self, app: &mut App) -> Option<f64>
fn extended_icon_label_spacing(&self, app: &mut App) -> Option<f64>
extended_icon_label_spacing getter.Source§fn extended_padding(&self, app: &mut App) -> Option<EdgeInsetsGeometry>
fn extended_padding(&self, app: &mut App) -> Option<EdgeInsetsGeometry>
extended_padding getter.Source§fn extended_text_style(&self, app: &mut App) -> Option<TextStyle>
fn extended_text_style(&self, app: &mut App) -> Option<TextStyle>
extended_text_style 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 copy_with(&self, app: &mut App) -> FloatingActionButtonThemeData
fn copy_with(&self, app: &mut App) -> FloatingActionButtonThemeData
copyWith() with no arguments: a plain value holding what every getter
answers, for the caller’s setters to change.