Class TextField
Inheritance
System.Object
TextField
Syntax
public class TextField : StatefulWidget
Constructors
TextField(Key, TextEditingController, FocusNode, InputDecoration, Boolean, TextInputType, Nullable<TextInputAction>, TextCapitalization, TextStyle, TextAlign, TextDirection, Boolean, Boolean, Boolean, Nullable<Int32>, Nullable<Int32>, Boolean, ValueChanged<String>, VoidCallback, ValueChanged<String>, List<TextInputFormatter>, Nullable<Boolean>, Nullable<Single>, Radius, Color, Nullable<Brightness>, EdgeInsets, DragStartBehavior, Nullable<Boolean>, GestureTapCallback, InputCounterWidgetBuilder)
Declaration
public TextField(Key key = null, TextEditingController controller = null, FocusNode focusNode = null, InputDecoration decoration = null, bool noDecoration = false, TextInputType keyboardType = null, TextInputAction? textInputAction = default(TextInputAction? ), TextCapitalization textCapitalization = TextCapitalization.none, TextStyle style = null, TextAlign textAlign = TextAlign.left, TextDirection textDirection = TextDirection.ltr, bool autofocus = false, bool obscureText = false, bool autocorrect = false, int? maxLines, int? maxLength = default(int? ), bool maxLengthEnforced = true, ValueChanged<string> onChanged = null, VoidCallback onEditingComplete = null, ValueChanged<string> onSubmitted = null, List<TextInputFormatter> inputFormatters = null, bool? enabled = default(bool? ), float? cursorWidth, Radius cursorRadius = null, Color cursorColor = null, Brightness? keyboardAppearance = default(Brightness? ), EdgeInsets scrollPadding = null, DragStartBehavior dragStartBehavior = DragStartBehavior.down, bool? enableInteractiveSelection = default(bool? ), GestureTapCallback onTap = null, InputCounterWidgetBuilder buildCounter = null)
Parameters
Fields
autocorrect
Declaration
public readonly bool autocorrect
Field Value
Type |
Description |
System.Boolean |
|
autofocus
Declaration
public readonly bool autofocus
Field Value
Type |
Description |
System.Boolean |
|
buildCounter
Declaration
public readonly InputCounterWidgetBuilder buildCounter
Field Value
controller
Declaration
public readonly TextEditingController controller
Field Value
cursorColor
Declaration
public readonly Color cursorColor
Field Value
cursorRadius
Declaration
public readonly Radius cursorRadius
Field Value
cursorWidth
Declaration
public readonly float? cursorWidth
Field Value
Type |
Description |
System.Nullable<System.Single> |
|
decoration
Declaration
public readonly InputDecoration decoration
Field Value
dragStartBehavior
Declaration
public readonly DragStartBehavior dragStartBehavior
Field Value
enabled
Declaration
public readonly bool? enabled
Field Value
Type |
Description |
System.Nullable<System.Boolean> |
|
enableInteractiveSelection
Declaration
public readonly bool? enableInteractiveSelection
Field Value
Type |
Description |
System.Nullable<System.Boolean> |
|
focusNode
Declaration
public readonly FocusNode focusNode
Field Value
inputFormatters
Declaration
public readonly List<TextInputFormatter> inputFormatters
Field Value
keyboardAppearance
Declaration
public readonly Brightness? keyboardAppearance
Field Value
keyboardType
Declaration
public readonly TextInputType keyboardType
Field Value
maxLength
Declaration
public readonly int? maxLength
Field Value
Type |
Description |
System.Nullable<System.Int32> |
|
maxLengthEnforced
Declaration
public readonly bool maxLengthEnforced
Field Value
Type |
Description |
System.Boolean |
|
maxLines
Declaration
public readonly int? maxLines
Field Value
Type |
Description |
System.Nullable<System.Int32> |
|
noMaxLength
Declaration
public const long noMaxLength = -1L
Field Value
Type |
Description |
System.Int64 |
|
obscureText
Declaration
public readonly bool obscureText
Field Value
Type |
Description |
System.Boolean |
|
onChanged
Declaration
public readonly ValueChanged<string> onChanged
Field Value
onEditingComplete
Declaration
public readonly VoidCallback onEditingComplete
Field Value
onSubmitted
Declaration
public readonly ValueChanged<string> onSubmitted
Field Value
onTap
Declaration
public readonly GestureTapCallback onTap
Field Value
scrollPadding
Declaration
public readonly EdgeInsets scrollPadding
Field Value
style
Declaration
public readonly TextStyle style
Field Value
textAlign
Declaration
public readonly TextAlign textAlign
Field Value
textCapitalization
Declaration
public readonly TextCapitalization textCapitalization
Field Value
textDirection
Declaration
public readonly TextDirection textDirection
Field Value
textInputAction
Declaration
public readonly TextInputAction? textInputAction
Field Value
Properties
selectionEnabled
Declaration
public bool selectionEnabled { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
createState()
Declaration
public override State createState()
Returns
Overrides
debugFillProperties(DiagnosticPropertiesBuilder)
Declaration
public override void debugFillProperties(DiagnosticPropertiesBuilder properties)
Parameters
Overrides