Skip to main content

InputDecorationThemeData

Struct InputDecorationThemeData 

Source
pub struct InputDecorationThemeData {
Show 38 fields pub label_style: Option<AnyTextStyle>, pub floating_label_style: Option<AnyTextStyle>, pub helper_style: Option<AnyTextStyle>, pub helper_max_lines: Option<i32>, pub hint_style: Option<AnyTextStyle>, pub hint_fade_duration: Option<Duration>, pub hint_max_lines: Option<i32>, pub error_style: Option<AnyTextStyle>, pub error_max_lines: Option<i32>, pub floating_label_behavior: FloatingLabelBehavior, pub floating_label_alignment: FloatingLabelAlignment, pub is_dense: bool, pub content_padding: Option<EdgeInsetsGeometry>, pub is_collapsed: bool, pub icon_color: Option<AnyColor>, pub prefix_style: Option<AnyTextStyle>, pub prefix_icon_color: Option<AnyColor>, pub prefix_icon_constraints: Option<BoxConstraints>, pub suffix_style: Option<AnyTextStyle>, pub suffix_icon_color: Option<AnyColor>, pub suffix_icon_constraints: Option<BoxConstraints>, pub counter_style: Option<AnyTextStyle>, pub filled: bool, pub fill_color: Option<AnyColor>, pub outline_border: Option<AnyBorderSide>, pub active_indicator_border: Option<AnyBorderSide>, pub focus_color: Option<Color>, pub hover_color: Option<Color>, pub error_border: Option<InputBorderRef>, pub focused_border: Option<InputBorderRef>, pub focused_error_border: Option<InputBorderRef>, pub disabled_border: Option<InputBorderRef>, pub enabled_border: Option<InputBorderRef>, pub border: Option<InputBorderRef>, pub align_label_with_hint: bool, pub constraints: Option<BoxConstraints>, pub visual_density: Option<VisualDensity>, pub supporting_text_padding: Option<EdgeInsetsGeometry>,
}
Expand description

Defines the default appearance of InputDecorators.

Descendant widgets obtain the current theme’s InputDecorationThemeData using InputDecorationTheme::of. When a widget uses InputDecorationTheme::of, it is automatically rebuilt if the theme later changes.

The InputDecoration::apply_defaults method is used to combine an input decoration theme with an InputDecoration object.

See also:

  • ThemeData::input_decoration_theme, which specifies an input decoration theme as part of the overall Material theme.

Fields§

§label_style: Option<AnyTextStyle>

The style to use for InputDecoration::label_text when the label is on top of the input field.

If label_style is a WidgetStateTextStyle, then the effective text style can depend on the WidgetState::Focused state, i.e. if the TextField is focused or not.

When the InputDecoration::label_text is above (i.e., vertically adjacent to) the input field, the text uses the floating_label_style instead.

If null, defaults to a value derived from the base TextStyle for the input field and the current Theme.

Specifying this style will override the default behavior of InputDecoration that changes the color of the label to the InputDecoration::error_style color or ColorScheme::error.

§floating_label_style: Option<AnyTextStyle>

The style to use for InputDecoration::label_text when the label is above (i.e., vertically adjacent to) the input field.

When the InputDecoration::label_text is on top of the input field, the text uses the label_style instead.

If floating_label_style is a WidgetStateTextStyle, then the effective text style can depend on the WidgetState::Focused state, i.e. if the TextField is focused or not.

If null, defaults to label_style.

Specifying this style will override the default behavior of InputDecoration that changes the color of the label to the InputDecoration::error_style color or ColorScheme::error.

When the input field receives focus, the font size of InputDecoration::label is scaled down by 75%.

§helper_style: Option<AnyTextStyle>

The style to use for InputDecoration::helper_text.

If helper_style is a WidgetStateTextStyle, then the effective text style can depend on the WidgetState::Focused state, i.e. if the TextField is focused or not.

§helper_max_lines: Option<i32>

