RegexTextField.email constructor

RegexTextField.email({
  1. Key? key,
  2. List<RegexModel>? rules,
  3. TextEditingController? controller,
  4. FocusNode? focusNode,
  5. TextInputAction? textInputAction,
  6. ValueChanged<bool>? validate,
  7. ValueChanged<String>? onSubmitted,
  8. bool optional = false,
  9. RegexUIVisibility visibility = RegexUIVisibility.focus,
  10. String? showLabel,
  11. String? hideLabel,
  12. String? label,
  13. RegexUIStyle style = RegexUIStyle.chips,
})

An e-mail field in one line with RegexModel.emailRules.

Implementation

RegexTextField.email({
  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,
  this.style = RegexUIStyle.chips,
}) : rules = rules ?? RegexModel.emailRules(),
     decoration = InputDecoration(
       labelText: label ?? RegexLabels.current.emailField,
     ),
     obscureText = false,
     keyboardType = TextInputType.emailAddress,
     autofillHints = const [AutofillHints.email],
     showStrength = false,
     strengthMode = RegexUIStrength.rules,
     strengthLabels = null;