getUserData method
Implementation
Future<Map<String, dynamic>?> getUserData(
String userId, {
/// this will make sure that the auth data for user exist first before setting the
/// user data
bool authDataMustExist = true,
}) async {
if (authDataMustExist) {
AuthModel? authModel =
await _authService.authDbProvider.getUserById(userId);
if (authModel == null) {
throw NoUserRegisteredException();
}
}
return userDataDbProvider.getUserData(userId);
}