The maximum number of lines the InputDecoration::helper_text can occupy.

Defaults to null, which means that the InputDecoration::helper_text will be limited to a single line with TextOverflow::Ellipsis.

This value is passed along to the Text::max_lines attribute of the Text widget used to display the helper.

See also:

  • error_max_lines, the equivalent but for the InputDecoration::error_text.
§hint_style: Option<AnyTextStyle>

The style to use for the InputDecoration::hint_text.

If hint_style is a WidgetStateTextStyle, then the effective text style can depend on the WidgetState::Focused state, i.e. if the TextField is focused or not.

Also used for the InputDecoration::label_text when the InputDecoration::label_text is displayed on top of the input field (i.e., at the same location on the screen where text may be entered in the input field).

If null, defaults to a value derived from the base TextStyle for the input field and the current Theme.

§hint_fade_duration: Option<Duration>

The duration of the InputDecoration::hint_text fade in and fade out animations.

§hint_max_lines: Option<i32>

The maximum number of lines the InputDecoration::hint_text can occupy.

Defaults to null, which means that the InputDecoration::hint_text will be limited to a single line with TextOverflow::Ellipsis.

This value is passed along to the Text::max_lines attribute of the Text widget used to display the hint text.

§error_style: Option<AnyTextStyle>

The style to use for the InputDecoration::error_text.

If null, defaults of a value derived from the base TextStyle for the input field and the current Theme.

By default the color of style will be used by the label of InputDecoration if InputDecoration::error_text is not null. See InputDecoration::label_style or InputDecoration::floating_label_style for an example of how to replicate this behavior when specifying those styles.

§error_max_lines: Option<i32>

The maximum number of lines the InputDecoration::error_text can occupy.

Defaults to null, which means that the InputDecoration::error_text will be limited to a single line with TextOverflow::Ellipsis.

This value is passed along to the Text::max_lines attribute of the Text widget used to display the error.

See also:

  • helper_max_lines, the equivalent but for the InputDecoration::helper_text.
§floating_label_behavior: FloatingLabelBehavior

Defines how the floating label should behave.

When FloatingLabelBehavior::Auto the label will float to the top only when the field is focused or has some text content, otherwise it will appear in the field in place of the content.

When FloatingLabelBehavior::Always the label will always float at the top of the field above the content.

When FloatingLabelBehavior::Never the label will always appear in an empty field in place of the content.

Defaults to FloatingLabelBehavior::Auto.

§floating_label_alignment: FloatingLabelAlignment

Defines where the floating label should be displayed.

FloatingLabelAlignment::START aligns the floating label to the leftmost (when TextDirection::Ltr) or rightmost (when TextDirection::Rtl), possible position, which is vertically adjacent to the label, on top of the field.

FloatingLabelAlignment::CENTER aligns the floating label to the center on top of the field.

Defaults to FloatingLabelAlignment::START.

§is_dense: bool

Whether the input decorator’s child is part of a dense form (i.e., uses less vertical space).

Defaults to false.

§content_padding: Option<EdgeInsetsGeometry>

The padding for the input decoration’s container.

The decoration’s container is the area which is filled if InputDecoration::filled is true and bordered per the border. It’s the area adjacent to InputDecoration::icon and above the InputDecoration::icon and above the widgets that contain InputDecoration::helper_text, InputDecoration::error_text, and InputDecoration::counter_text.

By default the content_padding reflects visual_density, is_dense and the type of the border. If is_collapsed is true then content_padding is EdgeInsets::ZERO.

§is_collapsed: bool

Whether the decoration is the same size as the input field.

A collapsed decoration cannot have InputDecoration::label_text, InputDecoration::error_text, or an InputDecoration::icon.

§icon_color: Option<AnyColor>

The Color to use for the InputDecoration::icon.

If icon_color is a WidgetStateColor, then the effective color can depend on the WidgetState::Focused state, i.e. if the TextField is focused or not.

If null, defaults to the ColorScheme::primary.

