UIProTextField.email constructor
const
UIProTextField.email({
- Key? key,
- TextEditingController? controller,
- String? hint = "Email",
- String? label,
- String? errorText,
- String? helperText,
- IconData? prefixIcon = Icons.email_outlined,
- Widget? prefix,
- IconData? suffixIcon,
- Widget? suffix,
- TextInputAction? textInputAction,
- bool enabled = true,
- bool readOnly = false,
- bool autofocus = false,
- int? maxLength,
- List<
TextInputFormatter> ? inputFormatters, - ValueChanged<
String> ? onChanged, - VoidCallback? onEditingComplete,
- ValueChanged<
String> ? onSubmitted, - VoidCallback? onTap,
- FocusNode? focusNode,
- 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,
- bool validateNotEmpty = false,
- String emptyErrorMessage = "Email is required",
- String invalidEmailMessage = "Please enter a valid email",
Creates an email text field with built-in email validation.
Implementation
const UIProTextField.email({
super.key,
this.controller,
this.hint = "Email",
this.label,
this.errorText,
this.helperText,
this.prefixIcon = Icons.email_outlined,
this.prefix,
this.suffixIcon,
this.suffix,
this.textInputAction,
this.enabled = true,
this.readOnly = false,
this.autofocus = false,
this.maxLength,
this.inputFormatters,
this.onChanged,
this.onEditingComplete,
this.onSubmitted,
this.onTap,
this.focusNode,
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.validateNotEmpty = false,
this.emptyErrorMessage = "Email is required",
this.invalidEmailMessage = "Please enter a valid email",
}) : isPassword = false,
keyboardType = TextInputType.emailAddress,
textCapitalization = TextCapitalization.none,
obscuringCharacter = '•',
maxLines = 1,
minLines = null,
fieldType = UIProTextFieldType.email,
minPasswordLength = 6,
shortPasswordMessage = "Password must be at least 6 characters";