registerWithEmailPasswordName static method
Implementation
static Future<bool> registerWithEmailPasswordName(String email, String password, String name, AuthProvider authProvider) async {
bool isRegistrationSuccessful = false;
try {
final userCredentials = await FirebaseAuth.instance.createUserWithEmailAndPassword(email: email, password: password);
if(userCredentials.user != null){
userCredentials.user!.updateDisplayName(name);
isRegistrationSuccessful = true;
}
} on FirebaseAuthException catch (e) {
authProvider.authExceptionType = AuthExceptions.typeOf[e.code];
}catch (e) {
printToConsole("Exception in FirebaseManageUsers.loginWithEmailPassword: ${e.toString()}");
authProvider.authExceptionType = AuthExceptionType.unknown;
}
return isRegistrationSuccessful;
}