createUserWithEmailAndPassword method
Creates a new user with the provided email and password, and returns an AuthUserCredentialVO
object.
Implementation
Future<AuthUserCredentialVO> createUserWithEmailAndPassword({
required String email,
required String password,
String? displayName,
}) async {
try {
final authCredential =
await _authDataService.createUserWithEmailAndPassword(
email: email,
password: password,
);
final vo = AuthUserCredentialVO.fromAuthUserCredential(authCredential);
return vo;
} catch (e) {
if (e is RdevException) {
throw AuthServiceException(
code: e.code, message: e.message, stackTrace: e.stackTrace);
}
throw AuthServiceException(
stackTrace: StackTrace.current, message: e.toString());
}
}