§prefix_style: Option<AnyTextStyle>

The style to use for the InputDecoration::prefix_text.

If prefix_style is a WidgetStateTextStyle, then the effective text style can depend on the WidgetState::Focused state, i.e. if the TextField is focused or not.

If null, defaults to the hint_style.

§prefix_icon_color: Option<AnyColor>

The Color to use for the InputDecoration::prefix_icon.

If prefix_icon_color is a WidgetStateColor, then the effective color can depend on the WidgetState::Focused state, i.e. if the TextField is focused or not.

If null, defaults to the ColorScheme::primary.

§prefix_icon_constraints: Option<BoxConstraints>

The constraints to use for InputDecoration::prefix_icon_constraints.

This can be used to modify the BoxConstraints surrounding InputDecoration::prefix_icon.

This property is particularly useful for getting the decoration’s height less than the minimum tappable height (which is 48px when the visual density is set to VisualDensity::standard). This can be achieved by setting is_dense to true and setting the constraints’ minimum height and width to a value lower than the minimum tappable size.

If null, BoxConstraints with a minimum width and height of 48px is used.

§suffix_style: Option<AnyTextStyle>

The style to use for the InputDecoration::suffix_text.

If suffix_style is a WidgetStateTextStyle, then the effective color can depend on the WidgetState::Focused state, i.e. if the TextField is focused or not.

If null, defaults to the hint_style.

§suffix_icon_color: Option<AnyColor>

The Color to use for the InputDecoration::suffix_icon.

If suffix_icon_color is a WidgetStateColor, then the effective color can depend on the WidgetState::Focused state, i.e. if the TextField is focused or not.

If null, defaults to the ColorScheme::primary.

§suffix_icon_constraints: Option<BoxConstraints>

The constraints to use for InputDecoration::suffix_icon_constraints.

This can be used to modify the BoxConstraints surrounding InputDecoration::suffix_icon.

This property is particularly useful for getting the decoration’s height less than the minimum tappable height (which is 48px when the visual density is set to VisualDensity::standard). This can be achieved by setting is_dense to true and setting the constraints’ minimum height and width to a value lower than the minimum tappable size.

If null, BoxConstraints with a minimum width and height of 48px is used.

§counter_style: Option<AnyTextStyle>

The style to use for the InputDecoration::counter_text.

If counter_style is a WidgetStateTextStyle, then the effective text style can depend on the WidgetState::Focused state, i.e. if the TextField is focused or not.

If null, defaults to the helper_style.

§filled: bool

If true the decoration’s container is filled with fill_color.

Typically this field set to true if border is an UnderlineInputBorder.

The decoration’s container is the area, defined by the border’s InputBorder::get_outer_path, which is filled if filled is true and bordered per the border.

This property is false by default.

§fill_color: Option<AnyColor>

The color to fill the decoration’s container with, if filled is true.

By default the fillColor is based on the current Theme.

The decoration’s container is the area, defined by the border’s InputBorder::get_outer_path, which is filled if filled is true and bordered per the border.

§outline_border: Option<AnyBorderSide>

The borderSide of the OutlineInputBorder with color and weight.

§active_indicator_border: Option<AnyBorderSide>

The borderSide of the UnderlineInputBorder with color and weight.

§focus_color: Option<Color>

The color to blend with the decoration’s fill_color with, if filled is true and the container has the input focus.

By default the focus_color is based on the current Theme.

The decoration’s container is the area, defined by the border’s InputBorder::get_outer_path, which is filled if filled is true and bordered per the border.

§hover_color: Option<Color>

The color to blend with the decoration’s fill_color with, if the decoration is being hovered over by a mouse pointer.

By default the hover_color is based on the current Theme.

The decoration’s container is the area, defined by the border’s InputBorder::get_outer_path, which is filled if filled is true and bordered per the border.

The container will be filled when hovered over even if filled is false.

§error_border: Option<InputBorderRef>

