diff --git a/lib/core/api/api_client.dart b/lib/core/api/api_client.dart index 4015a4dc..3bfbf6cb 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'] = 5974668; + // body['PatientID'] = 2122445; // body['PatientID'] = 53320; // body['PatientTypeID'] = 1; // body['PatientOutSA'] = 0; diff --git a/lib/core/api_consts.dart b/lib/core/api_consts.dart index c4feec0b..2c64b13e 100644 --- a/lib/core/api_consts.dart +++ b/lib/core/api_consts.dart @@ -5,7 +5,7 @@ import 'package:hmg_patient_app_new/core/enums.dart'; class ApiConsts { static const maxSmallScreen = 660; - static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat; + static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod; // static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT @@ -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.5; + static final double appVersionID = 21.6; // static final double appVersionID = 50.7; static final int appChannelId = 3; diff --git a/lib/features/prescriptions/prescriptions_view_model.dart b/lib/features/prescriptions/prescriptions_view_model.dart index 5354daad..cdd85b9f 100644 --- a/lib/features/prescriptions/prescriptions_view_model.dart +++ b/lib/features/prescriptions/prescriptions_view_model.dart @@ -235,11 +235,16 @@ class PrescriptionsViewModel extends ChangeNotifier { result.fold( (failure) async { - onError!(failure.message); + if (onError != null) { + onError(failure.message); + } }, (apiResponse) { if (apiResponse.messageStatus == 2) { - onError!(apiResponse.errorMessage!); + if (onError != null) { + onError(apiResponse.errorMessage ?? "An error occurred while fetching the prescription instructions PDF."); + } + // onError!(apiResponse.errorMessage!); // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); } else if (apiResponse.messageStatus == 1) { prescriptionInstructionsPDFLink = apiResponse.data; diff --git a/lib/presentation/appointments/my_appointments_page.dart b/lib/presentation/appointments/my_appointments_page.dart index 1f54e3d1..3512472d 100644 --- a/lib/presentation/appointments/my_appointments_page.dart +++ b/lib/presentation/appointments/my_appointments_page.dart @@ -43,8 +43,10 @@ class _MyAppointmentsPageState extends State { @override void initState() { scheduleMicrotask(() { - myAppointmentsViewModel.initAppointmentsViewModel(); - myAppointmentsViewModel.getPatientAppointments(true, false); + if (!myAppointmentsViewModel.isMyAppointmentsLoading) { + myAppointmentsViewModel.initAppointmentsViewModel(); + myAppointmentsViewModel.getPatientAppointments(true, false); + } }); super.initState(); } diff --git a/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart b/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart index 972606a9..ef21ccbd 100644 --- a/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart +++ b/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart @@ -544,12 +544,12 @@ class _ImmediateLiveCarePaymentPageState extends State { child: ListView.builder( itemCount: notificationsVM.isNotificationsLoading ? 4 - : notificationsVM.notificationsList.length + (notificationsVM.hasMoreNotifications ? 1 : 0), + // : notificationsVM.notificationsList.length + (notificationsVM.hasMoreNotifications ? 1 : 0), + : notificationsVM.notificationsList.length, physics: NeverScrollableScrollPhysics(), shrinkWrap: true, padding: EdgeInsetsGeometry.zero, diff --git a/pubspec.yaml b/pubspec.yaml index eafbd513..a86f25ac 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.38+37 -version: 0.0.7+1 +version: 0.0.39+38 +#version: 0.0.8+1 environment: sdk: ">=3.6.0 <4.0.0" @@ -108,6 +108,7 @@ dependencies: clarity_flutter: 1.9.0 flutter_amazonpaymentservices: ^0.0.13 screen_brightness: ^1.0.1 + flutter_screenshot_blocker: ^1.0.4 dev_dependencies: flutter_test: