pub struct OutlinedTextFieldConfig {Show 15 fields
pub label: Option<String>,
pub placeholder: Option<String>,
pub leading_icon: Option<View>,
pub trailing_icon: Option<View>,
pub single_line: bool,
pub is_error: bool,
pub enabled: bool,
pub read_only: bool,
pub visual_transformation: Option<Rc<dyn VisualTransformation>>,
pub supporting_text: Option<String>,
pub prefix: Option<String>,
pub suffix: Option<String>,
pub on_submit: Option<Rc<dyn Fn(String)>>,
pub colors: Option<TextFieldColors>,
pub focus_tracker: Option<Rc<Cell<bool>>>,
}Expand description
Configuration for an OutlinedTextField.
Fields§
§label: Option<String>Floating label shown above the input when the field has text or is focused. When set, this acts as the visual placeholder (the TextField’s own placeholder is suppressed). When the label floats, it animates to the top border.
placeholder: Option<String>Placeholder text shown inside the TextField when empty and unfocused.
Only shown when label is None; when a label is present the label
itself serves as the visual placeholder.
leading_icon: Option<View>Icon displayed at the start of the input.
trailing_icon: Option<View>Icon displayed at the end of the input.
single_line: boolIf true, Enter submits; if false, Enter inserts a newline.
is_error: boolIf true, border and label color switch to error color.
enabled: boolIf false, input is visually disabled and on_value_change won’t fire.
read_only: boolIf true, the field can be focused and text selected/copied but not modified.
visual_transformation: Option<Rc<dyn VisualTransformation>>Transforms the displayed text without changing the underlying value (e.g. password masking). Passed through to the lower-level text field.
supporting_text: Option<String>Supporting text shown below the field.
prefix: Option<String>Static text prefix inside the field, before the input.
suffix: Option<String>Static text suffix inside the field, after the input.
on_submit: Option<Rc<dyn Fn(String)>>Called when the user presses Enter on a single-line field.
colors: Option<TextFieldColors>Colors for all text field UI elements.
focus_tracker: Option<Rc<Cell<bool>>>Optional external focus tracker. When None, an internal focus tracker
is created (keyed by label). Pass a tracker to synchronize focus state
(e.g. to avoid overriding external text while the user is editing).
Trait Implementations§
Source§impl Clone for OutlinedTextFieldConfig
impl Clone for OutlinedTextFieldConfig
Source§fn clone(&self) -> OutlinedTextFieldConfig
fn clone(&self) -> OutlinedTextFieldConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more