TextField constructor
const
TextField({
- Key? key,
- TextEditingController? controller,
- String? hintText,
- String? labelText,
- TextStyle? hintStyle,
- TextStyle? labelStyle,
- TextInputType? keyboardType,
- TextCapitalization textCapitalization = TextCapitalization.none,
- bool obscureText = false,
- int? maxLines = 1,
- int? minLines,
- InputDecoration? decoration,
- TextInputAction? textInputAction,
- ValueChanged<
String> ? onChanged, - ValueChanged<
String> ? onSubmitted, - bool enabled = true,
- Widget? prefixIcon,
- Widget? suffixIcon,
- TextAlignVertical? textAlignVertical,
- bool expands = false,
- FocusNode? focusNode,
- bool autofocus = false,
Implementation
const TextField({
super.key,
this.controller,
this.hintText,
this.labelText,
this.hintStyle,
this.labelStyle,
this.keyboardType,
this.textCapitalization = TextCapitalization.none,
this.obscureText = false,
this.maxLines = 1,
this.minLines,
this.decoration,
this.textInputAction,
this.onChanged,
this.onSubmitted,
this.enabled = true,
this.prefixIcon,
this.suffixIcon,
this.textAlignVertical,
this.expands = false,
this.focusNode,
this.autofocus = false,
});