sign method

  1. @override
Future<void> sign(
  1. bool isInSignIn,
  2. FirebaseAuth auth
)
override

Implementation

@override
Future<void> sign(bool isInSignIn, FirebaseAuth auth) async {
  String email = serve('email');
  String password = serve('password');
  // logStore();

  assert(isNonNull(email));
  assert(isNonNull(password));

  email = email.trim();
  // password = password.trim();
  if (isInSignIn) {
    await auth.signInWithEmailAndPassword(email: email, password: password);

    // currUser().sendEmailVerification();
    // Timer.periodic(Duration(seconds: 3), (Timer t) async {
    //   final user = currUser();
    //   await user.reload();
    //   print(
    //       'firebase auth user state ${currUser().emailVerified} local function user state ${currUser().emailVerified}');
    // });

  } else {
    await auth.createUserWithEmailAndPassword(
        email: email, password: password);
  }
}