TextFieldConfiguration class

Supply an instance of this class to the TypeAhead.textFieldConfiguration property to configure the displayed text field

Constructors

TextFieldConfiguration({InputDecoration decoration = const InputDecoration(), TextStyle? style, TextEditingController? controller, ValueChanged<String>? onChanged, ValueChanged<String>? onSubmitted, bool obscureText = false, bool maxLengthEnforced = true, int? maxLength, int maxLines = 1, int? minLines, bool autocorrect = true, List<TextInputFormatter>? inputFormatters, bool autofocus = false, TextInputType keyboardType = TextInputType.text, bool enabled = true, bool enableSuggestions = true, TextAlign textAlign = TextAlign.start, FocusNode? focusNode, Color? cursorColor, Radius? cursorRadius, TextInputAction? textInputAction, TextCapitalization textCapitalization = TextCapitalization.none, double cursorWidth = 2.0, Brightness? keyboardAppearance, VoidCallback? onEditingComplete, GestureTapCallback? onTap, TextDirection? textDirection, EdgeInsets scrollPadding = const EdgeInsets.all(20.0), bool enableInteractiveSelection = true})
Creates a TextFieldConfiguration
const

Properties

autocorrect → bool
Whether to enable autocorrection.
final
autofocus → bool
Whether this text field should focus itself if nothing else is already focused.
final
controller → TextEditingController?
Controls the text being edited.
final
cursorColor → Color?
The color to use when painting the cursor.
final
cursorRadius → Radius?
How rounded the corners of the cursor should be. By default, the cursor has a null Radius
final
cursorWidth → double
How thick the cursor will be.
final
decoration → InputDecoration
The decoration to show around the text field.
final
enabled → bool
If false the textfield is "disabled": it ignores taps and its decoration is rendered in grey.
final
enableInteractiveSelection → bool
final
enableSuggestions → bool
Whether to show input suggestions as the user types.
final
focusNode → FocusNode?
Controls whether this widget has keyboard focus.
final
hashCode → int
The hash code for this object.
no setterinherited
inputFormatters → List<TextInputFormatter>?
Optional input validation and formatting overrides.
final
keyboardAppearance → Brightness?
The appearance of the keyboard.
final
keyboardType → TextInputType
The type of keyboard to use for editing the text.
final
maxLength → int?
The maximum number of characters (Unicode scalar values) to allow in the text field.
final
maxLengthEnforced → bool
If true, prevents the field from allowing more than maxLength characters.
final
maxLines → int
The maximum number of lines for the text to span, wrapping if necessary.
final
minLines → int?
The minimum number of lines to occupy when the content spans fewer lines.
final
obscureText → bool
Whether to hide the text being edited (e.g., for passwords).
final
onChanged → ValueChanged<String>?
Called when the text being edited changes.
final
onEditingComplete → VoidCallback?
Called when the user submits editable content (e.g., user presses the "done" button on the keyboard).
final
onSubmitted → ValueChanged<String>?
Called when the user indicates that they are done editing the text in the field.
final
onTap → VoidCallback?
Called for each distinct tap except for every second tap of a double tap.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scrollPadding → EdgeInsets
Configures padding to edges surrounding a Scrollable when the Textfield scrolls into view.
final
style → TextStyle?
The style to use for the text being edited.
final
textAlign → TextAlign
How the text being edited should be aligned horizontally.
final
textCapitalization → TextCapitalization
Configures how the platform keyboard will select an uppercase or lowercase keyboard.
final
textDirection → TextDirection?
Same as TextField.textDirection
final
textInputAction → TextInputAction?
The type of action button to use for the keyboard.
final

Methods

copyWith({InputDecoration? decoration, TextStyle? style, TextEditingController? controller, ValueChanged<String>? onChanged, ValueChanged<String>? onSubmitted, bool? obscureText, bool? maxLengthEnforced, int? maxLength, int? maxLines, int? minLines, bool? autocorrect, List<TextInputFormatter>? inputFormatters, bool? autofocus, TextInputType? keyboardType, bool? enabled, bool? enableSuggestions, TextAlign? textAlign, FocusNode? focusNode, Color? cursorColor, Radius? cursorRadius, double? cursorWidth, Brightness? keyboardAppearance, VoidCallback? onEditingComplete, GestureTapCallback? onTap, EdgeInsets? scrollPadding, TextCapitalization? textCapitalization, TextDirection? textDirection, TextInputAction? textInputAction, bool? enableInteractiveSelection}) → dynamic
Copies the TextFieldConfiguration and only changes the specified properties
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