NearHuscarl / flutter_login

Provides login screen with login/signup functionalities to help speed up development
MIT License
1.49k stars 796 forks source link

Login after sign up not working when setting additionalSignupFields #406

Open sahmadreza opened 1 year ago

sahmadreza commented 1 year ago

Describe the bug Login after sign up not working when setting additionalSignupFields

To Reproduce Steps to reproduce the behavior:

  1. Setting loginAfterSignUp: true
  2. Add additionalSignupFields
            additionalSignupFields: [
              UserFormField(
                keyName: "aEmail",
                displayName: S.current.inputHintEmail,
                icon: const Icon(Icons.email_rounded),
                userType: LoginUserType.name,
                fieldValidator: (val) {
                  if (val == null || val.isEmpty) {
                    return S.current.inputValidatorEmailRequired;
                  }
                  if (isEmail(val)) return null;
                  return S.current.inputValidatorAuthWrong;
                },
              ),
            ],
  3. After the user sign up just function onSignup called and onLogin not called

Expected behavior After sign up function onLogin called after onSignup

Information (please complete the following information):