emailFormField static method

Widget emailFormField({
  1. String? label,
  2. TextEditingController? controller,
  3. FormFieldValidator<String>? validator,
  4. AutovalidateMode validateMode = AutovalidateMode.disabled,
  5. String hint = 'Enter your email',
  6. Icon? icon,
  7. bool obscureText = false,
  8. TextInputType inputType = TextInputType.text,
  9. EdgeInsets padding = paddingStepOne,
  10. EdgeInsets margin = paddingStepOne,
})

Implementation

static Widget emailFormField(
        {String? label,
        TextEditingController? controller,
        FormFieldValidator<String>? validator,
        AutovalidateMode validateMode = AutovalidateMode.disabled,
        String hint = 'Enter your email',
        Icon? icon,
        bool obscureText = false,
        TextInputType inputType = TextInputType.text,
        EdgeInsets padding = paddingStepOne,
        EdgeInsets margin = paddingStepOne}) =>
    textFormField(
        label: label,
        controller: _emailController,
        validator: Validators.validateEmail,
        icon: icon ??
            Icon(
              Icons.email,
              color: AppColors.textColor,
              size: iconSizeSmall,
            ));