getUserData method

Future<UserModel> getUserData()

This method ensures that the user data is fetched only once @returns the UserModel if it exists, otherwise fetches it

Implementation

Future<UserModel> getUserData() async {
  if (user.value == null) {
    await fetchUserData();
  }
  return user.value!;
}