MaterialTextFieldData class final

Material-specific configuration for a text field widget.

Extends PlatformTextFieldData with Material-only properties.

Inheritance

Constructors

MaterialTextFieldData({Key? widgetKey, Object groupId = kDefaultGroupId, TextEditingController? controller, FocusNode? focusNode, UndoHistoryController? undoController, TextInputType? keyboardType, TextInputAction? textInputAction, TextCapitalization textCapitalization = kDefaultTextCapitalization, TextStyle? style, StrutStyle? strutStyle, TextAlign textAlign = kDefaultTextAlign, TextAlignVertical? textAlignVertical, TextDirection? textDirection, bool readOnly = kDefaultReadOnly, bool? showCursor, bool autofocus = kDefaultAutofocus, String obscuringCharacter = kDefaultObscuringCharacter, bool obscureText = kDefaultObscureText, bool? autocorrect, SmartDashesType? smartDashesType, SmartQuotesType? smartQuotesType, bool enableSuggestions = kDefaultEnableSuggestions, int maxLines = kDefaultMaxLines, int? minLines, bool expands = kDefaultExpands, int? maxLength, MaxLengthEnforcement? maxLengthEnforcement = kDefaultMaxLengthEnforcement, ValueChanged<String>? onChanged, VoidCallback? onEditingComplete, ValueChanged<String>? onSubmitted, List<TextInputFormatter>? inputFormatters, bool? enabled, double cursorWidth = kDefaultCursorWidth, double? cursorHeight, Radius? cursorRadius = kDefaultCursorRadius, bool cursorOpacityAnimates = kDefaultCursorOpacityAnimates, Color? cursorColor, BoxHeightStyle? selectionHeightStyle, BoxWidthStyle? selectionWidthStyle, Brightness? keyboardAppearance, DragStartBehavior dragStartBehavior = kDefaultDragStartBehavior, bool? enableInteractiveSelection = kDefaultEnableInteractiveSelection, bool? selectAllOnFocus = kDefaultSelectAllOnFocus, TextSelectionControls? selectionControls, GestureTapCallback? onTap, TapRegionCallback? onTapOutside, TapRegionUpCallback? onTapUpOutside, ScrollController? scrollController, ScrollPhysics? scrollPhysics, EdgeInsets scrollPadding = kDefaultScrollPadding, Iterable<String>? autofillHints, ContentInsertionConfiguration? contentInsertionConfiguration, Clip clipBehavior = kDefaultClipBehavior, String? restorationId, bool stylusHandwritingEnabled = kDefaultStylusHandwritingEnabled, bool enableIMEPersonalizedLearning = kDefaultEnableIMEPersonalizedLearning, EditableTextContextMenuBuilder? contextMenuBuilder, SpellCheckConfiguration? spellCheckConfiguration, TextMagnifierConfiguration? magnifierConfiguration, InputCounterWidgetBuilder? buildCounter, bool canRequestFocus = kDefaultCanRequestFocus, Color? cursorErrorColor, InputDecoration decoration = kDefaultDecoration, List<Locale>? hintLocales, bool? ignorePointers, MouseCursor? mouseCursor, AppPrivateCommandCallback? onAppPrivateCommand, bool onTapAlwaysCalled = kDefaultOnTapAlwaysCalled, WidgetStatesController? statesController})
Creates Material-specific text field configuration.
const

Properties

