TTextFieldTheme class

Theme configuration for TTextField.

TTextFieldTheme extends TInputFieldTheme with specific properties for text input, including:

  • Text styles (input, hint)
  • Keyboard configuration (type, action)
  • Input formatters and behavior (autocorrect, suggestions, obscure)
Inheritance
Implementers

Constructors

TTextFieldTheme({required WidgetStateProperty<Color> color, required WidgetStateProperty<Color>? backgroundColor, required WidgetStateProperty<Color> borderColor, required WidgetStateProperty<TextStyle> labelStyle, required WidgetStateProperty<TextStyle> floatingLabelStyle, required WidgetStateProperty<TextStyle> helperTextStyle, required WidgetStateProperty<TextStyle> errorTextStyle, required WidgetStateProperty<TextStyle> tagStyle, required WidgetStateProperty<double> borderRadius, required WidgetStateProperty<double> borderWidth, required WidgetStateProperty<LabelBuilder> labelBuilder, required WidgetStateProperty<HelperTextBuilder> helperTextBuilder, required WidgetStateProperty<ErrorsBuilder> errorsBuilder, required WidgetStateProperty<TextStyle> hintStyle, required WidgetStateProperty<TextStyle> textStyle, required TInputSize size, required TInputDecorationType decorationType, required TLabelPosition labelPosition, Widget? preWidget, Widget? postWidget, double? height, EdgeInsets? padding, double? fontSize, List<TextInputFormatter>? inputFormatters, TextInputType? keyboardType, TextCapitalization textCapitalization = TextCapitalization.none, bool autocorrect = true, bool enableSuggestions = true, int? maxLength, MaxLengthEnforcement? maxLengthEnforcement, TextInputAction? textInputAction, bool obscureText = false})
Creates a text field theme.
const
TTextFieldTheme.defaultTheme(ColorScheme colors)
Creates a default theme derived from the context colors.
factory

Properties

autocorrect → bool
Whether to enable autocorrect.
final
backgroundColor → WidgetStateProperty<Color>?
finalinherited
borderColor → WidgetStateProperty<Color>
finalinherited
borderRadius → WidgetStateProperty<double>
finalinherited
borderWidth → WidgetStateProperty<double>
finalinherited
color → WidgetStateProperty<Color>
finalinherited
decorationType → TInputDecorationType
finalinherited
enableSuggestions → bool
Whether to show suggestions.
final
errorsBuilder → WidgetStateProperty<ErrorsBuilder>
finalinherited
errorTextStyle → WidgetStateProperty<TextStyle>
finalinherited
fieldFontSize → double
no setterinherited
fieldHeight → double
no setterinherited
fieldPadding → EdgeInsets
no setterinherited
floatingLabelStyle → WidgetStateProperty<TextStyle>
finalinherited
fontSize → double?
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
height → double?
finalinherited
helperTextBuilder → WidgetStateProperty<HelperTextBuilder>
finalinherited
helperTextStyle → WidgetStateProperty<TextStyle>
finalinherited
hintStyle → WidgetStateProperty<TextStyle>
finalinherited
inputFormatters → List<TextInputFormatter>?
Input formatters to apply.
final
keyboardType → TextInputType?
The keyboard type to use.
final
labelBuilder → WidgetStateProperty<LabelBuilder>
finalinherited
labelPosition → TLabelPosition
finalinherited
labelStyle → WidgetStateProperty<TextStyle>
finalinherited
maxLength → int?
Maximum character length.
final
maxLengthEnforcement → MaxLengthEnforcement?
Policy for enforcing max length.
final
obscureText → bool
Whether to obscure the text (for passwords).
final
padding → EdgeInsets?
finalinherited
postWidget → Widget?
finalinherited
preWidget → Widget?
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → TInputSize
finalinherited
tagStyle → WidgetStateProperty<TextStyle>
finalinherited
textCapitalization → TextCapitalization
Text capitalization behavior.
final
textInputAction → TextInputAction?
The text input action (e.g., done, next).
final
textStyle → WidgetStateProperty<TextStyle>
Style for the input text.
final

Methods

buildInfoIcon(String info, ColorScheme colors) → Widget
inherited
buildInputBorder(Set<WidgetState> states) → InputBorder
inherited
buildInputDecoration(BuildContext context, Set<WidgetState> states, {bool expands = false, Widget? beforePostWidget, Widget? beforePreWidget, String? label, String? placeholder, String? tag, String? helperText, List<String>? errors, bool isRequired = false, VoidCallback? onClear, Widget? infoIcon, FloatingLabelAlignment? labelAlignment}) → InputDecoration
inherited
buildTextField(Set<WidgetState> states, {bool autoFocus = false, bool readOnly = false, int rows = 1, FocusNode? focusNode, TextInputType? keyboardType, TextInputAction? textInputAction, List<TextInputFormatter>? inputFormatters, TextEditingController? controller, ValueChanged<String>? onValueChanged, VoidCallback? onTap, required InputDecoration inputDecoration, TextAlign textAlign = TextAlign.start, TextAlignVertical? textAlignVertical}) → Widget
copyWith({TInputSize? size, TInputDecorationType? decorationType, TLabelPosition? labelPosition, WidgetStateProperty<Color>? color, WidgetStateProperty<Color>? backgroundColor, WidgetStateProperty<Color>? borderColor, WidgetStateProperty<TextStyle>? labelStyle, WidgetStateProperty<TextStyle>? floatingLabelStyle, WidgetStateProperty<TextStyle>? helperTextStyle, WidgetStateProperty<TextStyle>? errorTextStyle, WidgetStateProperty<TextStyle>? tagStyle, WidgetStateProperty<TextStyle>? hintStyle, WidgetStateProperty<double>? borderRadius, WidgetStateProperty<double>? borderWidth, WidgetStateProperty<LabelBuilder>? labelBuilder, WidgetStateProperty<HelperTextBuilder>? helperTextBuilder, WidgetStateProperty<ErrorsBuilder>? errorsBuilder, WidgetStateProperty<TextStyle>? textStyle, Widget? preWidget, Widget? postWidget, double? height, EdgeInsets? padding, double? fontSize, List<TextInputFormatter>? inputFormatters, TextInputType? keyboardType, TextCapitalization? textCapitalization, bool? autocorrect, bool? enableSuggestions, int? maxLength, MaxLengthEnforcement? maxLengthEnforcement, TextInputAction? textInputAction, bool? obscureText}) → TTextFieldTheme
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveBackgroundColor(BuildContext context, Set<WidgetState> states) → Color
inherited
toString() → String
A string representation of this object.
inherited

Operators

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