diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json index 7820b354..f0e830f7 100644 --- a/assets/langs/ar-SA.json +++ b/assets/langs/ar-SA.json @@ -123,7 +123,7 @@ "forgotFileNoTitle": "نسيت الملف الطبي", "enterNationalId": "يرجى إدخال رقم الهاتف المحمول ورقم الهوية", "profileInfo": "يرجى إدخال معلومات الملف الشخصي", - "submit": "تحديث", + "submit": "بحث", "forgotDesc": "أدخل رقم الهاتف المحمول لاستلام رقم الملف الطبي عبر الرسائل القصيرة", "dob": "تاريخ الميلاد", "hijriDate": "التاريخ الهجري", @@ -1608,7 +1608,7 @@ "dietModerateCarbsDescription": "تناول معتدل للكربوهيدرات مع توازن في البروتين والدهون: يوفر طاقة مستقرة للأنشطة اليومية والتمارين مع قدر من المرونة. مناسب لكثير من الأشخاص الذين يسعون لإدارة وزن مستدامة وتحسين الأداء.", "dietUSDAGuidelinesDescription": "نمط متوازن مستند إلى (USDA): يركز على الفواكه والخضروات والحبوب الكاملة والبروتينات قليلة الدهن، مع الحد من السكريات المضافة والدهون المشبعة. يُعد إطارًا قائمًا على الأدلة لدعم الصحة العامة، وكفاية العناصر الغذائية، والوقاية من الأمراض المزمنة.", "dietZoneDietDescription": "حمية الزون (~40٪ كربوهيدرات / 30٪ بروتين / 30٪ دهون): تركز على التوازن الهرموني وضبط الحصص الغذائية. قد تُحسّن تركيب الجسم ومستوى الطاقة لدى بعض الأشخاص، لكنها تتطلب تخطيطًا جيدًا؛ ويُفضّل تخصيصها بالتعاون مع مختص تغذية.", - "contextDependent": "يعتمد السياق", + "contextDependent": "يختلف باختلاف الحالة", "calculatedValue": "القيمة المحسوبة", "calculationFormula": "صيغة الحساب", "confirmYourLocation": "قم بتأكيد موقعك", @@ -1822,7 +1822,7 @@ "symptomsCheckSuggestions": "الاحتمالات", "appointmentArrived": "تم الحضور", "calendarPermissionAlertForAppointment": "يرجى منح إذن الوصول إلى التقويم من إعدادات التطبيق لضبط تذكير الموعد", -"rechargePageKey": "اختر المستفيد", +"rechargePageKey": "شحن المحفظة", "selectFamilyFile": "اختيار ", "ancillaryOrdersListNew": "طلبات غير مكتملة", "medicalReportNew": "التقارير الطبية", @@ -1840,5 +1840,6 @@ "loadingAIAnalysisPrescription": "ٍتحليل الوصفات الطبية بواسطة الذكاء الاصطناعي، يرجى الانتظار...", "thisAboveInfoPrescription": "تم تحليل الوصفة الطبية هذه بواسطة الذكاء الاصطناعي، وهي لا تُعدّ نصيحة طبية. استشر طبيبك المختص للتشخيص والعلاج.", "liveCareNotificationPermissionsMessage": "يتطلب لايف كير أذونات الإشعارات، يرجى السماح بهذه الأذونات للمتابعة.", - "weatherIndicators": "طقس" + "weatherIndicators": "طقس", + "submitRating": "إرسال التقييم" } diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json index 85318fea..e17992f9 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -1830,7 +1830,8 @@ "loadingAIAnalysisPrescription": "Analysing your prescription, let the AI do the magic, This might take some time.", "thisAboveInfoPrescription": "This prescription was analyzed by AI, and it is not medical advice. Consult your healthcare provider for diagnosis and treatment.", "liveCareNotificationPermissionsMessage": "LiveCare requires Notifications permission, Please allow to proceed.", - "weatherIndicators": "Weather" + "weatherIndicators": "Weather", + "submitRating": "Submit" } diff --git a/lib/core/api_consts.dart b/lib/core/api_consts.dart index 29c690e1..f6426caa 100644 --- a/lib/core/api_consts.dart +++ b/lib/core/api_consts.dart @@ -27,7 +27,7 @@ class ApiConsts { static String QLINE_URL = "https://ms.hmg.com/nscapi/api/PatientCall/PatientInQueue_Detail"; // static String QLINE_URL = "https://qline.hmg.com/api/PatientCall/PatientInQueue_Detail"; - static String CHAT_URL = "https://chat.hmg.com/Index.aspx?RequestedId="; + static String CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId="; // static String GET_TAMARA_INSTALLMENTS_URL = "https://epharmacy.hmg.com/tamara/Home/getinstallments"; @@ -46,7 +46,7 @@ class ApiConsts { GET_TAMARA_PAYMENT_STATUS = 'https://mdlaboratories.com/tamaralive/api/OnlineTamara/order_status?orderid='; rcBaseUrl = 'https://rc.hmg.com/'; QLINE_URL = "https://qline.hmg.com/api/PatientCall/PatientInQueue_Detail"; - CHAT_URL = "https://chat.hmg.com/Index.aspx?RequestedId="; + CHAT_URL = "https://chat.hmg.com/geneysChat/Index.aspx?RequestedId="; break; case AppEnvironmentTypeEnum.dev: baseUrl = "https://uat.hmgwebservices.com/"; diff --git a/lib/core/utils/push_notification_handler.dart b/lib/core/utils/push_notification_handler.dart index 23cb4f51..48cc69ee 100644 --- a/lib/core/utils/push_notification_handler.dart +++ b/lib/core/utils/push_notification_handler.dart @@ -364,6 +364,8 @@ class PushNotificationHandler { init(BuildContext context) async { this.context = context; + await requestPermissions(); + if (Platform.isIOS) { voIPKit.getVoIPToken().then((value) { print("🎈 APNS VOIP KIT TOKEN: $value"); @@ -452,7 +454,9 @@ class PushNotificationHandler { sound: true, ); if (permission.authorizationStatus == AuthorizationStatus.denied) return; - } else {} + } else { + final permission = await FirebaseMessaging.instance.requestPermission(); + } try { FirebaseMessaging.instance.getInitialMessage().then((RemoteMessage? message) async { diff --git a/lib/features/authentication/authentication_view_model.dart b/lib/features/authentication/authentication_view_model.dart index 8e2d2b47..d02607c5 100644 --- a/lib/features/authentication/authentication_view_model.dart +++ b/lib/features/authentication/authentication_view_model.dart @@ -34,6 +34,7 @@ import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/presentation/authentication/login.dart'; import 'package:hmg_patient_app_new/presentation/authentication/saved_login_screen.dart'; import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart'; +import 'package:hmg_patient_app_new/presentation/my_family/my_family.dart'; import 'package:hmg_patient_app_new/routes/app_routes.dart'; import 'package:hmg_patient_app_new/services/cache_service.dart'; import 'package:hmg_patient_app_new/services/dialog_service.dart'; @@ -624,7 +625,7 @@ class AuthenticationViewModel extends ChangeNotifier { if (isFormFamilyFile) { await medicalVm.getAllPendingRecordsByResponseId(); _navigationService.replaceAllRoutesAndNavigateToLandingWithMedicalAuth().whenComplete(() { - _navigationService.pushPageRoute(AppRoutes.medicalFilePage); + _navigationService.pushPageRoute(AppRoutes.familyFilesPage); }); } else { _navigationService.replaceAllRoutesAndNavigateToLanding(); diff --git a/lib/features/my_appointments/my_appointments_repo.dart b/lib/features/my_appointments/my_appointments_repo.dart index eeef41e4..553491e1 100644 --- a/lib/features/my_appointments/my_appointments_repo.dart +++ b/lib/features/my_appointments/my_appointments_repo.dart @@ -16,6 +16,7 @@ import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/ import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_share_response_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_queue_details_response_model.dart'; +import 'package:hmg_patient_app_new/features/my_invoices/models/get_invoices_list_response_model.dart'; import 'package:hmg_patient_app_new/services/logger_service.dart'; import 'models/req_model/appointment_rate_req_model.dart'; @@ -89,6 +90,8 @@ abstract class MyAppointmentsRepo { required int clinicID, required int appointmentNo, }); + + Future>>> getAppointmentInvoice(num appointmentNum); } class MyAppointmentsRepoImp implements MyAppointmentsRepo { @@ -1142,4 +1145,42 @@ class MyAppointmentsRepoImp implements MyAppointmentsRepo { return Left(UnknownFailure(e.toString())); } } + + @override + Future>>> getAppointmentInvoice(num appointmentNum) async { + Map mapDevice = {"AppointmentNo": appointmentNum}; + + try { + GenericApiModel>? apiResponse; + Failure? failure; + await apiClient.post( + GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC, + body: mapDevice, + onFailure: (error, statusCode, {messageStatus, failureType}) { + failure = failureType; + }, + onSuccess: (response, statusCode, {messageStatus, errorMessage}) { + try { + final list = response['List_AllInvoices']; + + final invoicesList = list.map((item) => GetInvoicesListResponseModel.fromJson(item as Map)).toList().cast(); + + apiResponse = GenericApiModel>( + messageStatus: messageStatus, + statusCode: statusCode, + errorMessage: null, + data: invoicesList, + ); + } catch (e) { + failure = DataParsingFailure(e.toString()); + } + }, + ); + if (failure != null) return Left(failure!); + if (apiResponse == null) return Left(ServerFailure("Unknown error")); + return Right(apiResponse!); + } catch (e) { + return Left(UnknownFailure(e.toString())); + } + } } diff --git a/lib/features/my_appointments/my_appointments_view_model.dart b/lib/features/my_appointments/my_appointments_view_model.dart index cb52a19d..2fda0505 100644 --- a/lib/features/my_appointments/my_appointments_view_model.dart +++ b/lib/features/my_appointments/my_appointments_view_model.dart @@ -2,6 +2,7 @@ import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:get_it/get_it.dart'; import 'package:hmg_patient_app_new/core/app_state.dart'; +import 'package:hmg_patient_app_new/core/dependencies.dart'; import 'package:hmg_patient_app_new/core/utils/calender_utils_new.dart'; import 'package:hmg_patient_app_new/core/utils/date_util.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; @@ -17,6 +18,8 @@ import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/ import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_queue_details_response_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_repo.dart'; import 'package:hmg_patient_app_new/features/my_appointments/utils/appointment_type.dart'; +import 'package:hmg_patient_app_new/features/my_invoices/models/get_invoices_list_response_model.dart'; +import 'package:hmg_patient_app_new/features/my_invoices/my_invoices_repo.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/presentation/insurance/insurance_home_page.dart'; import 'package:hmg_patient_app_new/services/error_handler_service.dart'; @@ -25,6 +28,7 @@ import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart'; import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart'; import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart'; +import 'package:open_filex/open_filex.dart'; class MyAppointmentsViewModel extends ChangeNotifier { int selectedTabIndex = 0; @@ -1519,4 +1523,74 @@ class MyAppointmentsViewModel extends ChangeNotifier { ); } } + + Future getAppointmentInvoice({required num appointmentNum, Function(dynamic)? onSuccess, Function(String)? onError}) async { + String? downloadInvoicePDFBase64 = ""; + final result = await myAppointmentsRepo.getAppointmentInvoice(appointmentNum); + + result.fold( + (failure) async { + if (onError != null) { + onError(failure.message ?? "Unknown error"); + } + }, + (apiResponse) async { + if (apiResponse.messageStatus == 2) { + if (onError != null) { + onError(apiResponse.errorMessage ?? "Unknown error"); + } + // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); + } else if (apiResponse.messageStatus == 1) { + if (apiResponse.data!.isNotEmpty) { + GetInvoicesListResponseModel getInvoicesListResponseModel = apiResponse.data!.first; + final result = await getIt + .get() + .downloadInvoice(setupId: getInvoicesListResponseModel.setupId!, invoiceNo: getInvoicesListResponseModel.invoiceNo!, projectID: getInvoicesListResponseModel.projectId!); + + result.fold( + (failure) async { + if (onError != null) { + onError(failure.message); + } + }, + (apiResponse) async { + if (apiResponse.messageStatus == 2) { + // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); + } else if (apiResponse.messageStatus == 1) { + if (apiResponse.data != null && apiResponse.data!.isNotEmpty) { + downloadInvoicePDFBase64 = apiResponse.data!; + String path = await Utils.createFileFromString(downloadInvoicePDFBase64!, "pdf"); + try { + OpenFilex.open(path); + } catch (ex) { + showCommonBottomSheetWithoutHeight( + GetIt.instance().navigatorKey.currentContext!, + child: Utils.getErrorWidget(loadingText: "Cannot open file"), + callBackFunc: () {}, + isFullScreen: false, + isCloseButtonVisible: true, + ); + } + } else { + downloadInvoicePDFBase64 = ""; + } + if (onSuccess != null) { + onSuccess(apiResponse); + } + } + }, + ); + } else { + showCommonBottomSheetWithoutHeight( + GetIt.instance().navigatorKey.currentContext!, + child: Utils.getErrorWidget(loadingText: "Cannot open invoice"), + callBackFunc: () {}, + isFullScreen: false, + isCloseButtonVisible: true, + ); + } + } + }, + ); + } } diff --git a/lib/features/radiology/radiology_view_model.dart b/lib/features/radiology/radiology_view_model.dart index cf795a1d..30f9683a 100644 --- a/lib/features/radiology/radiology_view_model.dart +++ b/lib/features/radiology/radiology_view_model.dart @@ -61,10 +61,18 @@ class RadiologyViewModel extends ChangeNotifier { } Future getPatientRadiologyOrders({Function(dynamic)? onSuccess, Function(String)? onError}) async { + patientRadiologyOrders.clear(); + notifyListeners(); + final result = await radiologyRepo.getPatientRadiologyOrders(); result.fold( - (failure) async => await errorHandlerService.handleError(failure: failure), + // (failure) async => await errorHandlerService.handleError(failure: failure), + (failure) { + isRadiologyOrdersLoading = false; + filterSuggestions(); + notifyListeners(); + }, (apiResponse) { if (apiResponse.messageStatus == 2) { // dialogService.showErrorDialog(message: apiResponse.errorMessage!, onOkPressed: () {}); diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart index 7e4f4c0b..d5410585 100644 --- a/lib/generated/locale_keys.g.dart +++ b/lib/generated/locale_keys.g.dart @@ -1831,7 +1831,8 @@ abstract class LocaleKeys { static const generateAiAnalysisPrescription = 'generateAiAnalysisPrescription'; static const loadingAIAnalysisPrescription = 'loadingAIAnalysisPrescription'; static const thisAboveInfoPrescription = 'thisAboveInfoPrescription'; - static const weatherIndicators = 'weatherIndicators'; static const liveCareNotificationPermissionsMessage = 'liveCareNotificationPermissionsMessage'; + static const weatherIndicators = 'weatherIndicators'; + static const submitRating = 'submitRating'; } diff --git a/lib/presentation/appointments/appointment_details_page.dart b/lib/presentation/appointments/appointment_details_page.dart index 87ca5e93..c7da6d47 100644 --- a/lib/presentation/appointments/appointment_details_page.dart +++ b/lib/presentation/appointments/appointment_details_page.dart @@ -1020,6 +1020,32 @@ class _AppointmentDetailsPageState extends State { ), ); }), + MedicalFileCard( + label: LocaleKeys.viewInvoiceDetails.tr(context: context), + textColor: AppColors.blackColor, + backgroundColor: AppColors.whiteColor, + svgIcon: AppAssets.invoices_list_icon, + isLargeText: true, + iconSize: 36.w, + ).onPress(() { + LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingInvoiceDetails.tr(context: context)); + myAppointmentsViewModel.getAppointmentInvoice( + appointmentNum: widget.patientAppointmentHistoryResponseModel.appointmentNo, + onSuccess: (val) { + LoaderBottomSheet.hideLoader(); + }, + onError: (err) { + LoaderBottomSheet.hideLoader(); + showCommonBottomSheetWithoutHeight( + context, + child: Utils.getErrorWidget(loadingText: err), + callBackFunc: () {}, + isFullScreen: false, + isCloseButtonVisible: true, + ); + }, + ); + }), myAppointmentsVM.isAppointmentRatedResponseLoading ? MedicalFileCard( label: "Medical File", diff --git a/lib/presentation/appointments/widgets/appointment_card.dart b/lib/presentation/appointments/widgets/appointment_card.dart index 8b178c47..aec94e10 100644 --- a/lib/presentation/appointments/widgets/appointment_card.dart +++ b/lib/presentation/appointments/widgets/appointment_card.dart @@ -274,7 +274,7 @@ class _AppointmentCardState extends State { SizedBox(height: 8.h), Wrap( direction: Axis.horizontal, - spacing: 3.h, + spacing: 6.h, runSpacing: 4.h, children: [ AppCustomChipWidget( diff --git a/lib/presentation/book_appointment/livecare/immediate_livecare_pending_request_page.dart b/lib/presentation/book_appointment/livecare/immediate_livecare_pending_request_page.dart index ed524ab6..1c4f63e8 100644 --- a/lib/presentation/book_appointment/livecare/immediate_livecare_pending_request_page.dart +++ b/lib/presentation/book_appointment/livecare/immediate_livecare_pending_request_page.dart @@ -9,6 +9,7 @@ import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/core/utils/utils.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; +import 'package:hmg_patient_app_new/features/contact_us/contact_us_view_model.dart'; import 'package:hmg_patient_app_new/features/immediate_livecare/immediate_livecare_view_model.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/theme/colors.dart'; @@ -31,6 +32,7 @@ class _ImmediateLiveCarePendingRequestPageState extends State().getChatRequestID( + name: name, + mobileNo: mobileNo, + workGroup: "Live_Care_Chat", + onSuccess: (response) { + debugPrint("Chat Request ID received: ${getIt.get().chatRequestID}"); + chatURL = "https://chat.hmg.com/Index.aspx?RequestedId=${getIt.get().chatRequestID}"; + debugPrint("Chat URL: $chatURL"); + Uri uri = Uri.parse(chatURL); + launchUrl(uri, mode: LaunchMode.platformDefault, webOnlyWindowName: ""); + }, + onError: (error) { + debugPrint("Error getting chat request ID: $error"); + }, + ); + } + // void startTimer() { // // timer = Timer.periodic(const Duration(seconds: 1), (_) => addTime()); // // setState(() {}); diff --git a/lib/presentation/hmg_services/widgets/weather_widget.dart b/lib/presentation/hmg_services/widgets/weather_widget.dart index 65ad9de5..9ea2aa2b 100644 --- a/lib/presentation/hmg_services/widgets/weather_widget.dart +++ b/lib/presentation/hmg_services/widgets/weather_widget.dart @@ -110,9 +110,9 @@ class WeatherWidget extends StatelessWidget { ); }, padding: EdgeInsets.zero, - backgroundColor: AppColors.secondaryLightRedColor, - borderColor: AppColors.secondaryLightRedColor, - textColor: AppColors.primaryRedColor, + backgroundColor: AppColors.infoColor.withValues(alpha: 0.12), + borderColor: AppColors.infoColor.withValues(alpha: 0.01), + textColor: AppColors.infoColor, fontSize: 14.f, fontWeight: FontWeight.w600, borderRadius: 10.r, diff --git a/lib/presentation/home/landing_page.dart b/lib/presentation/home/landing_page.dart index 706041ec..2beaa344 100644 --- a/lib/presentation/home/landing_page.dart +++ b/lib/presentation/home/landing_page.dart @@ -157,8 +157,6 @@ class _LandingPageState extends State { notificationsViewModel.initNotificationsViewModel(); insuranceViewModel.initInsuranceProvider(); - // Commented as per new requirement to remove rating popup from the app - if(!appState.isRatedVisible) { appointmentRatingViewModel.getLastRatingAppointment(onSuccess: (response) { if (appointmentRatingViewModel.appointmentRatedList.isNotEmpty) { @@ -1447,12 +1445,6 @@ class _DirectionalDotPaginationBuilder extends SwiperPlugin { @override Widget build(BuildContext context, SwiperPluginConfig config) { - final int activeIndex = isRTL - ? (totalCount - 1 - config.activeIndex) - : config.activeIndex; - print("the index is $activeIndex"); - print("the config.activeIndex is ${config.activeIndex}"); - return Row( mainAxisSize: MainAxisSize.min, textDirection: ui.TextDirection.ltr, // always lay out dots left-to-right diff --git a/lib/presentation/medical_file/medical_file_page.dart b/lib/presentation/medical_file/medical_file_page.dart index 86807150..63b23ea3 100644 --- a/lib/presentation/medical_file/medical_file_page.dart +++ b/lib/presentation/medical_file/medical_file_page.dart @@ -46,6 +46,8 @@ import 'package:hmg_patient_app_new/presentation/ask_doctor/ask_doctor_page.dart import 'package:hmg_patient_app_new/presentation/book_appointment/book_appointment_page.dart'; import 'package:hmg_patient_app_new/presentation/book_appointment/doctor_profile_page.dart'; import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/appointment_calendar.dart'; +import 'package:hmg_patient_app_new/presentation/habib_wallet/habib_wallet_page.dart'; +import 'package:hmg_patient_app_new/presentation/habib_wallet/recharge_wallet_page.dart'; import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart'; import 'package:hmg_patient_app_new/presentation/insurance/insurance_approvals_page.dart'; import 'package:hmg_patient_app_new/presentation/insurance/insurance_home_page.dart'; @@ -1233,6 +1235,16 @@ class _MedicalFilePageState extends State { ), ); }), + MedicalFileCard( + label: LocaleKeys.habibWallet.tr(context: context), + textColor: AppColors.blackColor, + backgroundColor: AppColors.whiteColor, + svgIcon: AppAssets.wallet, + isLargeText: true, + iconSize: 36.w, + ).onPress(() { + Navigator.of(context).push(CustomPageRoute(page: HabibWalletPage())); + }), ], ).paddingSymmetrical(0.w, 0.0), SizedBox(height: 16.h), diff --git a/lib/presentation/profile_settings/profile_settings.dart b/lib/presentation/profile_settings/profile_settings.dart index 16c2a383..c581bcd5 100644 --- a/lib/presentation/profile_settings/profile_settings.dart +++ b/lib/presentation/profile_settings/profile_settings.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:io'; import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; @@ -318,21 +319,22 @@ class ProfileSettingsState extends State { // actionItem(AppAssets.permission, LocaleKeys.permissions.tr(context: context), () {}, trailingLabel: "Location, Camera"), // 1.divider, actionItem(AppAssets.rate, LocaleKeys.rateApp.tr(context: context), () async { - if (await inAppReview.isAvailable()) { - inAppReview.requestReview(); - } else { - inAppReview.openStoreListing(appStoreId: '6758851027'); - } - // if (Platform.isAndroid) { - // Utils.openWebView( - // url: 'https://play.google.com/store/apps/details?id=com.ejada.hmg', - // ); + // if (await inAppReview.isAvailable()) { + // inAppReview.requestReview(); // } else { - // Utils.openWebView( - // url: 'https://itunes.apple.com/app/id733503978', - // ); + // inAppReview.openStoreListing(appStoreId: '6758851027'); // } - // }, isExternalLink: true), + if (Platform.isAndroid) { + inAppReview.openStoreListing(appStoreId: '6758851027'); + // Utils.openWebView( + // url: 'https://play.google.com/store/apps/details?id=com.ejada.hmg', + // ); + } else { + if (await inAppReview.isAvailable()) { + inAppReview.requestReview(); + } + } + // }, isExternalLink: true), }), 1.divider, actionItem(AppAssets.privacy_terms, LocaleKeys.privacyPolicy.tr(context: context), () { diff --git a/lib/presentation/rate_appointment/rate_appointment_doctor.dart b/lib/presentation/rate_appointment/rate_appointment_doctor.dart index 9a3925a1..d78dc59e 100644 --- a/lib/presentation/rate_appointment/rate_appointment_doctor.dart +++ b/lib/presentation/rate_appointment/rate_appointment_doctor.dart @@ -192,7 +192,7 @@ class _RateAppointmentDoctorState extends State { SizedBox(width: 10), Expanded( child: CustomButton( - text: LocaleKeys.submit.tr(context: context), + text: LocaleKeys.submitRating.tr(context: context), onPressed: rating > 0 ? () { LoaderBottomSheet.showLoader(); diff --git a/lib/routes/app_routes.dart b/lib/routes/app_routes.dart index 41cb6331..959c364a 100644 --- a/lib/routes/app_routes.dart +++ b/lib/routes/app_routes.dart @@ -18,6 +18,7 @@ import 'package:hmg_patient_app_new/presentation/home/app_update_page.dart'; import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart'; import 'package:hmg_patient_app_new/presentation/home_health_care/hhc_procedures_page.dart'; import 'package:hmg_patient_app_new/presentation/medical_file/medical_file_page.dart'; +import 'package:hmg_patient_app_new/presentation/my_family/my_family.dart'; import 'package:hmg_patient_app_new/presentation/servicesPriceList/services_price_list_page.dart'; import 'package:hmg_patient_app_new/presentation/smartwatches/huawei_health_example.dart'; import 'package:hmg_patient_app_new/presentation/smartwatches/smartwatch_home_page.dart'; @@ -99,6 +100,9 @@ class AppRoutes { // Weather static const String weatherDetailsPage = '/weatherDetailsPage'; + // Weather + static const String familyFilesPage = '/familyFilesPage'; + static Map get routes => { initialRoute: (context) => SplashPage(), loginScreen: (context) => LoginScreen(), @@ -136,6 +140,7 @@ class AppRoutes { emergencyServicesPage: (context) => EmergencyServicesPage(), servicesPriceListPage: (context) => ServicesPriceListPage(), weatherDetailsPage: (context) => WeatherDetailsPage(), + familyFilesPage: (context) => FamilyMedicalScreen(), addHealthTrackerEntryPage: (context) { final args = ModalRoute.of(context)?.settings.arguments as HealthTrackerTypeEnum?; return AddHealthTrackerEntryPage( diff --git a/pubspec.yaml b/pubspec.yaml index a27fb251..5db6c526 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.22+21 -version: 0.0.1+20 +version: 0.0.25+24 +#version: 0.0.1+23 environment: sdk: ">=3.6.0 <4.0.0"