isAccountExistWithThis method

Future<bool> isAccountExistWithThis(
  1. String email,
  2. AuthenticationProvider authProvider,
  3. Future<bool> checkEmail(
    1. String email,
    2. AuthenticationProvider
    )
)

check whether any account exist with the email

Implementation

Future<bool> isAccountExistWithThis(String email, AuthenticationProvider authProvider, Future<bool> Function(String email, AuthenticationProvider) checkEmail) async {
  isLoading = true;
  authExceptionType = null;
  this.email = null;
  notifyListeners();
  bool result = await checkEmail(email, authProvider);
  this.email = email;
  isLoading = false;
  notifyListeners();
  return result;
}