BlocXTextFieldOptions class

Configuration bag for BlocXFormTextField.

All fields are optional and have sensible defaults. Pass only what differs from the defaults.

Constructors

BlocXTextFieldOptions({InputDecoration? decoration, TextStyle? style, TextInputType? keyboardType, TextDirection? textDirection, TextCapitalization textCapitalization = TextCapitalization.none, TextInputAction? textInputAction, TextAlign textAlign = TextAlign.start, int? maxLines = 1, int? minLines, int? maxLength, List<TextInputFormatter> inputFormatters = const [], int? minLength, bool autofocus = false, bool obscureText = false, String? labelText, TextStyle? labelStyle, String? hintText, TextStyle? hintStyle, String? helperText, TextStyle? helperStyle, String? errorText, TextStyle? errorStyle, Widget? prefix, Widget? suffix, bool showClearButton = true, bool filled = true, Color? fillColor, BorderRadius? borderRadius, EdgeInsetsGeometry? contentPadding, bool enabled = true})
const

Properties

autofocus bool
Whether the field requests focus on first build. Defaults to false.
final
borderRadius BorderRadius?
Border radius for the default decoration.
final
contentPadding EdgeInsetsGeometry?
Content padding inside the field.
final
decoration InputDecoration?
Override the entire InputDecoration. When set, all other decoration fields are ignored.
final
enabled bool
Whether the field is interactive. Defaults to true.
final
errorStyle TextStyle?
Style for the error text.
final
errorText String?
Static error text. Overridden by any bloc-driven error on the same field.
final
fillColor Color?
Fill colour for the field background.
final
filled bool
Whether the field background is filled. Defaults to true.
final
hashCode int
The hash code for this object.
no setterinherited
helperStyle TextStyle?
Style for helperText.
final
helperText String?
Helper text displayed below the field.
final
hintStyle TextStyle?
Style for hintText.
final
hintText String?
Hint text displayed when the field is empty.
final
inputFormatters List<TextInputFormatter>
Input formatters applied before the value reaches the bloc.
final
keyboardType TextInputType?
Keyboard type hint (e.g. TextInputType.emailAddress).
final
labelStyle TextStyle?
Style for labelText.
final
labelText String?
Label text displayed as a floating label.
final
maxLength int?
Maximum character count (shows counter below the field).
final
maxLines int?
Maximum number of lines. Defaults to 1.
final
minLength int?
Minimum character count (validated externally).
final
minLines int?
Minimum number of lines.
final
obscureText bool
Whether to obscure input (e.g. passwords). Defaults to false.
final
prefix Widget?
Widget placed at the start of the field (prefix icon area).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showClearButton bool
Whether to show a clear (✕) button when the field has text.
final
style TextStyle?
Text style for the input value.
final
suffix Widget?
Widget placed at the end of the field (suffix icon area).
final
textAlign TextAlign
Horizontal alignment of the input text. Defaults to TextAlign.start.
final
textCapitalization TextCapitalization
Text capitalisation mode. Defaults to TextCapitalization.none.
final
textDirection TextDirection?
Explicit text direction. Auto-detected from content when omitted.
final
textInputAction TextInputAction?
Action button on the keyboard (e.g. TextInputAction.next).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited