signUpWithEmail method

Future<void> signUpWithEmail (
  1. String email,
  2. String pwd,
  3. String pwdConfirm
)

Implementation

Future<void> signUpWithEmail(
    String email, String pwd, String pwdConfirm) async {
  if (pwd != pwdConfirm) {
    authState = AuthState.ERROR;
    notifyListeners();
  }
  try {
    authState = AuthState.LOADING;
    notifyListeners();
    await signUpWithEmailHandler(email, pwd);
    authState = AuthState.SIGNED_IN;
    notifyListeners();
  } catch (err) {
    print(err.toString());
    authState = AuthState.ERROR;
    notifyListeners();
  }
}