updateUserData method

Future<Map<String, dynamic>?> updateUserData(
  1. String userId,
  2. Map<String, dynamic> updateDoc
)

update user data with the updateDoc and returns the new updated user data map will override only the values presented in the update Doc and leave all other properties as they are (the _id can't be changed and can't be deleted) if the _id isn't presented in the newDoc no worries it will be the same if the user data doesn't exist it will create a new document with the provided user data

Implementation

Future<Map<String, dynamic>?> updateUserData(
  String userId,
  Map<String, dynamic> updateDoc,
) {
  return userDataDbProvider.updateUserData(userId, updateDoc);
}