FieldStyleTextField class
Comprehensive style configuration for text input fields.
Provides extensive customization options for text fields including appearance, behavior, validation, formatting, and interaction handling. Supports features like masking, password visibility, custom validation rules, and various text input configurations. Includes factory methods for common styling patterns.
- Inheritance
-
- Object
- FieldStyle
- FieldStyleTextField
Constructors
-
FieldStyleTextField({VoidCallback? onEditingComplete, ValueChanged<
String> ? onSubmitted, ScrollController? scrollController, ScrollPhysics? scrollPhysics, Iterable<String> ? autofillHints, dynamic handleValidationError(FormValidationResult handleError)?, bool? passwordVisible, Widget? prefixIcon, PrefixIconAlignment? prefixIconAlignment, Color? backgroundColor, BorderRadius? borderRadius, InputBorder? border, InputBorder? focusedBorder, InputBorder? enabledBorder, EdgeInsetsGeometry? contentPadding, bool? passwordViewable, bool? validateOnFocusChange, bool customValidationRule(dynamic value)?, Widget? header, bool? clearable, Widget? clearIcon, String? mask, String? maskMatch, bool? maskedReturnValue, DecoratorTextField? decorator, String? labelText, TextStyle? labelStyle, FieldLabelPosition? labelPosition, TextEditingController? controller, bool obscureText = false, int? maxLines, int? minLines, TextInputType keyboardType = TextInputType.text, bool autoFocus = false, TextAlign? textAlign, bool enableSuggestions = true, FocusNode? focusNode, String? hintText, TextStyle? hintStyle, String? dummyData, dynamic onChanged(String value)?, TextInputAction? textInputAction, TextStyle? style, StrutStyle? strutStyle, TextAlignVertical? textAlignVertical, TextDirection? textDirection, String obscuringCharacter = '•', bool autocorrect = true, SmartDashesType? smartDashesType, SmartQuotesType? smartQuotesType, bool expands = false, bool readOnly = false, bool? showCursor = true, int? maxLength, MouseCursor? mouseCursor, String? validationErrorMessage, TextCapitalization textCapitalization = TextCapitalization.none, MaxLengthEnforcement? maxLengthEnforcement = MaxLengthEnforcement.enforced, AppPrivateCommandCallback? onAppPrivateCommand, List<TextInputFormatter> ? inputFormatters = const [], bool? enabled = true, double cursorWidth = 2.0, double? cursorHeight, Radius? cursorRadius = const Radius.circular(2.0), Color? cursorColor, Brightness? keyboardAppearance, EdgeInsets scrollPadding = const EdgeInsets.all(20.0), TextSelectionControls? selectionControls, DragStartBehavior dragStartBehavior = DragStartBehavior.start, GestureTapCallback? onTap, TapRegionCallback? onTapOutside, InputDecoration? decoration, Clip clipBehavior = Clip.hardEdge, Color? fillColor, bool? filled = false, bool? isDense = false, Widget? suffixIcon, SuffixIconAlignment? suffixIconAlignment, bool enableInteractiveSelection = true})
Properties
- autocorrect → bool
-
final
-
autofillHints
→ Iterable<
String> ? -
final
- autoFocus → bool
-
final
- backgroundColor → Color?
-
final
- border → InputBorder?
-
final
- borderRadius → BorderRadius?
-
final
- clearable → bool?
-
final
- clearIcon → Widget?
-
final
- clipBehavior → Clip
-
final
- contentPadding → EdgeInsetsGeometry?
-
final
- controller → TextEditingController?
-
final
- cursorColor → Color?
-
final
- cursorHeight → double?
-
final
- cursorRadius → Radius?
-
final
- cursorWidth → double
-
final
- customValidationRule → bool Function(dynamic value)?
-
final
- decoration → InputDecoration?
-
final
- decorator → DecoratorTextField?
-
final
- dragStartBehavior → DragStartBehavior
-
final
- dummyData → String?
-
final
- enabled → bool?
-
final
- enabledBorder → InputBorder?
-
final
- enableInteractiveSelection → bool
-
final
- enableSuggestions → bool
-
final
- expands → bool
-
final
- fillColor → Color?
-
final
- filled → bool?
-
final
- focusedBorder → InputBorder?
-
final
- focusNode → FocusNode?
-
final
-
final
-
getter/setter pairinherited
- handleValidationError → dynamic Function(FormValidationResult handleError)?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- header → Widget?
-
final
- headerSpacing ↔ double?
-
getter/setter pairinherited
- hintStyle → TextStyle?
-
final
- hintText → String?
-
final
-
inputFormatters
→ List<
TextInputFormatter> ? -
final
- isDense → bool?
-
final
- keyboardAppearance → Brightness?
-
final
- keyboardType → TextInputType
-
final
- labelPosition → FieldLabelPosition?
-
Where the field's name is shown: above it (the default) or floating
inside it.
final
- labelStyle → TextStyle?
-
final
- labelText → String?
-
final
- mask → String?
-
final
- maskedReturnValue → bool?
-
final
- maskMatch → String?
-
final
- maxLength → int?
-
final
- maxLengthEnforcement → MaxLengthEnforcement?
-
final
- maxLines → int?
-
final
- minLines → int?
-
final
- mouseCursor → MouseCursor?
-
final
- obscureText → bool
-
final
- obscuringCharacter → String
-
final
- onAppPrivateCommand → AppPrivateCommandCallback?
-
final
- onChanged → dynamic Function(String value)?
-
final
- onEditingComplete → VoidCallback?
-
final
-
onSubmitted
→ ValueChanged<
String> ? -
final
- onTap → VoidCallback?
-
final
- onTapOutside → TapRegionCallback?
-
final
- passwordViewable → bool?
-
final
- passwordVisible → bool?
-
final
- prefixIcon → Widget?
-
final
- prefixIconAlignment → PrefixIconAlignment?
-
Where prefixIcon sits vertically in a multi-line field.
final
- readOnly → bool
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollController → ScrollController?
-
final
- scrollPadding → EdgeInsets
-
final
- scrollPhysics → ScrollPhysics?
-
final
- selectionControls → TextSelectionControls?
-
final
- showCursor → bool?
-
final
- smartDashesType → SmartDashesType?
-
final
- smartQuotesType → SmartQuotesType?
-
final
- strutStyle → StrutStyle?
-
final
- style → TextStyle?
-
final
- suffixIcon → Widget?
-
final
- suffixIconAlignment → PrefixIconAlignment?
-
Where suffixIcon sits vertically in a multi-line field.
final
- textAlign → TextAlign?
-
final
- textAlignVertical → TextAlignVertical?
-
final
- textCapitalization → TextCapitalization
-
final
- textDirection → TextDirection?
-
final
- textInputAction → TextInputAction?
-
final
- validateOnFocusChange → bool?
-
final
- validationErrorMessage → String?
-
final
Methods
-
copyWith(
{String? labelText, TextStyle? labelStyle, FieldLabelPosition? labelPosition, TextEditingController? controller, bool? obscureText, int? maxLines, int? minLines, TextInputType? keyboardType, bool? autoFocus, TextAlign? textAlign, bool? enableSuggestions, FocusNode? focusNode, String? hintText, TextStyle? hintStyle, String? dummyData, dynamic onChanged(String value)?, TextInputAction? textInputAction, TextStyle? style, StrutStyle? strutStyle, TextAlignVertical? textAlignVertical, TextDirection? textDirection, String? obscuringCharacter, bool? autocorrect, SmartDashesType? smartDashesType, SmartQuotesType? smartQuotesType, bool? expands, bool? readOnly, bool? showCursor, int? maxLength, MouseCursor? mouseCursor, String? validationErrorMessage, TextCapitalization? textCapitalization, MaxLengthEnforcement? maxLengthEnforcement, AppPrivateCommandCallback? onAppPrivateCommand, List< TextInputFormatter> ? inputFormatters, bool? enabled, double? cursorWidth, double? cursorHeight, Radius? cursorRadius, Color? cursorColor, Brightness? keyboardAppearance, EdgeInsets? scrollPadding, TextSelectionControls? selectionControls, DragStartBehavior? dragStartBehavior, GestureTapCallback? onTap, TapRegionCallback? onTapOutside, InputDecoration? decoration, VoidCallback? onEditingComplete, ValueChanged<String> ? onSubmitted, ScrollController? scrollController, ScrollPhysics? scrollPhysics, Iterable<String> ? autofillHints, Clip? clipBehavior, bool? enableInteractiveSelection, dynamic handleValidationError(FormValidationResponse handleError)?, bool? passwordVisible, String? type, Widget? prefixIcon, PrefixIconAlignment? prefixIconAlignment, Color? backgroundColor, BorderRadius? borderRadius, InputBorder? border, InputBorder? focusedBorder, InputBorder? enabledBorder, EdgeInsetsGeometry? contentPadding, bool? passwordViewable, bool? validateOnFocusChange, bool customValidationRule(dynamic value)?, Widget? header, bool? clearable, Widget? clearIcon, String? mask, String? maskMatch, bool? maskedReturnValue, DecoratorTextField? decorator, double? headerSpacing, bool? filled, Color? fillColor, bool? isDense, Widget? suffixIcon, SuffixIconAlignment? suffixIconAlignment}) → FieldStyleTextField -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
toTextStyle(
) → TextStyle - To TextStyle converts the style to a TextStyle.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
base(
) → FieldStyleTextField - A plain text field. Colors, borders and padding come from the theme's NyFieldColors.
-
basic(
{FieldStyleTextField? field}) → FieldStyleTextField -
base, with
field's colors, borders and padding where it has them. -
emailAddress(
) → FieldStyleTextField - An email field with a mail icon and the email keyboard.
-
password(
{bool passwordViewable = true}) → FieldStyleTextField - A password field with a lock icon, its text hidden.