pub enum Variant {
Filled,
Tonal,
Elevated,
Outlined,
Text,
Danger,
}Expand description
How much of a screen’s attention a button is asking for: which of the reference’s buttons it is.
Variants§
Filled
The accent, filled — the reference’s FilledButton: the one action a screen is
about.
Tonal
A tonal fill — FilledButton.tonal: beside a filled button, not competing with it.
Elevated
A raised surface with a shadow — ElevatedButton, for a button over busy content.
Outlined
An outline and no fill — OutlinedButton.
Text
A label alone — TextButton.
Danger
Filled in the error role — a destructive action.
Not one of the reference’s five: there, a destructive button is a filled button given the error colours by hand. It is here because saying this action destroys something is worth a name.
Trait Implementations§
impl Copy for Variant
impl Eq for Variant
impl StructuralPartialEq for Variant
Auto Trait Implementations§
impl Freeze for Variant
impl RefUnwindSafe for Variant
impl Send for Variant
impl Sync for Variant
impl Unpin for Variant
impl UnsafeUnpin for Variant
impl UnwindSafe for Variant
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more