getUserProfile method

Future<void> getUserProfile()

Implementation

Future<void> getUserProfile() async {
  // Removed the dialog cause it interfer with flight search loading animation
  // after refreshing the page

  var response = await Requests.getDio(showLoadingDialog: false)
      .get('subscriber/profile');

  if (response.statusCode == 200) {
    userProfileModel.value = ProfileModel.fromJson(response.data);
    userProfileModel.refresh();
    if (isProfileLoaded.isFalse) {
      isProfileLoaded.value = true;
    }
  }
  print("subscriber profile response${response.data.toString()}");
}