Skip to main content

TextFieldColors

Struct TextFieldColors 

Source
pub struct TextFieldColors {
Show 42 fields pub focused_text_color: Color, pub unfocused_text_color: Color, pub disabled_text_color: Color, pub error_text_color: Color, pub focused_container_color: Color, pub unfocused_container_color: Color, pub disabled_container_color: Color, pub error_container_color: Color, pub cursor_color: Color, pub error_cursor_color: Color, pub focused_indicator_color: Color, pub unfocused_indicator_color: Color, pub disabled_indicator_color: Color, pub error_indicator_color: Color, pub focused_leading_icon_color: Color, pub unfocused_leading_icon_color: Color, pub disabled_leading_icon_color: Color, pub error_leading_icon_color: Color, pub focused_trailing_icon_color: Color, pub unfocused_trailing_icon_color: Color, pub disabled_trailing_icon_color: Color, pub error_trailing_icon_color: Color, pub focused_label_color: Color, pub unfocused_label_color: Color, pub disabled_label_color: Color, pub error_label_color: Color, pub focused_placeholder_color: Color, pub unfocused_placeholder_color: Color, pub disabled_placeholder_color: Color, pub error_placeholder_color: Color, pub focused_supporting_text_color: Color, pub unfocused_supporting_text_color: Color, pub disabled_supporting_text_color: Color, pub error_supporting_text_color: Color, pub focused_prefix_color: Color, pub unfocused_prefix_color: Color, pub disabled_prefix_color: Color, pub error_prefix_color: Color, pub focused_suffix_color: Color, pub unfocused_suffix_color: Color, pub disabled_suffix_color: Color, pub error_suffix_color: Color,
}
Expand description

Color slots for text fields -> matches Compose Material3 TextFieldColors. All 42 color fields (focused/unfocused/disabled/error variants of each slot).

Fields§

§focused_text_color: Color§unfocused_text_color: Color§disabled_text_color: Color§error_text_color: Color§focused_container_color: Color§unfocused_container_color: Color§disabled_container_color: Color§error_container_color: Color§cursor_color: Color§error_cursor_color: Color§focused_indicator_color: Color§unfocused_indicator_color: Color§disabled_indicator_color: Color§error_indicator_color: Color§focused_leading_icon_color: Color§unfocused_leading_icon_color: Color§disabled_leading_icon_color: Color§error_leading_icon_color: Color§focused_trailing_icon_color: Color§unfocused_trailing_icon_color: Color§disabled_trailing_icon_color: Color§error_trailing_icon_color: Color§focused_label_color: Color§unfocused_label_color: Color§disabled_label_color: Color§error_label_color: Color§focused_placeholder_color: Color§unfocused_placeholder_color: Color§disabled_placeholder_color: Color§error_placeholder_color: Color§focused_supporting_text_color: Color§unfocused_supporting_text_color: Color§disabled_supporting_text_color: Color§error_supporting_text_color: Color§focused_prefix_color: Color§unfocused_prefix_color: Color§disabled_prefix_color: Color§error_prefix_color: Color§focused_suffix_color: Color§unfocused_suffix_color: Color§disabled_suffix_color: Color§error_suffix_color: Color

Implementations§

Source§

impl TextFieldColors

Source

pub fn text_color(&self, enabled: bool, is_error: bool, focused: bool) -> Color

Source

pub fn container_color( &self, enabled: bool, is_error: bool, focused: bool, ) -> Color

Source

pub fn cursor_color(&self, is_error: bool) -> Color

Source

pub fn indicator_color( &self, enabled: bool, is_error: bool, focused: bool, ) -> Color

Source

pub fn leading_icon_color( &self, enabled: bool, is_error: bool, focused: bool, ) -> Color

Source

pub fn trailing_icon_color( &self, enabled: bool, is_error: bool, focused: bool, ) -> Color

Source

pub fn label_color(&self, enabled: bool, is_error: bool, focused: bool) -> Color

Source

pub fn placeholder_color( &self, enabled: bool, is_error: bool, focused: bool, ) -> Color

Source

pub fn supporting_text_color( &self, enabled: bool, is_error: bool, focused: bool, ) -> Color

Trait Implementations§

Source§

impl Clone for TextFieldColors

Source§

fn clone(&self) -> TextFieldColors

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 TextFieldColors

Source§

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

Formats the value using the given formatter. Read more

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> ErasedDestructor for T
where T: 'static,

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> 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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.