TextInput constructor

const TextInput({
  1. Key? key,
  2. String? label = 'Label',
  3. int? characterLimit = 32,
  4. InputControlType type = InputControlType.gray,
  5. IconData? leftIcon = Icons.face_5_outlined,
  6. Widget? leftIconWidget,
  7. String? prefix,
  8. Widget? prefixWidget,
  9. String placeholder = 'Input',
  10. String? value,
  11. TextEditingController? controller,
  12. FocusNode? focusNode,
  13. String? suffix,
  14. Widget? suffixWidget,
  15. ButtonIconGhost? rightButton,
  16. int? maxLines = 1,
  17. int? minLines = 1,
  18. List<TextInputFormatter>? inputFormatters,
  19. TextInputMode inputMode = TextInputMode.all,
  20. TextInputType? keyboardType,
  21. bool? autocorrect,
  22. bool? enableSuggestions,
  23. Iterable<String>? autofillHints,
  24. bool isRequired = false,
  25. bool autoValidateRules = true,
  26. bool isError = false,
  27. bool showErrorMessage = true,
  28. String errorMessage = 'Error Message',
  29. List<String>? errorMessages,
  30. String? requiredErrorText,
  31. String? emailErrorText,
  32. String? phoneErrorText,
  33. String? characterLimitErrorText,
  34. Widget? errorIconWidget,
  35. bool enabled = true,
  36. bool readOnly = false,
  37. bool autofocus = false,
  38. ValueChanged<String>? onChanged,
  39. ValueChanged<String>? onSubmitted,
  40. VoidCallback? onEditingComplete,
  41. VoidCallback? onTap,
  42. TextInputAction textInputAction = TextInputAction.done,
  43. FormFieldValidator<String>? validator,
  44. FormFieldSetter<String>? onSaved,
  45. 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,
});