Skip to main content

ToggleButtonsTheme

Struct ToggleButtonsTheme 

Source
pub struct ToggleButtonsTheme {
Show 14 fields pub color: Option<Color>, pub selected_color: Option<Color>, pub disabled_color: Option<Color>, pub fill_color: Option<WidgetStateProperty<Color>>, pub border_color: Option<Color>, pub selected_border_color: Option<Color>, pub disabled_border_color: Option<Color>, pub border_width: Option<f32>, pub border_radius: Option<BorderRadius>, pub text_style: Option<TextStyle>, pub min_width: Option<f32>, pub min_height: Option<f32>, pub max_width: Option<f32>, pub max_height: Option<f32>,
}
Expand description

Defaults for ToggleButtons.

The three border colours are named apart although the reference defaults all three to the same value (toggle_buttons.dart:601, :635, :651): a bank is one object and its outline does not break up because one of its buttons is on, but an application that wants the chosen pair marked out needs somewhere to say so.

Fields§

§color: Option<Color>

What is drawn in a button that is off — its text, its glyph, anything under it that reads the theme for a colour.

§selected_color: Option<Color>

The same, for a button that is on.

§disabled_color: Option<Color>

The same, when the bank cannot be pressed.

§fill_color: Option<WidgetStateProperty<Color>>

A button’s ground, per state. A plain colour — WidgetStateProperty::all — fills every button rather than only the ones that are on, as the reference’s does.

§border_color: Option<Color>

The hairline around and beside a button that is off.

§selected_border_color: Option<Color>

The hairline around and beside a button that is on. A seam between an on button and an off one takes this, from either side.

§disabled_border_color: Option<Color>

The hairline when the bank cannot be pressed.

§border_width: Option<f32>

The hairline’s width, around the bank and between its buttons.

§border_radius: Option<BorderRadius>

The bank’s corners: the buttons at its two ends take a pair each, and the ones between them are square.

§text_style: Option<TextStyle>

The type any text in the bank takes. Its colour is ignored — that is the three content colours’ to answer, and it depends on the state.

§min_width: Option<f32>

The smallest a button may be across.

§min_height: Option<f32>

And down. Untold, both are the tap target.

§max_width: Option<f32>

The largest. Untold, unbounded.

§max_height: Option<f32>

Likewise.

Trait Implementations§

Source§

impl Clone for ToggleButtonsTheme

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 ToggleButtonsTheme

Source§

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

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

impl Default for ToggleButtonsTheme

Source§

fn default() -> Self

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

impl PartialEq for ToggleButtonsTheme

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ToggleButtonsTheme

Auto Trait Implementations§

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<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> 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<Msg> IntoMsg<Msg> for Msg

Source§

fn defer(work: impl Fn() -> Msg + 'static) -> Msg

The message that stands for work’s result.
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, 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.