UIProTextField constructor
const
UIProTextField({
- Key? key,
- TextEditingController? controller,
- String? hint,
- String? label,
- String? errorText,
- String? helperText,
- IconData? prefixIcon,
- Widget? prefix,
- IconData? suffixIcon,
- Widget? suffix,
- TextInputType? keyboardType,
- TextInputAction? textInputAction,
- bool isPassword = false,
- bool enabled = true,
- bool readOnly = false,
- bool autofocus = false,
- int? maxLines = 1,
- int? minLines,
- int? maxLength,
- List<
TextInputFormatter> ? inputFormatters, - ValueChanged<
String> ? onChanged, - VoidCallback? onEditingComplete,
- ValueChanged<
String> ? onSubmitted, - VoidCallback? onTap,
- FocusNode? focusNode,
- TextCapitalization textCapitalization = TextCapitalization.none,
- String obscuringCharacter = '•',
- double? borderRadius,
- Color? backgroundColor,
- Color? borderColor,
- Color? focusedBorderColor,
- Color? errorBorderColor,
- EdgeInsets? contentPadding,
- TextStyle? textStyle,
- TextStyle? hintStyle,
- TextStyle? labelStyle,
- TextStyle? errorStyle,
- bool showCounter = false,
- double? borderWidth,
- bool animateFocus = true,
- UIProTextFieldVariant variant = UIProTextFieldVariant.outlined,
- UIProTextFieldType fieldType = UIProTextFieldType.text,
- bool validateNotEmpty = false,
- String emptyErrorMessage = "This field is required",
- String invalidEmailMessage = "Please enter a valid email",
- int minPasswordLength = 6,
- 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",
});