From a02af3897f0eddb0f43d00a67030f554da880189 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 14 Sep 2026 12:02:38 +0300 Subject: [PATCH] Update to Stores VersionID 22.0 --- lib/core/api/api_client.dart | 2 +- lib/core/api_consts.dart | 2 +- lib/features/insurance/insurance_repo.dart | 8 +++++--- lib/features/insurance/insurance_view_model.dart | 8 ++++---- lib/presentation/home/landing_page.dart | 2 +- pubspec.yaml | 4 ++-- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/lib/core/api/api_client.dart b/lib/core/api/api_client.dart index 4db0cf8b..784c2f44 100644 --- a/lib/core/api/api_client.dart +++ b/lib/core/api/api_client.dart @@ -211,7 +211,7 @@ class ApiClientImp implements ApiClient { } // body['TokenID'] = "@dm!n"; - // body['PatientID'] = 1307867; + // body['PatientID'] = 226077; // body['PatientID'] = 53320; // body['PatientTypeID'] = 1; // body['PatientOutSA'] = 0; diff --git a/lib/core/api_consts.dart b/lib/core/api_consts.dart index 094fa680..40f04b1e 100644 --- a/lib/core/api_consts.dart +++ b/lib/core/api_consts.dart @@ -301,7 +301,7 @@ class ApiConsts { static String googleCloudStorageENTranslationFileBaseURL = "https://storage.googleapis.com/hmg-patientapp-translations"; // ************ static values for Api **************** - static final double appVersionID = 21.9; + static final double appVersionID = 22.0; // static final double appVersionID = 50.7; static final int appChannelId = 3; diff --git a/lib/features/insurance/insurance_repo.dart b/lib/features/insurance/insurance_repo.dart index 2719035b..0a0ee0be 100644 --- a/lib/features/insurance/insurance_repo.dart +++ b/lib/features/insurance/insurance_repo.dart @@ -11,7 +11,7 @@ import 'package:hmg_patient_app_new/features/insurance/models/resp_models/upload import 'package:hmg_patient_app_new/services/logger_service.dart'; abstract class InsuranceRepo { - Future>>> getPatientInsuranceDetails(); + Future>>> getPatientInsuranceDetails({bool isFromHomePage = false}); Future>>> getPatientInsuranceCardHistory(); @@ -35,8 +35,10 @@ class InsuranceRepoImp implements InsuranceRepo { InsuranceRepoImp({required this.loggerService, required this.apiClient}); @override - Future>>> getPatientInsuranceDetails() async { - Map mapDevice = {}; + Future>>> getPatientInsuranceDetails({bool isFromHomePage = false}) async { + Map mapDevice = { + "IsFromHomePage": isFromHomePage + }; try { GenericApiModel>? apiResponse; diff --git a/lib/features/insurance/insurance_view_model.dart b/lib/features/insurance/insurance_view_model.dart index 2422920a..caeba030 100644 --- a/lib/features/insurance/insurance_view_model.dart +++ b/lib/features/insurance/insurance_view_model.dart @@ -32,11 +32,11 @@ class InsuranceViewModel extends ChangeNotifier { InsuranceViewModel({required this.insuranceRepo, required this.errorHandlerService}); - initInsuranceProvider() { + initInsuranceProvider({bool isFromHomePage = false}) { if (isInsuranceDataToBeLoaded) { patientInsuranceList.clear(); isInsuranceLoading = true; - getPatientInsuranceDetails(); + getPatientInsuranceDetails(isFromHomePage: isFromHomePage); } patientInsuranceCardHistoryList.clear(); isInsuranceHistoryLoading = true; @@ -76,12 +76,12 @@ class InsuranceViewModel extends ChangeNotifier { notifyListeners(); } - Future getPatientInsuranceDetails({Function(dynamic)? onSuccess, Function(String)? onError}) async { + Future getPatientInsuranceDetails({bool isFromHomePage = false, Function(dynamic)? onSuccess, Function(String)? onError}) async { if (!isInsuranceDataToBeLoaded) { return; } - final result = await insuranceRepo.getPatientInsuranceDetails(); + final result = await insuranceRepo.getPatientInsuranceDetails(isFromHomePage: isFromHomePage); result.fold( // (failure) async => await errorHandlerService.handleError(failure: failure), diff --git a/lib/presentation/home/landing_page.dart b/lib/presentation/home/landing_page.dart index 2fbd9417..fdb8afcf 100644 --- a/lib/presentation/home/landing_page.dart +++ b/lib/presentation/home/landing_page.dart @@ -174,7 +174,7 @@ class _LandingPageState extends State { notificationsViewModel.initNotificationsViewModel(); if (Utils.havePrivilege(122)) { - insuranceViewModel.initInsuranceProvider(); + insuranceViewModel.initInsuranceProvider(isFromHomePage: true); } if (!appState.isRatedVisible) { diff --git a/pubspec.yaml b/pubspec.yaml index e471cada..82ae76ac 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,8 +2,8 @@ name: hmg_patient_app_new description: "New HMG Patient App" publish_to: 'none' # Remove this line if you wish to publish to pub.dev -#version: 0.0.45+46 -version: 0.0.15+2 +version: 0.0.48+49 +#version: 0.0.16+1 environment: sdk: ">=3.6.0 <4.0.0"