The border to display when the InputDecorator does not have the focus and is showing an error.

See also:

  • InputDecorator::is_focused, which is true if the InputDecorator’s child has the focus.
  • InputDecoration::error_text, the error shown by the InputDecorator, if non-null.
  • border, for a description of where the InputDecorator border appears.
  • UnderlineInputBorder, an InputDecorator border which draws a horizontal line at the bottom of the input decorator’s container.
  • OutlineInputBorder, an InputDecorator border which draws a rounded rectangle around the input decorator’s container.
  • InputBorderRef::none(), which doesn’t draw a border.
  • focused_border, displayed when InputDecorator::is_focused is true and InputDecoration::error_text is null.
  • focused_error_border, displayed when InputDecorator::is_focused is true and InputDecoration::error_text is non-null.
  • disabled_border, displayed when InputDecoration::enabled is false and InputDecoration::error_text is null.
  • enabled_border, displayed when InputDecoration::enabled is true and InputDecoration::error_text is null.
§focused_border: Option<InputBorderRef>

The border to display when the InputDecorator has the focus and is not showing an error.

See also:

  • InputDecorator::is_focused, which is true if the InputDecorator’s child has the focus.
  • InputDecoration::error_text, the error shown by the InputDecorator, if non-null.
  • border, for a description of where the InputDecorator border appears.
  • UnderlineInputBorder, an InputDecorator border which draws a horizontal line at the bottom of the input decorator’s container.
  • OutlineInputBorder, an InputDecorator border which draws a rounded rectangle around the input decorator’s container.
  • InputBorderRef::none(), which doesn’t draw a border.
  • error_border, displayed when InputDecorator::is_focused is false and InputDecoration::error_text is non-null.
  • focused_error_border, displayed when InputDecorator::is_focused is true and InputDecoration::error_text is non-null.
  • disabled_border, displayed when InputDecoration::enabled is false and InputDecoration::error_text is null.
  • enabled_border, displayed when InputDecoration::enabled is true and InputDecoration::error_text is null.
§focused_error_border: Option<InputBorderRef>

The border to display when the InputDecorator has the focus and is showing an error.

See also:

  • InputDecorator::is_focused, which is true if the InputDecorator’s child has the focus.
  • InputDecoration::error_text, the error shown by the InputDecorator, if non-null.
  • border, for a description of where the InputDecorator border appears.
  • UnderlineInputBorder, an InputDecorator border which draws a horizontal line at the bottom of the input decorator’s container.
  • OutlineInputBorder, an InputDecorator border which draws a rounded rectangle around the input decorator’s container.
  • InputBorderRef::none(), which doesn’t draw a border.
  • error_border, displayed when InputDecorator::is_focused is false and InputDecoration::error_text is non-null.
  • focused_border, displayed when InputDecorator::is_focused is true and InputDecoration::error_text is null.
  • disabled_border, displayed when InputDecoration::enabled is false and InputDecoration::error_text is null.
  • enabled_border, displayed when InputDecoration::enabled is true and InputDecoration::error_text is null.
§disabled_border: Option<InputBorderRef>

The border to display when the InputDecorator is disabled and is not showing an error.

See also:

  • InputDecoration::enabled, which is false if the InputDecorator is disabled.
  • InputDecoration::error_text, the error shown by the InputDecorator, if non-null.
  • border, for a description of where the InputDecorator border appears.
  • UnderlineInputBorder, an InputDecorator border which draws a horizontal line at the bottom of the input decorator’s container.
  • OutlineInputBorder, an InputDecorator border which draws a rounded rectangle around the input decorator’s container.
  • InputBorderRef::none(), which doesn’t draw a border.
  • error_border, displayed when InputDecorator::is_focused is false and InputDecoration::error_text is non-null.
  • focused_border, displayed when InputDecorator::is_focused is true and InputDecoration::error_text is null.
  • focused_error_border, displayed when InputDecorator::is_focused is true and InputDecoration::error_text is non-null.
  • enabled_border, displayed when InputDecoration::enabled is true and InputDecoration::error_text is null.
