Flutter TextField (a TextFormField when it validates).
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
-
autocorrect
→ const PropDef<
bool> -
autofillHints
→ const PropDef<
List< String> > -
AutofillHintsnames (email,password...). -
autofocus
→ const PropDef<
bool> -
autovalidateMode
→ const PropDef<
AutovalidateMode> -
cursorColor
→ const PropDef<
Color?> -
cursorHeight
→ const PropDef<
double?> -
cursorRadius
→ const PropDef<
double?> -
Radius.circular(cursorRadius). -
cursorWidth
→ const PropDef<
double> -
decoration
→ const PropDef<
InputDecoration> -
The field's label, hint, helper and error texts, border (per state), fill, padding and icons (Flutter's
InputDecoration). -
enabled
→ const PropDef<
bool> -
enableInteractiveSelection
→ const PropDef<
bool> -
enableSuggestions
→ const PropDef<
bool> -
The keyboard's word suggestions (Flutter's
enableSuggestions); off for a password field whatever this says. -
expands
→ const PropDef<
bool> -
focusRingColor
→ const PropDef<
Color?> - A ring drawn around the field while it has focus.
-
focusRingWidth
→ const PropDef<
double> -
initialValue
→ const PropDef<
String> -
The text it starts with (
TextFormField.initialValue). -
inputFormatter
→ const PropDef<
Json> -
The input formatter (
{"type": "none"|"email"|"phone"|..., ...}). -
keyboardDecimal
→ const PropDef<
bool> -
A number keyboard with a decimal point (
TextInputType.numberWithOptions(decimal: true)). -
keyboardSigned
→ const PropDef<
bool> -
A number keyboard with a sign key (
TextInputType.numberWithOptions(signed: true)). -
keyboardType
→ const PropDef<
TextInputType> -
The on-screen keyboard to show (Flutter's
TextInputType):text,number,emailAddress,phone,url,multiline... -
markdown
→ const PropDef<
Json?> - Markdown highlighting of the typed text.
-
max
→ const PropDef<
double?> -
maxLength
→ const PropDef<
int?> -
maxLines
→ const PropDef<
int> -
0: no limit (Flutter's
maxLines: null). -
min
→ const PropDef<
double?> - Bounds and increment for a number field. Up/Down step by step, Page Up/Down by ten steps, and Home/End reach the bounds when supplied.
-
minLines
→ const PropDef<
int?> -
obscureText
→ const PropDef<
bool> - Hides what is typed (a password field).
-
obscuringCharacter
→ const PropDef<
String> -
otpDigitsOnly
→ const PropDef<
bool> - With otpLength: only the digits 0 to 9 are kept, typed or pasted, and the keyboard is the number pad.
-
otpLength
→ const PropDef<
int> - A one-time code: the number of boxes the field is drawn as, one per character (0: an ordinary field). It stays one field: one value, one Tab stop, one semantics node; typing, paste and Backspace as in any.
-
readOnly
→ const PropDef<
bool> -
runs
→ const PropDef<
List< TextRun> > -
Styled ranges over the typed text, merged over style, as a text's
runsare over its text (Flutter'sTextEditingController.buildTextSpan): a syntax error's place drawn in red. A range past the text's end is cut at it; while a word is being composed the text is drawn plain. -
selectAllOnFocus
→ const PropDef<
bool> - Selects the whole text when the field gains focus.
-
selectionHeightStyle
→ const PropDef<
BoxHeightStyle> -
selectionWidthStyle
→ const PropDef<
BoxWidthStyle> -
semanticLabel
→ const PropDef<
String> - An accessible name when the visible label is drawn by a parent block.
-
showCursor
→ const PropDef<
bool?> - spec → const WidgetSpec
-
step
→ const PropDef<
double> -
steppers
→ const PropDef<
bool> - A number field with a minus button before its value and a plus button after it, inside its one border with a rule between each: a press steps the value by step within min and max (a button at its bound is drawn disabled and takes no press), as Up and Down do.
-
style
→ const PropDef<
TextStyle> - The typed text's style; unset is the theme's.
-
textAlign
→ const PropDef<
TextAlign> -
textAlignVertical
→ const PropDef<
TextAlignVertical?> -
textCapitalization
→ const PropDef<
TextCapitalization> -
textInputAction
→ const PropDef<
TextInputAction?> -
validator
→ const PropDef<
String> -
Flutter's
TextFormField.validator,(value) => String?: an expression that reads the field's text asvalueand gives the error to show under the field, or nothing (empty, null) when it is valid:"${= value == '' ? 'Enter your email.' : ''}". The field shows it when its form is validated, and as autovalidateMode says.