logOut method

Future<void> logOut()

Signs out the current user which will emit AuthUser.empty from the user Stream.

Throws a LogOutFailure if an exception occurs.

Implementation

Future<void> logOut() async {
  try {
    await Future.wait([
      if (_firebaseAuth.currentUser != null) _firebaseAuth.signOut(),
      if (_googleSignIn.currentUser != null) _googleSignIn.signOut(),
    ]);
  } catch (_) {
    throw LogOutFailure();
  }
}