TextField constructor
const
TextField({
- Key? key,
- String? label,
- TextStyle? labelStyle,
- String? hintText,
- FocusNode? focusNode,
- String? errorText,
- bool enabled = true,
- bool readOnly = false,
- Widget? suffix,
- Widget? suffixIcon,
- Widget? prefix,
- Widget? prefixIcon,
- bool obscureText = false,
- bool? filled,
- BorderRadius? borderRadius,
- TextEditingController? controller,
- List<
InputFeedbackText> ? feedback, - TextInputType? keyboardType,
- List<
TextInputFormatter> ? inputFormatters, - TextCapitalization textCapitalization = material.TextCapitalization.none,
- TextAlign textAlign = material.TextAlign.start,
- TextInputAction? textInputAction,
- int? maxLength,
- int? maxLines = 1,
- int? minLines,
- bool? expands,
- TextStyle? textStyle,
- void onChanged(
- String value
- InputDecoration? decoration,
- bool overrideDecoration = false,
- TextAlignVertical? textAlignVertical,
- WrapWidgetBuilder? innerBoxWrapper,
- ValueChanged<
String> ? onSubmitted, - EdgeInsets scrollPadding = const EdgeInsets.all(10),
- bool? autocorrect,
- double? cursorHeight,
- bool forceErrorStyle = false,
- Iterable<
String> ? autofillHints = const [],
Implementation
const TextField({
Key? key,
this.label,
this.labelStyle,
this.hintText,
this.focusNode,
this.errorText,
this.enabled = true,
this.readOnly = false,
this.suffix,
this.suffixIcon,
this.prefix,
this.prefixIcon,
this.obscureText = false,
this.filled,
this.borderRadius,
this.controller,
this.feedback,
this.keyboardType,
this.inputFormatters,
this.textCapitalization = material.TextCapitalization.none,
this.textAlign = material.TextAlign.start,
this.textInputAction,
this.maxLength,
this.maxLines = 1,
this.minLines,
this.expands,
this.textStyle,
this.onChanged,
this.decoration,
this.overrideDecoration = false,
this.textAlignVertical,
this.innerBoxWrapper,
this.onSubmitted,
this.scrollPadding = const EdgeInsets.all(10),
this.autocorrect,
this.cursorHeight,
this.forceErrorStyle = false,
this.autofillHints = const [],
}) : super(key: key);