UIProTextField.password constructor
const
UIProTextField.password({
- Key? key,
- TextEditingController? controller,
- String? hint = "Password",
- String? label,
- String? errorText,
- String? helperText,
- IconData? prefixIcon = Icons.lock_outline,
- Widget? prefix,
- 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,
- 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,
- bool validateNotEmpty = false,
- String emptyErrorMessage = "Password is required",
- int minPasswordLength = 6,
- String shortPasswordMessage = "Password must be at least 6 characters",
Creates a password text field with visibility toggle.
Implementation
const UIProTextField.password({
super.key,
this.controller,
this.hint = "Password",
this.label,
this.errorText,
this.helperText,
this.prefixIcon = Icons.lock_outline,
this.prefix,
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.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.validateNotEmpty = false,
this.emptyErrorMessage = "Password is required",
this.minPasswordLength = 6,
this.shortPasswordMessage = "Password must be at least 6 characters",
}) : isPassword = true,
keyboardType = TextInputType.visiblePassword,
textCapitalization = TextCapitalization.none,
maxLines = 1,
minLines = null,
suffixIcon = null,
suffix = null,
fieldType = UIProTextFieldType.password,
invalidEmailMessage = "Please enter a valid email";