§enabled_border: Option<InputBorderRef>

The border to display when the InputDecorator is enabled and is not showing an error.

See also:

  • InputDecoration::enabled, which is false if the InputDecorator is disabled.
  • InputDecoration::error_text, the error shown by the InputDecorator, if non-null.
  • border, for a description of where the InputDecorator border appears.
  • UnderlineInputBorder, an InputDecorator border which draws a horizontal line at the bottom of the input decorator’s container.
  • OutlineInputBorder, an InputDecorator border which draws a rounded rectangle around the input decorator’s container.
  • InputBorderRef::none(), which doesn’t draw a border.
  • error_border, displayed when InputDecorator::is_focused is false and InputDecoration::error_text is non-null.
  • focused_border, displayed when InputDecorator::is_focused is true and InputDecoration::error_text is null.
  • focused_error_border, displayed when InputDecorator::is_focused is true and InputDecoration::error_text is non-null.
  • disabled_border, displayed when InputDecoration::enabled is false and InputDecoration::error_text is null.
§border: Option<InputBorderRef>

The shape of the border to draw around the decoration’s container.

If border is a WidgetStateInputBorder, then the effective border can depend on the WidgetState::Focused state, i.e. if the TextField is focused or not.

The decoration’s container is the area which is filled if filled is true and bordered per the border. It’s the area adjacent to InputDecoration::icon and above the widgets that contain InputDecoration::helper_text, InputDecoration::error_text, and InputDecoration::counter_text.

The border’s bounds, i.e. the value of border.getOuterPath(), define the area to be filled.

This property is only used when the appropriate one of error_border, focused_border, focused_error_border, disabled_border, or enabled_border is not specified. This border’s InputBorder::border_side property is configured by the InputDecorator, depending on the values of InputDecoration::error_text, InputDecoration::enabled, InputDecorator::is_focused and the current Theme.

Typically one of UnderlineInputBorder or OutlineInputBorder. If null, InputDecorator’s default is const UnderlineInputBorder().

See also:

  • InputBorderRef::none(), which doesn’t draw a border.
  • UnderlineInputBorder, which draws a horizontal line at the bottom of the input decorator’s container.
  • OutlineInputBorder, an InputDecorator border which draws a rounded rectangle around the input decorator’s container.
§align_label_with_hint: bool

Typically set to true when the InputDecorator contains a multiline TextField (TextField::max_lines is null or > 1) to override the default behavior of aligning the label with the center of the TextField.

§constraints: Option<BoxConstraints>

Defines minimum and maximum sizes for the InputDecorator.

Typically the decorator will fill the horizontal space it is given. For larger screens, it may be useful to have the maximum width clamped to a given value so it doesn’t fill the whole screen. This property allows you to control how big the decorator will be in its available space.

If null, then the decorator will fill the available width with a default height based on text size.

See also:

  • InputDecoration::constraints, which can override this setting for a given decorator.
§visual_density: Option<VisualDensity>

Defines how compact the decoration’s layout will be.

The vertical aspect of the default or user-specified content_padding is adjusted automatically based on visual_density.

When the visual density is VisualDensity::compact, the vertical aspect of content_padding is reduced by 8 pixels.

When the visual density is VisualDensity::comfortable, the vertical aspect of content_padding is reduced by 4 pixels.

When the visual density is VisualDensity::standard vertical aspect of content_padding is not changed.

If null, defaults to ThemeData::visual_density.

See also:

  • ThemeData::visual_density, which specifies the visual_density for all widgets within a Theme.
  • InputDecoration::visual_density, which can override this setting for a given decorator.
§supporting_text_padding: Option<EdgeInsetsGeometry>

The padding around the supporting text row, which contains the helper text, the error text, and the counter.

The start and end values set the horizontal position of the row, the same way InputDecoration::content_padding does for the input. The top value is the gap between the bottom of the decoration’s container and the row, and the bottom value is the space below the row.

