signOut method

Future<void> signOut (
  1. {bool silent: false}
)

Implementation

Future<void> signOut({bool silent = false}) async {
  try {
    authState = AuthState.LOADING;
    if (!silent) {
      notifyListeners();
    }
    await signOutHandler();
    authState = AuthState.NOT_SIGNED_IN;
    if (!silent) {
      notifyListeners();
    }
  } catch (err) {
    print(err.toString());
    authState = AuthState.ERROR;
    if (!silent) {
      notifyListeners();
    }
  }
}