Skip to main content

FloatingActionButtonThemeData

Struct FloatingActionButtonThemeData 

Source
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

Source

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.

Source

pub fn foreground_color( self, foreground_color: Color, ) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(foregroundColor:).

Source

pub fn background_color( self, background_color: Color, ) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(backgroundColor:).

Source

pub fn focus_color(self, focus_color: Color) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(focusColor:).

Source

pub fn hover_color(self, hover_color: Color) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(hoverColor:).

Source

pub fn splash_color(self, splash_color: Color) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(splashColor:).

Source

pub fn elevation(self, elevation: f64) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(elevation:).

Source

pub fn focus_elevation( self, focus_elevation: f64, ) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(focusElevation:).

Source

pub fn hover_elevation( self, hover_elevation: f64, ) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(hoverElevation:).

Source

pub fn disabled_elevation( self, disabled_elevation: f64, ) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(disabledElevation:).

Source

pub fn highlight_elevation( self, highlight_elevation: f64, ) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(highlightElevation:).

Source

pub fn shape( self, shape: impl Into<ShapeBorderRef>, ) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(shape:).

Source

pub fn enable_feedback( self, enable_feedback: bool, ) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(enableFeedback:).

Source

pub fn icon_size(self, icon_size: f64) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(iconSize:).

Source

pub fn size_constraints( self, size_constraints: BoxConstraints, ) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(sizeConstraints:).

Source

pub fn small_size_constraints( self, small_size_constraints: BoxConstraints, ) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(smallSizeConstraints:).

Source

pub fn large_size_constraints( self, large_size_constraints: BoxConstraints, ) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(largeSizeConstraints:).

Source

pub fn extended_size_constraints( self, extended_size_constraints: BoxConstraints, ) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(extendedSizeConstraints:).

Source

pub fn extended_icon_label_spacing( self, extended_icon_label_spacing: f64, ) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(extendedIconLabelSpacing:).

Source

pub fn extended_padding( self, extended_padding: impl Into<EdgeInsetsGeometry>, ) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(extendedPadding:).

Source

pub fn extended_text_style( self, extended_text_style: TextStyle, ) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(extendedTextStyle:).

Source

pub fn mouse_cursor( self, mouse_cursor: WidgetStatePropertyRef<Option<MouseCursorRef>>, ) -> FloatingActionButtonThemeData

Dart FloatingActionButtonThemeData(mouseCursor:).

Source

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)).

Source

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 Clone for FloatingActionButtonThemeData

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FloatingActionButtonThemeData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FloatingActionButtonThemeData

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Diagnosticable for FloatingActionButtonThemeData

Source§

fn debug_fill_properties(&self, properties: &mut DiagnosticPropertiesBuilder)

Add additional properties associated with the node.
Source§

fn type_name(&self) -> &'static str

Dart’s Object.runtimeType as diagnostics print it: the last segment of the Rust type path, without generic arguments.
Source§

fn identity_hash(&self) -> u64

Dart’s Object.hashCode as diagnostics print it: the object’s address.
Source§

fn to_string_short(&self) -> String

A brief description of this object, usually just the type and the hash.
Source§

fn to_diagnostics_node(&self) -> DiagnosticableNode

Returns a debug representation of the object used by debugging tools and by DiagnosticsNode::to_string_deep.
Source§

fn to_diagnostics_node_with( &self, name: Option<String>, style: Option<DiagnosticsTreeStyle>, ) -> DiagnosticableNode

Dart toDiagnosticsNode(name:, style:).
Source§

fn to_string(&self) -> String

Dart’s toString: a single-line description with properties and no children. Read more
Source§

fn to_string_at(&self, min_level: DiagnosticLevel) -> String

Dart’s toString(minLevel:).
Source§

impl Display for FloatingActionButtonThemeData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FloatingActionButtonThemeDataGetters for FloatingActionButtonThemeData

Source§

fn floating_action_button_theme_data(&self) -> &FloatingActionButtonThemeData

The fields Dart’s constructor sets: the struct itself, or the super(...) arguments a defaults struct keeps.
Source§

fn foreground_color(&self, app: &mut App) -> Option<Color>

Dart’s foreground_color getter.
Source§

fn background_color(&self, app: &mut App) -> Option<Color>

Dart’s background_color getter.
Source§

fn focus_color(&self, app: &mut App) -> Option<Color>

Dart’s focus_color getter.
Source§

fn hover_color(&self, app: &mut App) -> Option<Color>

Dart’s hover_color getter.
Source§

fn splash_color(&self, app: &mut App) -> Option<Color>

Dart’s splash_color getter.
Source§

fn elevation(&self, app: &mut App) -> Option<f64>

Dart’s elevation getter.
Source§

fn focus_elevation(&self, app: &mut App) -> Option<f64>

Dart’s focus_elevation getter.
Source§

fn hover_elevation(&self, app: &mut App) -> Option<f64>

Dart’s hover_elevation getter.
Source§

fn disabled_elevation(&self, app: &mut App) -> Option<f64>

Dart’s disabled_elevation getter.
Source§

fn highlight_elevation(&self, app: &mut App) -> Option<f64>

Dart’s highlight_elevation getter.
Source§

fn shape(&self, app: &mut App) -> Option<ShapeBorderRef>

Dart’s shape getter.
Source§

fn enable_feedback(&self, app: &mut App) -> Option<bool>

Dart’s enable_feedback getter.
Source§

fn icon_size(&self, app: &mut App) -> Option<f64>

Dart’s icon_size getter.
Source§

fn size_constraints(&self, app: &mut App) -> Option<BoxConstraints>

Dart’s size_constraints getter.
Source§

fn small_size_constraints(&self, app: &mut App) -> Option<BoxConstraints>

Dart’s small_size_constraints getter.
Source§

fn large_size_constraints(&self, app: &mut App) -> Option<BoxConstraints>

Dart’s large_size_constraints getter.
Source§

fn extended_size_constraints(&self, app: &mut App) -> Option<BoxConstraints>

Dart’s extended_size_constraints getter.
Source§

fn extended_icon_label_spacing(&self, app: &mut App) -> Option<f64>

Dart’s extended_icon_label_spacing getter.
Source§

fn extended_padding(&self, app: &mut App) -> Option<EdgeInsetsGeometry>

Dart’s extended_padding getter.
Source§

fn extended_text_style(&self, app: &mut App) -> Option<TextStyle>

Dart’s extended_text_style getter.
Source§

fn mouse_cursor( &self, app: &mut App, ) -> Option<WidgetStatePropertyRef<Option<MouseCursorRef>>>

Dart’s mouse_cursor getter.
Source§

fn copy_with(&self, app: &mut App) -> FloatingActionButtonThemeData

Dart’s copyWith() with no arguments: a plain value holding what every getter answers, for the caller’s setters to change.
Source§

impl PartialEq for FloatingActionButtonThemeData

Source§

fn eq(&self, other: &FloatingActionButtonThemeData) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for FloatingActionButtonThemeData

§

impl !Send for FloatingActionButtonThemeData

§

impl !Sync for FloatingActionButtonThemeData

§

impl !UnwindSafe for FloatingActionButtonThemeData

§

impl Forget for FloatingActionButtonThemeData

§

impl Freeze for FloatingActionButtonThemeData

§

impl Move for FloatingActionButtonThemeData

§

impl Unpin for FloatingActionButtonThemeData

§

impl UnsafeUnpin for FloatingActionButtonThemeData

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>