TextInput constructor
const
TextInput({
- Key? key,
- String? label = 'Label',
- int? characterLimit = 32,
- InputControlType type = InputControlType.gray,
- IconData? leftIcon = Icons.face_5_outlined,
- Widget? leftIconWidget,
- String? prefix,
- Widget? prefixWidget,
- String placeholder = 'Input',
- String? value,
- TextEditingController? controller,
- FocusNode? focusNode,
- String? suffix,
- Widget? suffixWidget,
- ButtonIconGhost? rightButton,
- int? maxLines = 1,
- int? minLines = 1,
- List<
TextInputFormatter> ? inputFormatters, - TextInputMode inputMode = TextInputMode.all,
- TextInputType? keyboardType,
- bool? autocorrect,
- bool? enableSuggestions,
- Iterable<
String> ? autofillHints, - bool isRequired = false,
- bool autoValidateRules = true,
- bool isError = false,
- bool showErrorMessage = true,
- String errorMessage = 'Error Message',
- List<
String> ? errorMessages, - String? requiredErrorText,
- String? emailErrorText,
- String? phoneErrorText,
- String? characterLimitErrorText,
- Widget? errorIconWidget,
- bool enabled = true,
- bool readOnly = false,
- bool autofocus = false,
- ValueChanged<
String> ? onChanged, - ValueChanged<
String> ? onSubmitted, - VoidCallback? onEditingComplete,
- VoidCallback? onTap,
- TextInputAction textInputAction = TextInputAction.done,
- FormFieldValidator<
String> ? validator, - FormFieldSetter<
String> ? onSaved, - AutovalidateMode? autovalidateMode,
Creates a TextInput instance.
Implementation
const TextInput({
super.key,
this.label = 'Label',
this.characterLimit = 32,
this.type = InputControlType.gray,
this.leftIcon = Icons.face_5_outlined,
this.leftIconWidget,
this.prefix,
this.prefixWidget,
this.placeholder = 'Input',
this.value,
this.controller,
this.focusNode,
this.suffix,
this.suffixWidget,
this.rightButton,
this.maxLines = 1,
this.minLines = 1,
this.inputFormatters,
this.inputMode = TextInputMode.all,
this.keyboardType,
this.autocorrect,
this.enableSuggestions,
this.autofillHints,
this.isRequired = false,
this.autoValidateRules = true,
this.isError = false,
this.showErrorMessage = true,
this.errorMessage = 'Error Message',
this.errorMessages,
this.requiredErrorText,
this.emailErrorText,
this.phoneErrorText,
this.characterLimitErrorText,
this.errorIconWidget,
this.enabled = true,
this.readOnly = false,
this.autofocus = false,
this.onChanged,
this.onSubmitted,
this.onEditingComplete,
this.onTap,
this.textInputAction = TextInputAction.done,
this.validator,
this.onSaved,
this.autovalidateMode,
});