RegexTextField.password constructor
RegexTextField.password({
- Key? key,
- List<
RegexModel> ? rules, - TextEditingController? controller,
- FocusNode? focusNode,
- TextInputAction? textInputAction,
- ValueChanged<
bool> ? validate, - ValueChanged<
String> ? onSubmitted, - bool optional = false,
- RegexUIVisibility visibility = RegexUIVisibility.focus,
- String? showLabel,
- String? hideLabel,
- String? label,
- int minLength = 8,
- RegexUIStyle style = RegexUIStyle.list,
- List<
String> ? strengthLabels,
A password field in one line: hidden text with a show / hide button,
RegexModel.passwordRules and a real strength bar with labels.
Pass rules to replace the default rules.
Implementation
RegexTextField.password({
super.key,
List<RegexModel>? rules,
this.controller,
this.focusNode,
this.textInputAction,
this.validate,
this.onSubmitted,
this.optional = false,
this.visibility = RegexUIVisibility.focus,
this.showLabel,
this.hideLabel,
String? label,
int minLength = 8,
this.style = RegexUIStyle.list,
this.strengthLabels,
}) : rules = rules ?? RegexModel.passwordRules(minLength: minLength),
decoration = InputDecoration(
labelText: label ?? RegexLabels.current.passwordField,
),
obscureText = true,
keyboardType = TextInputType.visiblePassword,
autofillHints = const [AutofillHints.password],
showStrength = true,
strengthMode = RegexUIStrength.password;