UIProTextField constructor

const UIProTextField({
  1. Key? key,
  2. TextEditingController? controller,
  3. String? hint,
  4. String? label,
  5. String? errorText,
  6. String? helperText,
  7. IconData? prefixIcon,
  8. Widget? prefix,
  9. IconData? suffixIcon,
  10. Widget? suffix,
  11. TextInputType? keyboardType,
  12. TextInputAction? textInputAction,
  13. bool isPassword = false,
  14. bool enabled = true,
  15. bool readOnly = false,
  16. bool autofocus = false,
  17. int? maxLines = 1,
  18. int? minLines,
  19. int? maxLength,
  20. List<TextInputFormatter>? inputFormatters,
  21. ValueChanged<String>? onChanged,
  22. VoidCallback? onEditingComplete,
  23. ValueChanged<String>? onSubmitted,
  24. VoidCallback? onTap,
  25. FocusNode? focusNode,
  26. TextCapitalization textCapitalization = TextCapitalization.none,
  27. String obscuringCharacter = '•',
  28. double? borderRadius,
  29. Color? backgroundColor,
  30. Color? borderColor,
  31. Color? focusedBorderColor,
  32. Color? errorBorderColor,
  33. EdgeInsets? contentPadding,
  34. TextStyle? textStyle,
  35. TextStyle? hintStyle,
  36. TextStyle? labelStyle,
  37. TextStyle? errorStyle,
  38. bool showCounter = false,
  39. double? borderWidth,
  40. bool animateFocus = true,
  41. UIProTextFieldVariant variant = UIProTextFieldVariant.outlined,
  42. UIProTextFieldType fieldType = UIProTextFieldType.text,
  43. bool validateNotEmpty = false,
  44. String emptyErrorMessage = "This field is required",
  45. String invalidEmailMessage = "Please enter a valid email",
  46. int minPasswordLength = 6,
  47. String shortPasswordMessage = "Password must be at least 6 characters",
})

Creates a theme-aware text field.

Implementation

const UIProTextField({
  super.key,
  this.controller,
  this.hint,
  this.label,
  this.errorText,
  this.helperText,
  this.prefixIcon,
  this.prefix,
  this.suffixIcon,
  this.suffix,
  this.keyboardType,
  this.textInputAction,
  this.isPassword = false,
  this.enabled = true,
  this.readOnly = false,
  this.autofocus = false,
  this.maxLines = 1,
  this.minLines,
  this.maxLength,
  this.inputFormatters,
  this.onChanged,
  this.onEditingComplete,
  this.onSubmitted,
  this.onTap,
  this.focusNode,
  this.textCapitalization = TextCapitalization.none,
  this.obscuringCharacter = '•',
  this.borderRadius,
  this.backgroundColor,
  this.borderColor,
  this.focusedBorderColor,
  this.errorBorderColor,
  this.contentPadding,
  this.textStyle,
  this.hintStyle,
  this.labelStyle,
  this.errorStyle,
  this.showCounter = false,
  this.borderWidth,
  this.animateFocus = true,
  this.variant = UIProTextFieldVariant.outlined,
  this.fieldType = UIProTextFieldType.text,
  this.validateNotEmpty = false,
  this.emptyErrorMessage = "This field is required",
  this.invalidEmailMessage = "Please enter a valid email",
  this.minPasswordLength = 6,
  this.shortPasswordMessage = "Password must be at least 6 characters",
});