TextInput constructor
const
TextInput({
- Key? key,
- required String label,
- required String placeholder,
- String? initialValue,
- bool enabled = true,
- bool readOnly = false,
- bool obscureText = false,
- bool autocorrect = true,
- bool enableSuggestions = true,
- bool enableInteractiveSelection = true,
- TextEditingController? controller,
- FormFieldValidator<
String> ? validator, - FormFieldSetter<
String> ? onSaved, - AutovalidateMode autovalidateMode = AutovalidateMode.disabled,
- TextInputType keyboardType = TextInputType.text,
- TextInputAction textInputAction = TextInputAction.next,
- InputDecoration? decoration,
- dynamic onChanged()?,
- VoidCallback? onTap,
- String? helperText,
- String? errorText,
- Widget? leadingIcon,
- Widget? trailingIcon,
- Widget? trailingIcon2,
- bool required = false,
Implementation
const TextInput({
super.key,
required this.label,
required this.placeholder,
this.initialValue,
this.enabled = true,
this.readOnly = false,
this.obscureText = false,
this.autocorrect = true,
this.enableSuggestions = true,
this.enableInteractiveSelection = true,
this.controller,
this.validator,
this.onSaved,
this.autovalidateMode = AutovalidateMode.disabled,
this.keyboardType = TextInputType.text,
this.textInputAction = TextInputAction.next,
this.decoration,
this.onChanged,
this.onTap,
this.helperText,
this.errorText,
this.leadingIcon,
this.trailingIcon,
this.trailingIcon2,
this.required = false,
});