If null, the row uses these defaults:

  • start and end: the start and end values of InputDecoration::content_padding.
  • top: 4.0 for Material 3, 8.0 for Material 2.
  • bottom: 0.0.

If non-null, every side of this value is used as is, including sides that are zero. For example, EdgeInsetsDirectional.only(start: 24.0) sets the top gap to zero, so the supporting text sits directly against the container. To change the horizontal padding while keeping the default Material 3 gap, set the top value explicitly:

const InputDecoration(
  helperText: 'Helper text',
  supportingTextPadding: EdgeInsetsDirectional.fromSTEB(24.0, 4.0, 24.0, 0.0),
)

Implementations§

Source§

impl InputDecorationThemeData

Source

pub fn new() -> InputDecorationThemeData

Creates a InputDecorationThemeData that can be used to override default properties in a InputDecorationTheme widget.

Source

pub fn label_style( self, label_style: impl Into<AnyTextStyle>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(labelStyle:).

Source

pub fn floating_label_style( self, floating_label_style: impl Into<AnyTextStyle>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(floatingLabelStyle:).

Source

pub fn helper_style( self, helper_style: impl Into<AnyTextStyle>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(helperStyle:).

Source

pub fn helper_max_lines(self, helper_max_lines: i32) -> InputDecorationThemeData

Dart InputDecorationThemeData(helperMaxLines:).

Source

pub fn hint_style( self, hint_style: impl Into<AnyTextStyle>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(hintStyle:).

Source

pub fn hint_fade_duration( self, hint_fade_duration: Duration, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(hintFadeDuration:).

Source

pub fn hint_max_lines(self, hint_max_lines: i32) -> InputDecorationThemeData

Dart InputDecorationThemeData(hintMaxLines:).

Source

pub fn error_style( self, error_style: impl Into<AnyTextStyle>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(errorStyle:).

Source

pub fn error_max_lines(self, error_max_lines: i32) -> InputDecorationThemeData

Dart InputDecorationThemeData(errorMaxLines:).

Source

pub fn floating_label_behavior( self, floating_label_behavior: FloatingLabelBehavior, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(floatingLabelBehavior:).

Source

pub fn floating_label_alignment( self, floating_label_alignment: FloatingLabelAlignment, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(floatingLabelAlignment:).

Source

pub fn is_dense(self, is_dense: bool) -> InputDecorationThemeData

Dart InputDecorationThemeData(isDense:).

Source

pub fn content_padding( self, content_padding: impl Into<EdgeInsetsGeometry>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(contentPadding:).

Source

pub fn is_collapsed(self, is_collapsed: bool) -> InputDecorationThemeData

Dart InputDecorationThemeData(isCollapsed:).

Source

pub fn icon_color( self, icon_color: impl Into<AnyColor>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(iconColor:).

Source

pub fn prefix_style( self, prefix_style: impl Into<AnyTextStyle>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(prefixStyle:).

Source

pub fn prefix_icon_color( self, prefix_icon_color: impl Into<AnyColor>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(prefixIconColor:).

Source

pub fn prefix_icon_constraints( self, prefix_icon_constraints: BoxConstraints, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(prefixIconConstraints:).

Source

pub fn suffix_style( self, suffix_style: impl Into<AnyTextStyle>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(suffixStyle:).

Source

pub fn suffix_icon_color( self, suffix_icon_color: impl Into<AnyColor>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(suffixIconColor:).

Source

pub fn suffix_icon_constraints( self, suffix_icon_constraints: BoxConstraints, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(suffixIconConstraints:).

Source

pub fn counter_style( self, counter_style: impl Into<AnyTextStyle>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(counterStyle:).

Source

pub fn filled(self, filled: bool) -> InputDecorationThemeData

Dart InputDecorationThemeData(filled:).

Source

pub fn fill_color( self, fill_color: impl Into<AnyColor>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(fillColor:).

Source

pub fn active_indicator_border( self, active_indicator_border: impl Into<AnyBorderSide>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(activeIndicatorBorder:).

Source

pub fn outline_border( self, outline_border: impl Into<AnyBorderSide>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(outlineBorder:).

Source

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

Dart InputDecorationThemeData(focusColor:).

Source

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

Dart InputDecorationThemeData(hoverColor:).

Source

pub fn error_border( self, error_border: impl Into<InputBorderRef>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(errorBorder:).

Source

pub fn focused_border( self, focused_border: impl Into<InputBorderRef>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(focusedBorder:).

Source

pub fn focused_error_border( self, focused_error_border: impl Into<InputBorderRef>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(focusedErrorBorder:).

Source

pub fn disabled_border( self, disabled_border: impl Into<InputBorderRef>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(disabledBorder:).

Source

pub fn enabled_border( self, enabled_border: impl Into<InputBorderRef>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(enabledBorder:).

Source

pub fn border( self, border: impl Into<InputBorderRef>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(border:).

Source

pub fn align_label_with_hint( self, align_label_with_hint: bool, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(alignLabelWithHint:).

Source

pub fn constraints( self, constraints: BoxConstraints, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(constraints:).

Source

pub fn visual_density( self, visual_density: VisualDensity, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(visualDensity:).

Source

pub fn supporting_text_padding( self, supporting_text_padding: impl Into<EdgeInsetsGeometry>, ) -> InputDecorationThemeData

Dart InputDecorationThemeData(supportingTextPadding:).

Source

pub fn copy_with(&self) -> InputDecorationThemeData

Creates a copy of this object but with the given fields replaced with the new values.

Dart’s named arguments are the fluent setters on the copy (theme.copy_with().fill_color(color)).

Source

pub fn merge( &self, other: Option<&InputDecorationThemeData>, ) -> InputDecorationThemeData

Returns a copy of this InputDecorationThemeData where the non-null fields in the given InputDecorationThemeData override the corresponding nullable fields in this InputDecorationThemeData.

The non-nullable fields of InputDecorationThemeData, such as floating_label_behavior, is_dense, is_collapsed, filled, and align_label_with_hint cannot be overridden.

In other words, the fields of the provided InputDecorationThemeData are used to fill in the unspecified and nullable fields of this InputDecorationThemeData.

Trait Implementations§

Source§

impl Clone for InputDecorationThemeData

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 InputDecorationThemeData

Dart’s toString through debugFillProperties: the properties that differ from InputDecorationThemeData()’s.

Source§

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

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

impl Default for InputDecorationThemeData

Source§

fn default() -> InputDecorationThemeData

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

impl Diagnosticable for InputDecorationThemeData

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 InputDecorationThemeData

Dart’s InputDecorationThemeData.toString, through its diagnostics.

Source§

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

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

impl From<InputDecorationTheme> for InputDecorationThemeData

Source§

fn from(theme: InputDecorationTheme) -> InputDecorationThemeData

Dart’s inputDecorationTheme.data, where an API takes either type.

Source§

impl InputDecorationThemeDataGetters for InputDecorationThemeData

Source§

fn input_decoration_theme_data(&self) -> &InputDecorationThemeData

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

fn label_style(&self, app: &mut App) -> Option<AnyTextStyle>

Dart’s label_style getter.
Source§

fn floating_label_style(&self, app: &mut App) -> Option<AnyTextStyle>

Dart’s floating_label_style getter.
Source§

fn helper_style(&self, app: &mut App) -> Option<AnyTextStyle>

Dart’s helper_style getter.
Source§

fn helper_max_lines(&self, app: &mut App) -> Option<i32>

Dart’s helper_max_lines getter.
Source§

fn hint_style(&self, app: &mut App) -> Option<AnyTextStyle>

Dart’s hint_style getter.
Source§

fn hint_fade_duration(&self, app: &mut App) -> Option<Duration>

Dart’s hint_fade_duration getter.
Source§

fn hint_max_lines(&self, app: &mut App) -> Option<i32>

Dart’s hint_max_lines getter.
Source§

fn error_style(&self, app: &mut App) -> Option<AnyTextStyle>

Dart’s error_style getter.
Source§

fn error_max_lines(&self, app: &mut App) -> Option<i32>

Dart’s error_max_lines getter.
Source§

fn floating_label_behavior(&self, app: &mut App) -> FloatingLabelBehavior

Dart’s floating_label_behavior getter.
Source§

fn floating_label_alignment(&self, app: &mut App) -> FloatingLabelAlignment

Dart’s floating_label_alignment getter.
Source§

fn is_dense(&self, app: &mut App) -> bool

Dart’s is_dense getter.
Source§

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

Dart’s content_padding getter.
Source§

fn is_collapsed(&self, app: &mut App) -> bool

Dart’s is_collapsed getter.
Source§

fn icon_color(&self, app: &mut App) -> Option<AnyColor>

Dart’s icon_color getter.
Source§

fn prefix_style(&self, app: &mut App) -> Option<AnyTextStyle>

Dart’s prefix_style getter.
Source§

fn prefix_icon_color(&self, app: &mut App) -> Option<AnyColor>

Dart’s prefix_icon_color getter.
Source§

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

Dart’s prefix_icon_constraints getter.
Source§

fn suffix_style(&self, app: &mut App) -> Option<AnyTextStyle>

Dart’s suffix_style getter.
Source§

fn suffix_icon_color(&self, app: &mut App) -> Option<AnyColor>

Dart’s suffix_icon_color getter.
Source§

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

Dart’s suffix_icon_constraints getter.
Source§

fn counter_style(&self, app: &mut App) -> Option<AnyTextStyle>

Dart’s counter_style getter.
Source§

fn filled(&self, app: &mut App) -> bool

Dart’s filled getter.
Source§

fn fill_color(&self, app: &mut App) -> Option<AnyColor>

Dart’s fill_color getter.
Source§

fn outline_border(&self, app: &mut App) -> Option<AnyBorderSide>

Dart’s outline_border getter.
Source§

fn active_indicator_border(&self, app: &mut App) -> Option<AnyBorderSide>

Dart’s active_indicator_border 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 error_border(&self, app: &mut App) -> Option<InputBorderRef>

Dart’s error_border getter.
Source§

fn focused_border(&self, app: &mut App) -> Option<InputBorderRef>

Dart’s focused_border getter.
Source§

fn focused_error_border(&self, app: &mut App) -> Option<InputBorderRef>

Dart’s focused_error_border getter.
Source§

fn disabled_border(&self, app: &mut App) -> Option<InputBorderRef>

Dart’s disabled_border getter.
Source§

fn enabled_border(&self, app: &mut App) -> Option<InputBorderRef>

Dart’s enabled_border getter.
Source§

fn border(&self, app: &mut App) -> Option<InputBorderRef>

Dart’s border getter.
Source§

fn align_label_with_hint(&self, app: &mut App) -> bool

Dart’s align_label_with_hint getter.
Source§

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

Dart’s constraints getter.
Source§

fn visual_density(&self, app: &mut App) -> Option<VisualDensity>

Dart’s visual_density getter.
Source§

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

Dart’s supporting_text_padding getter.
Source§

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

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 InputDecorationThemeData

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 InputDecorationThemeData

Auto Trait Implementations§

§

impl !RefUnwindSafe for InputDecorationThemeData

§

impl !Send for InputDecorationThemeData

§

impl !Sync for InputDecorationThemeData

§

impl !UnwindSafe for InputDecorationThemeData

§

impl Forget for InputDecorationThemeData

§

impl Freeze for InputDecorationThemeData

§

impl Move for InputDecorationThemeData

§

impl Unpin for InputDecorationThemeData

§

impl UnsafeUnpin for InputDecorationThemeData

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>