autocorrect bool?
Whether to enable autocorrect.
finalinherited
autofillHints Iterable<String>?
Autofill hints for the text field.
finalinherited
autofocus bool
Whether the text field should autofocus.
finalinherited
buildCounter InputCounterWidgetBuilder?
Builder for a custom input counter widget.
final
canRequestFocus bool
Whether the text field can request focus.
final
clipBehavior Clip
Clip behavior for the text field.
finalinherited
contentInsertionConfiguration ContentInsertionConfiguration?
Configuration for content insertion.
finalinherited
contextMenuBuilder EditableTextContextMenuBuilder?
Context menu builder for the text field.
finalinherited
controller TextEditingController?
Text editing controller.
finalinherited
cursorColor Color?
Color of the cursor.
finalinherited
cursorErrorColor Color?
Color of the cursor when the field has an error.
final
cursorHeight double?
Height of the cursor.
finalinherited
cursorOpacityAnimates bool
Whether the cursor opacity animates.
finalinherited
cursorRadius Radius?
Radius of the cursor.
finalinherited
cursorWidth double
Width of the cursor.
finalinherited
decoration InputDecoration
Input decoration for the text field.
final
dragStartBehavior DragStartBehavior
Drag start behavior for text selection.
finalinherited
enabled bool?
Whether the text field is enabled.
finalinherited
enableIMEPersonalizedLearning bool
Whether to enable IME personalized learning.
finalinherited
enableInteractiveSelection bool?
Whether interactive selection is enabled.
finalinherited
enableSuggestions bool
Whether to enable input suggestions.
finalinherited
expands bool
Whether the text field expands to fill its parent.
finalinherited
focusNode FocusNode?
Focus node for the text field.
finalinherited
groupId Object
Group ID for undo history grouping.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
hintLocales List<Locale>?
Locales used for hint text.
final
ignorePointers bool?
Whether to ignore pointer events.
final
inputFormatters List<TextInputFormatter>?
Input formatters applied to the text.
finalinherited
keyboardAppearance Brightness?
Keyboard appearance (light or dark).
finalinherited
keyboardType TextInputType?
Keyboard type for the text field.
finalinherited
magnifierConfiguration TextMagnifierConfiguration?
Magnifier configuration.
finalinherited
maxLength int?
Maximum character length.
finalinherited
maxLengthEnforcement MaxLengthEnforcement?
How max length is enforced.
finalinherited
maxLines int
Maximum number of lines.
finalinherited
minLines int?
Minimum number of lines.
finalinherited
mouseCursor MouseCursor?
Mouse cursor when hovering over the text field.
final
obscureText bool
Whether to obscure the text (e.g., for passwords).
finalinherited
obscuringCharacter String
Character used to obscure text.
finalinherited
onAppPrivateCommand AppPrivateCommandCallback?
Callback for app-private commands.
final
onChanged ValueChanged<String>?
Callback when the text changes.
finalinherited
onEditingComplete VoidCallback?
Callback when editing is complete.
finalinherited
onSubmitted ValueChanged<String>?
Callback when the text is submitted.
finalinherited
onTap GestureTapCallback?
Callback when the text field is tapped.
finalinherited
onTapAlwaysCalled bool
Whether onTap is always called, even when the field already has focus.
final
onTapOutside TapRegionCallback?
Callback when tapping outside the text field.
finalinherited
onTapUpOutside TapRegionUpCallback?
Callback when a tap-up occurs outside the text field.
finalinherited
readOnly bool
Whether the text field is read-only.
finalinherited
restorationId String?
Restoration ID for state restoration.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollController ScrollController?
Scroll controller for the text field.
finalinherited
scrollPadding EdgeInsets
Scroll padding for the text field.
finalinherited
scrollPhysics ScrollPhysics?
Scroll physics for the text field.
finalinherited
selectAllOnFocus bool?
Whether to select all text on focus.
finalinherited
selectionControls TextSelectionControls?
Custom text selection controls.
finalinherited
selectionHeightStyle BoxHeightStyle?
Selection height style.
finalinherited
selectionWidthStyle BoxWidthStyle?
Selection width style.
finalinherited
showCursor bool?
Whether to show the cursor.
finalinherited
smartDashesType SmartDashesType?
Smart dashes type.
finalinherited
smartQuotesType SmartQuotesType?
Smart quotes type.
finalinherited
spellCheckConfiguration SpellCheckConfiguration?
Spell check configuration.
finalinherited
statesController WidgetStatesController?
Widget states controller for the text field.
final
strutStyle StrutStyle?
Strut style for the input text.
finalinherited
style TextStyle?
Text style for the input text.
finalinherited
stylusHandwritingEnabled bool
Whether stylus handwriting is enabled.
finalinherited
textAlign TextAlign
Text alignment within the field.
finalinherited
textAlignVertical TextAlignVertical?
Vertical text alignment within the field.
finalinherited
textCapitalization TextCapitalization
Text capitalization behavior.
finalinherited
textDirection TextDirection?
Text direction for the input.
finalinherited
textInputAction TextInputAction?
Text input action button type.
finalinherited
undoController UndoHistoryController?
Undo history controller.
finalinherited
widgetKey Key?
Key applied to the underlying platform widget.
finalinherited

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

Constants

kDefaultCanRequestFocus → const bool
Default value for canRequestFocus.
kDefaultDecoration → const InputDecoration
Default value for decoration.
kDefaultOnTapAlwaysCalled → const bool
Default value for onTapAlwaysCalled.