SDGAInputDecoration class
The labels, icons, and styles used to an input field.
The SDGATextField and SDGAInputDecorator classes use SDGAInputDecoration objects to describe their decoration. (In fact, this class is merely the configuration of an SDGAInputDecorator, which does all the heavy lifting.)
See also:
- SDGATextField, which is a text input widget that uses an SDGAInputDecoration.
- SDGAInputDecorator, which is a widget that draws an SDGAInputDecoration around an input child widget.
- Annotations
Constructors
- SDGAInputDecoration({SDGAInputDecorationStyle style = SDGAInputDecorationStyle.filledDefault, Widget? label, String? labelText, Widget? helper, String? helperText, int? helperMaxLines, String? hintText, TextDirection? hintTextDirection, int? hintMaxLines, Duration? hintFadeDuration, Widget? error, String? errorText, int? errorMaxLines, Widget? prefixIcon, Widget? prefix, String? prefixText, Widget? suffixIcon, Widget? suffix, String? suffixText, Widget? counter, String? counterText, bool enabled = true, String? semanticCounterText})
-
Creates a bundle of the labels, icons, and styles used to
decorate an input field.
const
Properties
- counter → Widget?
-
Optional custom counter widget to go in the place otherwise occupied by
counterText. If this property is non null, then counterText is
ignored.
final
- counterText → String?
-
Optional text to place below the line as a character count.
final
- enabled → bool
-
Whether the input is enabled or not.
final
- error → Widget?
-
Optional widget that appears below the SDGAInputDecorator.child and the border.
final
- errorMaxLines → int?
-
The maximum number of lines the errorText can occupy.
final
- errorText → String?
-
Text that appears below the SDGAInputDecorator.child and the border.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- helper → Widget?
-
Optional widget that appears below the SDGAInputDecorator.child.
final
- helperMaxLines → int?
-
The maximum number of lines the helperText can occupy.
final
- helperText → String?
-
Text that provides context about the SDGAInputDecorator.child's value, such
as how the value will be used.
final
- hintFadeDuration → Duration?
-
The duration of the hintText fade in and fade out animations.
final
- hintMaxLines → int?
-
The maximum number of lines the hintText can occupy.
final
- hintText → String?
-
Text that suggests what sort of input the field accepts.
final
- hintTextDirection → TextDirection?
-
The direction to use for the hintText.
final
- label → Widget?
-
Optional widget that describes the input field.
final
- labelText → String?
-
Optional text that describes the input field.
final
- prefix → Widget?
-
Optional widget to place on the start of the decoration's container.
final
- prefixIcon → Widget?
-
An icon that appears after the prefix or prefixText and before
the editable part of the text field, within the decoration's container.
final
- prefixText → String?
-
Optional text prefix to place on the start of the decoration's container.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticCounterText → String?
-
A semantic label for the counterText.
final
- style → SDGAInputDecorationStyle
-
Defines the visual style variant for the input decoration.
final
- suffix → Widget?
-
Optional widget to place on the end of the decoration's container.
final
- suffixIcon → Widget?
-
An icon that appears after the editable part of the text field and
before the suffix or suffixText, within the decoration's container.
final
- suffixText → String?
-
Optional text suffix to place on the end of the decoration's container.
final
Methods
-
copyWith(
{SDGAInputDecorationStyle? style, Widget? label, String? labelText, Widget? helper, String? helperText, int? helperMaxLines, String? hintText, TextDirection? hintTextDirection, Duration? hintFadeDuration, int? hintMaxLines, Widget? error, String? errorText, int? errorMaxLines, Widget? prefixIcon, Widget? prefix, String? prefixText, Widget? suffixIcon, Widget? suffix, String? suffixText, Widget? counter, String? counterText, bool? enabled, String? semanticCounterText}) → SDGAInputDecoration - Creates a copy of this input decoration with the given fields replaced by the new values.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override