Translation updates

pull/162/head
haroon amjad 1 month ago
parent f026ae1d62
commit 39af08ddc3

@ -1368,5 +1368,72 @@
"readMore": "اقرأ المزيد", "readMore": "اقرأ المزيد",
"riskFactors": "عوامل الخطر", "riskFactors": "عوامل الخطر",
"noRiskFactorsFound": "لم يتم العثور على عوامل خطر", "noRiskFactorsFound": "لم يتم العثور على عوامل خطر",
"basedOnYourSelectedSymptomsNoRiskFactors": "بناءً على الأعراض المحددة، لم يتم تحديد عوامل خطر إضافية." "basedOnYourSelectedSymptomsNoRiskFactors": "بناءً على الأعراض المحددة، لم يتم تحديد عوامل خطر إضافية.",
"messageNotification": "الرسالة",
"attachedImage": "الصورة المرفقة",
"failedToLoadImage": "فشل تحميل الصورة",
"typeNotification": "النوع",
"pleaseSelectAtLeastOneOptionBeforeProceeding": "يرجى اختيار خيار واحد على الأقل قبل المتابعة",
"suggestions": "الاقتراحات",
"pleaseGoBackAndSelectOrgansFirst": "يرجى العودة واختيار الأعضاء أولاً",
"symptomsSelector": "محدد الأعراض",
"emergencyTriage": "طوارئ",
"emergencyEvidenceDetected": "تم اكتشاف دليل طوارئ. يرجى طلب العناية الطبية.",
"noQuestionItemsAvailable": "لا توجد عناصر أسئلة متاحة",
"pleaseAnswerAllQuestionsBeforeProceeding": "يرجى الإجابة على جميع الأسئلة قبل المتابعة",
"triage": "الفرز",
"areYouSureYouWantToExitProgress": "هل أنت متأكد أنك تريد الخروج؟ سيتم فقدان تقدمك.",
"noQuestionAvailable": "لا يوجد سؤال متاح",
"possibleSymptom": "عرض محتمل: ",
"symptomsCheckerFindingScore": "- درجة نتائج فاحص الأعراض",
"notSet": "غير محدد",
"years": "سنوات",
"symptomsChecker": "فاحص الأعراض",
"helloIsYourInformationUpToDate": "مرحباً {name}، هل معلوماتك محدثة؟",
"noEditAll": "لا، تعديل الكل",
"yesItIs": "نعم، إنها كذلك",
"age": "العمر",
"youDontHaveAnyAncillaryOrdersYet": "ليس لديك أي طلبات مساعدة بعد.",
"invoiceWithNumber": "الفاتورة: {invoiceNo}",
"queued": "في قائمة الانتظار",
"checkInReady": "جاهز للتسجيل",
"checkIn": "تسجيل الوصول",
"viewDetails": "عرض التفاصيل",
"selectPaymentMethod": "اختر طريقة الدفع",
"processingPaymentPleaseWait": "جاري معالجة الدفع، يرجى الانتظار...",
"finalizingPaymentPleaseWait": "جاري إتمام الدفع، يرجى الانتظار...",
"generatingInvoicePleaseWait": "جاري إنشاء الفاتورة، يرجى الانتظار...",
"hereIsYourInvoiceNumber": "هذا هو رقم فاتورتك #: ",
"paymentCompletedSuccessfully": "تم الدفع بنجاح",
"failedToInitializeApplePay": "فشل في تهيئة Apple Pay. يرجى المحاولة مرة أخرى.",
"cash": "نقدي",
"approved": "موافق عليه",
"approvalRejectedPleaseVisitReceptionist": "تم رفض الموافقة - يرجى زيارة موظف الاستقبال",
"sentForApproval": "تم إرساله للموافقة",
"ancillaryOrderDetails": "تفاصيل الطلب المساعد",
"noProceduresAvailableForSelectedOrder": "لا توجد إجراءات متاحة للطلب المحدد.",
"procedures": "الإجراءات",
"totalAmount": "المبلغ الإجمالي",
"covered": "مغطى",
"vatPercent": "ضريبة القيمة المضافة (15%)",
"proceedToPayment": "المتابعة للدفع",
"supportedSmartWatches": "الساعات الذكية المدعومة",
"pleaseMakeSureSamsungWatchConnected": "يرجى التأكد من أن ساعة Samsung الخاصة بك متصلة بهاتفك، ومتزامنة ومحدثة بشكل نشط.",
"beforeSyncingDataFollowInstructions": "قبل مزامنة البيانات، يرجى التأكد من اتباع التعليمات بشكل صحيح.",
"viewWatchInstructions": "عرض تعليمات الساعة",
"healthConnectAppNotInstalled": "يبدو أنه ليس لديك تطبيق Health Connect مثبتًا. يرجى تثبيته من متجر Play لمزامنة بيانات صحتك.",
"setTimerOfReminder": "ضبط مؤقت التذكير",
"youHaveAppointmentWithDr": "لديك موعد مع د. ",
"hours": "ساعات",
"secs": "ثواني",
"noAllergiesDataFound": "لم يتم العثور على بيانات الحساسية...",
"heartRateDescription": "معدل ضربات قلبك يشير إلى عدد المرات التي ينبض فيها قلبك في الدقيقة",
"bloodOxygenDescription": "مستوى الأكسجين في الدم يشير إلى كمية الأكسجين التي تحملها خلايا الدم الحمراء",
"stepsDescription": "عدد الخطوات المتخذة على مدار اليوم",
"caloriesDescription": "السعرات الحرارية المحروقة أثناء النشاط البدني",
"distanceDescription": "المسافة المقطوعة على مدار اليوم",
"overview": "نظرة عامة",
"details": "التفاصيل",
"healthy": "صحي",
"warning": "تحذير"
} }

@ -1361,5 +1361,72 @@
"readMore": "Read more", "readMore": "Read more",
"riskFactors": "Risk Factors", "riskFactors": "Risk Factors",
"noRiskFactorsFound": "No risk factors found", "noRiskFactorsFound": "No risk factors found",
"basedOnYourSelectedSymptomsNoRiskFactors": "Based on your selected symptoms, no additional risk factors were identified." "basedOnYourSelectedSymptomsNoRiskFactors": "Based on your selected symptoms, no additional risk factors were identified.",
"messageNotification": "Message",
"attachedImage": "Attached Image",
"failedToLoadImage": "Failed to load image",
"typeNotification": "Type",
"pleaseSelectAtLeastOneOptionBeforeProceeding": "Please select at least one option before proceeding",
"suggestions": "Suggestions",
"pleaseGoBackAndSelectOrgansFirst": "Please go back and select organs first",
"symptomsSelector": "Symptoms Selector",
"emergencyTriage": "Emergency",
"emergencyEvidenceDetected": "Emergency evidence detected. Please seek medical attention.",
"noQuestionItemsAvailable": "No question items available",
"pleaseAnswerAllQuestionsBeforeProceeding": "Please answer all questions before proceeding",
"triage": "Triage",
"areYouSureYouWantToExitProgress": "Are you sure you want to exit? Your progress will be lost.",
"noQuestionAvailable": "No question available",
"possibleSymptom": "Possible symptom: ",
"symptomsCheckerFindingScore": "- Symptoms checker finding score",
"notSet": "Not set",
"years": "Years",
"symptomsChecker": "Symptoms Checker",
"helloIsYourInformationUpToDate": "Hello {name}, Is your information up to date?",
"noEditAll": "No, Edit all",
"yesItIs": "Yes, It is",
"age": "Age",
"youDontHaveAnyAncillaryOrdersYet": "You don't have any ancillary orders yet.",
"invoiceWithNumber": "Invoice: {invoiceNo}",
"queued": "Queued",
"checkInReady": "Check-in Ready",
"checkIn": "Check In",
"viewDetails": "View Details",
"selectPaymentMethod": "Select Payment Method",
"processingPaymentPleaseWait": "Processing payment, Please wait...",
"finalizingPaymentPleaseWait": "Finalizing payment, Please wait...",
"generatingInvoicePleaseWait": "Generating invoice, Please wait...",
"hereIsYourInvoiceNumber": "Here is your invoice #: ",
"paymentCompletedSuccessfully": "Payment Completed Successfully",
"failedToInitializeApplePay": "Failed to initialize Apple Pay. Please try again.",
"cash": "Cash",
"approved": "Approved",
"approvalRejectedPleaseVisitReceptionist": "Approval Rejected - Please visit receptionist",
"sentForApproval": "Sent For Approval",
"ancillaryOrderDetails": "Ancillary Order Details",
"noProceduresAvailableForSelectedOrder": "No Procedures available for the selected order.",
"procedures": "Procedures",
"totalAmount": "Total Amount",
"covered": "Covered",
"vatPercent": "VAT (15%)",
"proceedToPayment": "Proceed to Payment",
"supportedSmartWatches": "Supported Smart Watches",
"pleaseMakeSureSamsungWatchConnected": "Please make sure that your Samsung Watch is connected to your Phone, is actively synced & updated.",
"beforeSyncingDataFollowInstructions": "Before syncing data, please make sure that you have followed the instructions properly.",
"viewWatchInstructions": "View watch instructions",
"healthConnectAppNotInstalled": "Seems like you do not have Health Connect App installed. Please install it from the Play Store to sync your health data.",
"setTimerOfReminder": "Set the timer of reminder",
"youHaveAppointmentWithDr": "You have appointment with Dr. ",
"hours": "Hours",
"secs": "Secs",
"noAllergiesDataFound": "No allergies data found...",
"heartRateDescription": "Your heart rate indicates how many times your heart beats per minute",
"bloodOxygenDescription": "Blood oxygen level indicates how much oxygen your red blood cells are carrying",
"stepsDescription": "Number of steps taken throughout the day",
"caloriesDescription": "Calories burned during physical activity",
"distanceDescription": "Distance covered throughout the day",
"overview": "Overview",
"details": "Details",
"healthy": "Healthy",
"warning": "Warning"
} }

@ -1363,5 +1363,72 @@ abstract class LocaleKeys {
static const riskFactors = 'riskFactors'; static const riskFactors = 'riskFactors';
static const noRiskFactorsFound = 'noRiskFactorsFound'; static const noRiskFactorsFound = 'noRiskFactorsFound';
static const basedOnYourSelectedSymptomsNoRiskFactors = 'basedOnYourSelectedSymptomsNoRiskFactors'; static const basedOnYourSelectedSymptomsNoRiskFactors = 'basedOnYourSelectedSymptomsNoRiskFactors';
static const messageNotification = 'messageNotification';
static const attachedImage = 'attachedImage';
static const failedToLoadImage = 'failedToLoadImage';
static const typeNotification = 'typeNotification';
static const pleaseSelectAtLeastOneOptionBeforeProceeding = 'pleaseSelectAtLeastOneOptionBeforeProceeding';
static const suggestions = 'suggestions';
static const pleaseGoBackAndSelectOrgansFirst = 'pleaseGoBackAndSelectOrgansFirst';
static const symptomsSelector = 'symptomsSelector';
static const emergencyTriage = 'emergencyTriage';
static const emergencyEvidenceDetected = 'emergencyEvidenceDetected';
static const noQuestionItemsAvailable = 'noQuestionItemsAvailable';
static const pleaseAnswerAllQuestionsBeforeProceeding = 'pleaseAnswerAllQuestionsBeforeProceeding';
static const triage = 'triage';
static const areYouSureYouWantToExitProgress = 'areYouSureYouWantToExitProgress';
static const noQuestionAvailable = 'noQuestionAvailable';
static const possibleSymptom = 'possibleSymptom';
static const symptomsCheckerFindingScore = 'symptomsCheckerFindingScore';
static const notSet = 'notSet';
static const years = 'years';
static const symptomsChecker = 'symptomsChecker';
static const helloIsYourInformationUpToDate = 'helloIsYourInformationUpToDate';
static const noEditAll = 'noEditAll';
static const yesItIs = 'yesItIs';
static const age = 'age';
static const youDontHaveAnyAncillaryOrdersYet = 'youDontHaveAnyAncillaryOrdersYet';
static const invoiceWithNumber = 'invoiceWithNumber';
static const queued = 'queued';
static const checkInReady = 'checkInReady';
static const checkIn = 'checkIn';
static const viewDetails = 'viewDetails';
static const selectPaymentMethod = 'selectPaymentMethod';
static const processingPaymentPleaseWait = 'processingPaymentPleaseWait';
static const finalizingPaymentPleaseWait = 'finalizingPaymentPleaseWait';
static const generatingInvoicePleaseWait = 'generatingInvoicePleaseWait';
static const hereIsYourInvoiceNumber = 'hereIsYourInvoiceNumber';
static const paymentCompletedSuccessfully = 'paymentCompletedSuccessfully';
static const failedToInitializeApplePay = 'failedToInitializeApplePay';
static const cash = 'cash';
static const approved = 'approved';
static const approvalRejectedPleaseVisitReceptionist = 'approvalRejectedPleaseVisitReceptionist';
static const sentForApproval = 'sentForApproval';
static const ancillaryOrderDetails = 'ancillaryOrderDetails';
static const noProceduresAvailableForSelectedOrder = 'noProceduresAvailableForSelectedOrder';
static const procedures = 'procedures';
static const totalAmount = 'totalAmount';
static const covered = 'covered';
static const vatPercent = 'vatPercent';
static const proceedToPayment = 'proceedToPayment';
static const supportedSmartWatches = 'supportedSmartWatches';
static const pleaseMakeSureSamsungWatchConnected = 'pleaseMakeSureSamsungWatchConnected';
static const beforeSyncingDataFollowInstructions = 'beforeSyncingDataFollowInstructions';
static const viewWatchInstructions = 'viewWatchInstructions';
static const healthConnectAppNotInstalled = 'healthConnectAppNotInstalled';
static const setTimerOfReminder = 'setTimerOfReminder';
static const youHaveAppointmentWithDr = 'youHaveAppointmentWithDr';
static const hours = 'hours';
static const secs = 'secs';
static const noAllergiesDataFound = 'noAllergiesDataFound';
static const heartRateDescription = 'heartRateDescription';
static const bloodOxygenDescription = 'bloodOxygenDescription';
static const stepsDescription = 'stepsDescription';
static const caloriesDescription = 'caloriesDescription';
static const distanceDescription = 'distanceDescription';
static const overview = 'overview';
static const details = 'details';
static const healthy = 'healthy';
static const warning = 'warning';
} }

@ -123,7 +123,7 @@ class AllergiesListPage extends StatelessWidget {
), ),
), ),
) )
: Utils.getNoDataWidget(context, noDataText: "No allergies data found...".needTranslation); : Utils.getNoDataWidget(context, noDataText: LocaleKeys.noAllergiesDataFound.tr());
}, },
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h), separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
), ),

@ -1,12 +1,13 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/utils/date_util.dart'; import 'package:hmg_patient_app_new/core/utils/date_util.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.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/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/notifications/models/resp_models/notification_response_model.dart'; import 'package:hmg_patient_app_new/features/notifications/models/resp_models/notification_response_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:intl/intl.dart';
import 'package:share_plus/share_plus.dart'; import 'package:share_plus/share_plus.dart';
class NotificationDetailsPage extends StatelessWidget { class NotificationDetailsPage extends StatelessWidget {
@ -28,7 +29,7 @@ class NotificationDetailsPage extends StatelessWidget {
print('========================'); print('========================');
return CollapsingListView( return CollapsingListView(
title: "Notification Details".needTranslation, title: LocaleKeys.notificationDetails.tr(),
trailing: IconButton( trailing: IconButton(
icon: Icon( icon: Icon(
Icons.share_outlined, Icons.share_outlined,
@ -115,7 +116,7 @@ class NotificationDetailsPage extends StatelessWidget {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
'Message'.needTranslation.toText14( LocaleKeys.messageNotification.tr().toText14(
weight: FontWeight.w600, weight: FontWeight.w600,
color: AppColors.greyTextColor, color: AppColors.greyTextColor,
), ),
@ -153,7 +154,7 @@ class NotificationDetailsPage extends StatelessWidget {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
'Attached Image'.needTranslation.toText14( LocaleKeys.attachedImage.tr().toText14(
weight: FontWeight.w600, weight: FontWeight.w600,
color: AppColors.greyTextColor, color: AppColors.greyTextColor,
), ),
@ -183,7 +184,7 @@ class NotificationDetailsPage extends StatelessWidget {
color: AppColors.greyTextColor, color: AppColors.greyTextColor,
), ),
SizedBox(height: 8.h), SizedBox(height: 8.h),
'Failed to load image'.needTranslation.toText12( LocaleKeys.failedToLoadImage.tr().toText12(
color: AppColors.greyTextColor, color: AppColors.greyTextColor,
), ),
SizedBox(height: 4.h), SizedBox(height: 4.h),
@ -233,7 +234,7 @@ class NotificationDetailsPage extends StatelessWidget {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
'Type'.needTranslation.toText14( LocaleKeys.typeNotification.tr().toText14(
weight: FontWeight.w600, weight: FontWeight.w600,
color: AppColors.greyTextColor, color: AppColors.greyTextColor,
), ),

@ -38,7 +38,7 @@ class SmartwatchInstructionsPage extends StatelessWidget {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
"Supported Smart Watches".needTranslation.toText20(isBold: true), LocaleKeys.supportedSmartWatches.tr().toText20(isBold: true),
SizedBox(height: 16.h), SizedBox(height: 16.h),
Row( Row(
children: [ children: [
@ -161,15 +161,15 @@ class SmartwatchInstructionsPage extends StatelessWidget {
), ),
), ),
SizedBox(height: 12), SizedBox(height: 12),
"Please make sure that your Samsung Watch is connected to your Phone, is actively synced & updated.".needTranslation.toText14(isBold: true), LocaleKeys.pleaseMakeSureSamsungWatchConnected.tr().toText14(isBold: true),
SizedBox(height: 12), SizedBox(height: 8.h),
"Before syncing data, please make sure that you have followed the instructions properly.".needTranslation.toText14(isBold: true), LocaleKeys.beforeSyncingDataFollowInstructions.tr().toText14(isBold: true),
SizedBox(height: 12), SizedBox(height: 12),
InkWell( InkWell(
onTap: () { onTap: () {
showInstructionsDialog(context); showInstructionsDialog(context);
}, },
child: "View watch instructions".needTranslation.toText12(isBold: true, color: AppColors.textColor, isUnderLine: true)), child: LocaleKeys.viewWatchInstructions.tr().toText12(isBold: true, color: AppColors.textColor, isUnderLine: true)),
SizedBox( SizedBox(
height: 130.h, height: 130.h,
), ),
@ -186,7 +186,7 @@ class SmartwatchInstructionsPage extends StatelessWidget {
); );
} else { } else {
getIt.get<DialogService>().showErrorBottomSheet( getIt.get<DialogService>().showErrorBottomSheet(
message: "Seems like you do not have Health Connect App installed. Please install it from the Play Store to sync your health data.".needTranslation, message: LocaleKeys.healthConnectAppNotInstalled.tr(),
onOkPressed: () { onOkPressed: () {
Navigator.pop(context); Navigator.pop(context);
Uri uri = Uri.parse("https://play.google.com/store/apps/details?id=com.google.android.apps.healthdata"); Uri uri = Uri.parse("https://play.google.com/store/apps/details?id=com.google.android.apps.healthdata");

@ -1,8 +1,10 @@
import 'dart:io'; import 'dart:io';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:health/health.dart'; import 'package:health/health.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
class HealthMetricInfo { class HealthMetricInfo {
@ -39,7 +41,7 @@ class HealthMetrics {
unit: 'BPM', unit: 'BPM',
color: AppColors.primaryRedColor, color: AppColors.primaryRedColor,
icon: Icons.favorite, icon: Icons.favorite,
description: "Your heart rate indicates how many times your heart beats per minute".needTranslation, description: LocaleKeys.heartRateDescription.tr(),
minHealthyValue: 60, minHealthyValue: 60,
maxHealthyValue: 100, maxHealthyValue: 100,
svgIcon: "assets/images/smartwatches/heartrate_icon.svg"), svgIcon: "assets/images/smartwatches/heartrate_icon.svg"),
@ -51,7 +53,7 @@ class HealthMetrics {
// color: Colors.blue, // color: Colors.blue,
color: Color(0xff3A3558), color: Color(0xff3A3558),
icon: Icons.air, icon: Icons.air,
description: "Blood oxygen level indicates how much oxygen your red blood cells are carrying".needTranslation, description: LocaleKeys.bloodOxygenDescription.tr(),
minHealthyValue: 95, minHealthyValue: 95,
maxHealthyValue: 100, maxHealthyValue: 100,
svgIcon: "assets/images/smartwatches/bloodoxygen_icon.svg"), svgIcon: "assets/images/smartwatches/bloodoxygen_icon.svg"),

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_export.dart'; import 'package:hmg_patient_app_new/core/app_export.dart';
@ -7,6 +8,7 @@ import 'package:hmg_patient_app_new/extensions/route_extensions.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.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/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/symptoms_checker/symptoms_checker_view_model.dart'; import 'package:hmg_patient_app_new/features/symptoms_checker/symptoms_checker_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/services/dialog_service.dart'; import 'package:hmg_patient_app_new/services/dialog_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
@ -46,7 +48,7 @@ class _SuggestionsScreenState extends State<SuggestionsScreen> {
context.navigateWithName(AppRoutes.triagePage); context.navigateWithName(AppRoutes.triagePage);
} else { } else {
dialogService.showErrorBottomSheet( dialogService.showErrorBottomSheet(
message: 'Please select at least one option before proceeding'.needTranslation, message: LocaleKeys.pleaseSelectAtLeastOneOptionBeforeProceeding.tr(),
); );
} }
} }
@ -192,7 +194,7 @@ class _SuggestionsScreenState extends State<SuggestionsScreen> {
children: [ children: [
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: "Suggestions".needTranslation, title: LocaleKeys.suggestions.tr(),
leadingCallback: () => context.pop(), leadingCallback: () => context.pop(),
child: viewModel.isSuggestionsLoading child: viewModel.isSuggestionsLoading
? _buildLoadingShimmer() ? _buildLoadingShimmer()
@ -225,7 +227,7 @@ class _SuggestionsScreenState extends State<SuggestionsScreen> {
Icon(Icons.info_outline, size: 64.h, color: AppColors.greyTextColor), Icon(Icons.info_outline, size: 64.h, color: AppColors.greyTextColor),
SizedBox(height: 16.h), SizedBox(height: 16.h),
Text( Text(
'No organs selected'.needTranslation, LocaleKeys.noOrgansSelected.tr(),
style: TextStyle( style: TextStyle(
fontSize: 18.f, fontSize: 18.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -234,7 +236,7 @@ class _SuggestionsScreenState extends State<SuggestionsScreen> {
), ),
SizedBox(height: 8.h), SizedBox(height: 8.h),
Text( Text(
'Please go back and select organs first'.needTranslation, LocaleKeys.pleaseGoBackAndSelectOrgansFirst.tr(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 14.f, fontSize: 14.f,
@ -258,7 +260,7 @@ class _SuggestionsScreenState extends State<SuggestionsScreen> {
children: [ children: [
Expanded( Expanded(
child: CustomButton( child: CustomButton(
text: "Previous".needTranslation, text: LocaleKeys.previous.tr(),
onPressed: _onPreviousPressed, onPressed: _onPreviousPressed,
backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.11), backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.11),
borderColor: Colors.transparent, borderColor: Colors.transparent,
@ -269,7 +271,7 @@ class _SuggestionsScreenState extends State<SuggestionsScreen> {
SizedBox(width: 12.w), SizedBox(width: 12.w),
Expanded( Expanded(
child: CustomButton( child: CustomButton(
text: "Next".needTranslation, text: LocaleKeys.next.tr(),
onPressed: () => _onNextPressed(viewModel), onPressed: () => _onNextPressed(viewModel),
backgroundColor: AppColors.primaryRedColor, backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor,

@ -44,7 +44,7 @@ class _SymptomsSelectorPageState extends State<SymptomsSelectorPage> {
context.navigateWithName(AppRoutes.riskFactorsPage); context.navigateWithName(AppRoutes.riskFactorsPage);
} else { } else {
dialogService.showErrorBottomSheet( dialogService.showErrorBottomSheet(
message: 'Please select at least one symptom before proceeding'.needTranslation, message: LocaleKeys.pleaseSelectAtLeastOneOptionBeforeProceeding.tr(),
); );
} }
} }
@ -58,7 +58,7 @@ class _SymptomsSelectorPageState extends State<SymptomsSelectorPage> {
title: LocaleKeys.notice.tr(context: context), title: LocaleKeys.notice.tr(context: context),
context, context,
child: Utils.getWarningWidget( child: Utils.getWarningWidget(
loadingText: "Are you sure you want to restart the organ selection?".needTranslation, loadingText: LocaleKeys.areYouSureYouWantToRestartOrganSelection.tr(),
isShowActionButtons: true, isShowActionButtons: true,
onCancelTap: () => Navigator.pop(context), onCancelTap: () => Navigator.pop(context),
onConfirmTap: () => onConfirm(), onConfirmTap: () => onConfirm(),
@ -79,7 +79,7 @@ class _SymptomsSelectorPageState extends State<SymptomsSelectorPage> {
children: [ children: [
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: "Symptoms Selector".needTranslation, title: LocaleKeys.symptomsSelector.tr(),
leadingCallback: () => _buildConfirmationBottomSheet( leadingCallback: () => _buildConfirmationBottomSheet(
context: context, context: context,
onConfirm: () => { onConfirm: () => {
@ -252,7 +252,7 @@ class _SymptomsSelectorPageState extends State<SymptomsSelectorPage> {
Icon(Icons.info_outline, size: 64.h, color: AppColors.greyTextColor), Icon(Icons.info_outline, size: 64.h, color: AppColors.greyTextColor),
SizedBox(height: 16.h), SizedBox(height: 16.h),
Text( Text(
'No organs selected'.needTranslation, LocaleKeys.noOrgansSelected.tr(context: context),
style: TextStyle( style: TextStyle(
fontSize: 18.f, fontSize: 18.f,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -261,7 +261,7 @@ class _SymptomsSelectorPageState extends State<SymptomsSelectorPage> {
), ),
SizedBox(height: 8.h), SizedBox(height: 8.h),
Text( Text(
'Please go back and select organs first'.needTranslation, LocaleKeys.pleaseGoBackAndSelectOrgansFirst.tr(),
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 14.f, fontSize: 14.f,
@ -285,7 +285,7 @@ class _SymptomsSelectorPageState extends State<SymptomsSelectorPage> {
children: [ children: [
Expanded( Expanded(
child: CustomButton( child: CustomButton(
text: "Previous".needTranslation, text: LocaleKeys.previous.tr(context: context),
onPressed: _onPreviousPressed, onPressed: _onPreviousPressed,
backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.11), backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.11),
borderColor: Colors.transparent, borderColor: Colors.transparent,
@ -296,7 +296,7 @@ class _SymptomsSelectorPageState extends State<SymptomsSelectorPage> {
SizedBox(width: 12.w), SizedBox(width: 12.w),
Expanded( Expanded(
child: CustomButton( child: CustomButton(
text: "Next".needTranslation, text: LocaleKeys.next.tr(context: context),
onPressed: () => _onNextPressed(viewModel), onPressed: () => _onNextPressed(viewModel),
backgroundColor: AppColors.primaryRedColor, backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor,

@ -117,10 +117,9 @@ class _TriagePageState extends State<TriagePage> {
Lottie.asset(AppAnimations.ambulanceAlert, Lottie.asset(AppAnimations.ambulanceAlert,
repeat: false, reverse: false, frameRate: FrameRate(60), width: 120.h, height: 120.h, fit: BoxFit.contain), repeat: false, reverse: false, frameRate: FrameRate(60), width: 120.h, height: 120.h, fit: BoxFit.contain),
SizedBox(height: 8.h), SizedBox(height: 8.h),
"Emergency".needTranslation.toText28(color: AppColors.whiteColor, isBold: true), LocaleKeys.emergencyTriage.tr(context: context).toText28(color: AppColors.whiteColor, isBold: true),
SizedBox(height: 8.h), SizedBox(height: 8.h),
"Emergency evidence detected. Please seek medical attention." LocaleKeys.emergencyEvidenceDetected.tr(context: context)
.needTranslation
.toText14(color: AppColors.whiteColor, weight: FontWeight.w500), .toText14(color: AppColors.whiteColor, weight: FontWeight.w500),
SizedBox(height: 24.h), SizedBox(height: 24.h),
CustomButton( CustomButton(
@ -159,14 +158,14 @@ class _TriagePageState extends State<TriagePage> {
final currentQuestion = viewModel.currentTriageQuestion; final currentQuestion = viewModel.currentTriageQuestion;
if (currentQuestion?.items == null || currentQuestion!.items!.isEmpty) { if (currentQuestion?.items == null || currentQuestion!.items!.isEmpty) {
dialogService.showErrorBottomSheet( dialogService.showErrorBottomSheet(
message: 'No question items available'.needTranslation, message: LocaleKeys.noQuestionItemsAvailable.tr(context: context),
); );
return; return;
} }
// Check if all items have been answered // Check if all items have been answered
if (!viewModel.areAllTriageItemsAnswered) { if (!viewModel.areAllTriageItemsAnswered) {
dialogService.showErrorBottomSheet(message: 'Please answer all questions before proceeding'.needTranslation); dialogService.showErrorBottomSheet(message: LocaleKeys.pleaseAnswerAllQuestionsBeforeProceeding.tr(context: context));
return; return;
} }
@ -222,7 +221,7 @@ class _TriagePageState extends State<TriagePage> {
children: [ children: [
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: "Triage".needTranslation, title: LocaleKeys.triage.tr(context: context),
leadingCallback: () => _showConfirmationBeforeExit(context), leadingCallback: () => _showConfirmationBeforeExit(context),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -304,7 +303,7 @@ class _TriagePageState extends State<TriagePage> {
title: LocaleKeys.notice.tr(context: context), title: LocaleKeys.notice.tr(context: context),
context, context,
child: Utils.getWarningWidget( child: Utils.getWarningWidget(
loadingText: "Are you sure you want to exit? Your progress will be lost.".needTranslation, loadingText: LocaleKeys.areYouSureYouWantToExitProgress.tr(context: context),
isShowActionButtons: true, isShowActionButtons: true,
onCancelTap: () => Navigator.pop(context), onCancelTap: () => Navigator.pop(context),
onConfirmTap: () { onConfirmTap: () {
@ -325,7 +324,7 @@ class _TriagePageState extends State<TriagePage> {
if (viewModel.currentTriageQuestion == null) { if (viewModel.currentTriageQuestion == null) {
return Center( return Center(
child: "No question available".needTranslation.toText16(weight: FontWeight.w500), child: LocaleKeys.noQuestionAvailable.tr(context: context).toText16(weight: FontWeight.w500),
); );
} }
@ -457,7 +456,7 @@ class _TriagePageState extends State<TriagePage> {
children: [ children: [
RichText( RichText(
text: TextSpan( text: TextSpan(
text: "Possible symptom: ".needTranslation, text: LocaleKeys.possibleSymptom.tr(context: context),
style: TextStyle( style: TextStyle(
color: AppColors.greyTextColor, color: AppColors.greyTextColor,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -492,7 +491,7 @@ class _TriagePageState extends State<TriagePage> {
), ),
children: [ children: [
TextSpan( TextSpan(
text: "- Symptoms checker finding score".needTranslation, text: LocaleKeys.symptomsCheckerFindingScore.tr(context: context),
style: TextStyle( style: TextStyle(
color: AppColors.textColor, color: AppColors.textColor,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
@ -510,7 +509,7 @@ class _TriagePageState extends State<TriagePage> {
children: [ children: [
Expanded( Expanded(
child: CustomButton( child: CustomButton(
text: "Previous".needTranslation, text: LocaleKeys.previous.tr(context: context),
onPressed: isFirstQuestion ? () {} : _onPreviousPressed, onPressed: isFirstQuestion ? () {} : _onPreviousPressed,
isDisabled: isFirstQuestion || viewModel.isTriageDiagnosisLoading, isDisabled: isFirstQuestion || viewModel.isTriageDiagnosisLoading,
backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.11), backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.11),
@ -522,7 +521,7 @@ class _TriagePageState extends State<TriagePage> {
SizedBox(width: 12.w), SizedBox(width: 12.w),
Expanded( Expanded(
child: CustomButton( child: CustomButton(
text: "Next".needTranslation, text: LocaleKeys.next.tr(context: context),
isDisabled: viewModel.isTriageDiagnosisLoading, isDisabled: viewModel.isTriageDiagnosisLoading,
onPressed: _onNextPressed, onPressed: _onNextPressed,
backgroundColor: AppColors.primaryRedColor, backgroundColor: AppColors.primaryRedColor,

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_export.dart'; import 'package:hmg_patient_app_new/core/app_export.dart';
@ -9,6 +10,7 @@ import 'package:hmg_patient_app_new/extensions/route_extensions.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.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/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/symptoms_checker/symptoms_checker_view_model.dart'; import 'package:hmg_patient_app_new/features/symptoms_checker/symptoms_checker_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@ -149,20 +151,20 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
viewModel.selectedWeight == null; viewModel.selectedWeight == null;
// Get display values // Get display values
String genderText = viewModel.selectedGender ?? "Not set"; String genderText = viewModel.selectedGender ?? LocaleKeys.notSet.tr(context: context);
// Show age calculated from DOB (prefer viewModel's age, fallback to calculated from user's DOB) // Show age calculated from DOB (prefer viewModel's age, fallback to calculated from user's DOB)
int? displayAge = viewModel.selectedAge ?? userAgeFromDOB; int? displayAge = viewModel.selectedAge ?? userAgeFromDOB;
String ageText = displayAge != null ? "$displayAge Years" : "Not set"; String ageText = displayAge != null ? "$displayAge ${LocaleKeys.years.tr(context: context)}" : LocaleKeys.notSet.tr(context: context);
String heightText = String heightText =
viewModel.selectedHeight != null ? "${viewModel.selectedHeight!.round()} ${viewModel.isHeightCm ? 'cm' : 'ft'}" : "Not set"; viewModel.selectedHeight != null ? "${viewModel.selectedHeight!.round()} ${viewModel.isHeightCm ? 'cm' : 'ft'}" : LocaleKeys.notSet.tr(context: context);
String weightText = String weightText =
viewModel.selectedWeight != null ? "${viewModel.selectedWeight!.round()} ${viewModel.isWeightKg ? 'kg' : 'lbs'}" : "Not set"; viewModel.selectedWeight != null ? "${viewModel.selectedWeight!.round()} ${viewModel.isWeightKg ? 'kg' : 'lbs'}" : LocaleKeys.notSet.tr(context: context);
return Column( return Column(
children: [ children: [
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: "Symptoms Checker".needTranslation, title: LocaleKeys.symptomsChecker.tr(context: context),
isLeading: true, isLeading: true,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
@ -173,7 +175,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
padding: EdgeInsets.symmetric(vertical: 24.h, horizontal: 16.w), padding: EdgeInsets.symmetric(vertical: 24.h, horizontal: 16.w),
child: Column( child: Column(
children: [ children: [
"Hello $name, Is your information up to date?".needTranslation.toText16( LocaleKeys.helloIsYourInformationUpToDate.tr(namedArgs: {'name': name}).toText16(
weight: FontWeight.w600, weight: FontWeight.w600,
color: AppColors.textColor, color: AppColors.textColor,
), ),
@ -181,7 +183,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
_buildEditInfoTile( _buildEditInfoTile(
context: context, context: context,
leadingIcon: AppAssets.genderIcon, leadingIcon: AppAssets.genderIcon,
title: "Gender".needTranslation, title: LocaleKeys.gender.tr(context: context),
subTitle: genderText, subTitle: genderText,
onTap: () { onTap: () {
viewModel.setUserInfoPage(0, isSinglePageEdit: true); viewModel.setUserInfoPage(0, isSinglePageEdit: true);
@ -193,7 +195,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
_buildEditInfoTile( _buildEditInfoTile(
context: context, context: context,
leadingIcon: AppAssets.calendarGrey, leadingIcon: AppAssets.calendarGrey,
title: "Age".needTranslation, title: LocaleKeys.age.tr(context: context),
subTitle: ageText, subTitle: ageText,
iconColor: AppColors.greyTextColor, iconColor: AppColors.greyTextColor,
onTap: () { onTap: () {
@ -206,7 +208,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
_buildEditInfoTile( _buildEditInfoTile(
context: context, context: context,
leadingIcon: AppAssets.rulerIcon, leadingIcon: AppAssets.rulerIcon,
title: "Height".needTranslation, title: LocaleKeys.height.tr(context: context),
subTitle: heightText, subTitle: heightText,
onTap: () { onTap: () {
viewModel.setUserInfoPage(2, isSinglePageEdit: true); viewModel.setUserInfoPage(2, isSinglePageEdit: true);
@ -218,7 +220,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
_buildEditInfoTile( _buildEditInfoTile(
context: context, context: context,
leadingIcon: AppAssets.weightScale, leadingIcon: AppAssets.weightScale,
title: "Weight".needTranslation, title: LocaleKeys.weight.tr(context: context),
subTitle: weightText, subTitle: weightText,
onTap: () { onTap: () {
viewModel.setUserInfoPage(3, isSinglePageEdit: true); viewModel.setUserInfoPage(3, isSinglePageEdit: true);
@ -255,7 +257,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
children: [ children: [
Expanded( Expanded(
child: CustomButton( child: CustomButton(
text: "No, Edit all".needTranslation, text: LocaleKeys.noEditAll.tr(context: context),
icon: AppAssets.edit_icon, icon: AppAssets.edit_icon,
iconColor: AppColors.primaryRedColor, iconColor: AppColors.primaryRedColor,
onPressed: () { onPressed: () {
@ -271,7 +273,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
SizedBox(width: 12.w), SizedBox(width: 12.w),
Expanded( Expanded(
child: CustomButton( child: CustomButton(
text: "Yes, It is".needTranslation, text: LocaleKeys.yesItIs.tr(context: context),
icon: AppAssets.tickIcon, icon: AppAssets.tickIcon,
iconColor: hasEmptyFields ? AppColors.greyTextColor : AppColors.whiteColor, iconColor: hasEmptyFields ? AppColors.greyTextColor : AppColors.whiteColor,
onPressed: hasEmptyFields onPressed: hasEmptyFields

@ -83,7 +83,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
children: [ children: [
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: "Select Payment Method".needTranslation, title: LocaleKeys.selectPaymentMethod.tr(context: context),
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -103,9 +103,9 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Image.asset(AppAssets.mada, width: 72.h, height: 25.h).toShimmer2(isShow: todoVM.isProcessingPayment), LocaleKeys.visaOrMastercard.tr(context: context).toText16(isBold: true).toShimmer2(isShow: todoVM.isProcessingPayment),
SizedBox(height: 16.h), SizedBox(height: 16.h),
"Mada".needTranslation.toText16(isBold: true).toShimmer2(isShow: todoVM.isProcessingPayment), LocaleKeys.mada.tr(context: context).toText16(isBold: true).toShimmer2(isShow: todoVM.isProcessingPayment),
], ],
), ),
SizedBox(width: 8.h), SizedBox(width: 8.h),
@ -152,7 +152,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
], ],
).toShimmer2(isShow: todoVM.isProcessingPayment), ).toShimmer2(isShow: todoVM.isProcessingPayment),
SizedBox(height: 16.h), SizedBox(height: 16.h),
"Visa or Mastercard".needTranslation.toText16(isBold: true).toShimmer2(isShow: todoVM.isProcessingPayment), LocaleKeys.visaOrMastercard.tr(context: context).toText16(isBold: true).toShimmer2(isShow: todoVM.isProcessingPayment),
], ],
), ),
SizedBox(width: 8.h), SizedBox(width: 8.h),
@ -210,14 +210,14 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
SizedBox(height: 24.h), SizedBox(height: 24.h),
"Total amount to pay".needTranslation.toText18(isBold: true).paddingSymmetrical(24.h, 0.h), LocaleKeys.totalAmountToPay.tr(context: context).toText18(isBold: true).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 17.h), SizedBox(height: 17.h),
// Amount before tax // Amount before tax
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
"Amount before tax".needTranslation.toText14(isBold: true), LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
amountBeforeTax.toStringAsFixed(2).toText16(isBold: true), amountBeforeTax.toStringAsFixed(2).toText16(isBold: true),
AppColors.blackColor, AppColors.blackColor,
@ -231,7 +231,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
"VAT 15%".needTranslation.toText14(isBold: true, color: AppColors.greyTextColor), LocaleKeys.vat15.tr(context: context).toText14(isBold: true, color: AppColors.greyTextColor),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
taxAmount.toStringAsFixed(2).toText14(isBold: true, color: AppColors.greyTextColor), taxAmount.toStringAsFixed(2).toText14(isBold: true, color: AppColors.greyTextColor),
AppColors.greyTextColor, AppColors.greyTextColor,
@ -247,7 +247,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
"".needTranslation.toText14(isBold: true), "".toText14(isBold: true),
Utils.getPaymentAmountWithSymbol( Utils.getPaymentAmountWithSymbol(
widget.totalAmount.toStringAsFixed(2).toText24(isBold: true), widget.totalAmount.toStringAsFixed(2).toText24(isBold: true),
AppColors.blackColor, AppColors.blackColor,
@ -346,7 +346,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
} }
void _checkPaymentStatus() { void _checkPaymentStatus() {
LoaderBottomSheet.showLoader(loadingText: "Checking payment status, Please wait...".needTranslation); LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr(context: context));
todoSectionViewModel.checkPaymentStatus( todoSectionViewModel.checkPaymentStatus(
transID: transID, transID: transID,
@ -384,7 +384,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
required String paymentReference, required String paymentReference,
required String paymentMethod, required String paymentMethod,
}) { }) {
LoaderBottomSheet.showLoader(loadingText: "Processing payment, Please wait...".needTranslation); LoaderBottomSheet.showLoader(loadingText: LocaleKeys.processingPaymentPleaseWait.tr(context: context));
final user = appState.getAuthenticatedUser(); final user = appState.getAuthenticatedUser();
@ -426,7 +426,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
required String advanceNumber, required String advanceNumber,
required String paymentReference, required String paymentReference,
}) { }) {
LoaderBottomSheet.showLoader(loadingText: "Finalizing payment, Please wait...".needTranslation); LoaderBottomSheet.showLoader(loadingText: LocaleKeys.finalizingPaymentPleaseWait.tr(context: context));
final user = appState.getAuthenticatedUser(); final user = appState.getAuthenticatedUser();
@ -450,7 +450,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
} }
void _autoGenerateInvoice() { void _autoGenerateInvoice() {
LoaderBottomSheet.showLoader(loadingText: "Generating invoice, Please wait...".needTranslation); LoaderBottomSheet.showLoader(loadingText: LocaleKeys.generatingInvoicePleaseWait.tr(context: context));
List<dynamic> selectedProcListAPI = widget.selectedProcedures.map((element) { List<dynamic> selectedProcListAPI = widget.selectedProcedures.map((element) {
return { return {
@ -496,7 +496,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
children: [ children: [
Row( Row(
children: [ children: [
"Here is your invoice #: ".needTranslation.toText14( LocaleKeys.hereIsYourInvoiceNumber.tr(context: context).toText14(
color: AppColors.textColorLight, color: AppColors.textColorLight,
weight: FontWeight.w500, weight: FontWeight.w500,
), ),
@ -510,7 +510,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
Expanded( Expanded(
child: CustomButton( child: CustomButton(
height: 56.h, height: 56.h,
text: LocaleKeys.ok.tr(), text: LocaleKeys.ok.tr(context: context),
onPressed: () { onPressed: () {
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
context, context,
@ -528,8 +528,8 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
), ),
], ],
), ),
// title: "Payment Completed Successfully".needTranslation, // title: LocaleKeys.paymentCompletedSuccessfully.tr(context: context),
titleWidget: Utils.getSuccessWidget(loadingText: "Payment Completed Successfully".needTranslation), titleWidget: Utils.getSuccessWidget(loadingText: LocaleKeys.paymentCompletedSuccessfully.tr(context: context)),
isCloseButtonVisible: false, isCloseButtonVisible: false,
isDismissible: false, isDismissible: false,
isFullScreen: false, isFullScreen: false,
@ -607,7 +607,7 @@ class _AncillaryOrderPaymentPageState extends State<AncillaryOrderPaymentPage> {
Navigator.of(context).pop(); Navigator.of(context).pop();
showCommonBottomSheetWithoutHeight( showCommonBottomSheetWithoutHeight(
context, context,
child: Utils.getErrorWidget(loadingText: "Failed to initialize Apple Pay. Please try again.".needTranslation), child: Utils.getErrorWidget(loadingText: LocaleKeys.failedToInitializeApplePay.tr(context: context)),
callBackFunc: () {}, callBackFunc: () {},
isFullScreen: false, isFullScreen: false,
isCloseButtonVisible: true, isCloseButtonVisible: true,

@ -102,14 +102,14 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
String _getApprovalStatusText(AncillaryOrderProcDetail procedure) { String _getApprovalStatusText(AncillaryOrderProcDetail procedure) {
if (procedure.isApprovalRequired == false) { if (procedure.isApprovalRequired == false) {
return "Cash"; return LocaleKeys.cash.tr(context: context);
} else { } else {
if (procedure.isApprovalCreated == true && procedure.approvalNo != 0) { if (procedure.isApprovalCreated == true && procedure.approvalNo != 0) {
return "Approved"; return LocaleKeys.approved.tr(context: context);
} else if (procedure.isApprovalRequired == true && procedure.isApprovalCreated == true && procedure.approvalNo == 0) { } else if (procedure.isApprovalRequired == true && procedure.isApprovalCreated == true && procedure.approvalNo == 0) {
return "Approval Rejected - Please visit receptionist"; return LocaleKeys.approvalRejectedPleaseVisitReceptionist.tr(context: context);
} else { } else {
return "Sent For Approval"; return LocaleKeys.sentForApproval.tr(context: context);
} }
} }
} }
@ -135,7 +135,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
children: [ children: [
Expanded( Expanded(
child: CollapsingListView( child: CollapsingListView(
title: "Ancillary Order Details".needTranslation, title: LocaleKeys.ancillaryOrderDetails.tr(context: context),
child: viewModel.isAncillaryDetailsProceduresLoading child: viewModel.isAncillaryDetailsProceduresLoading
? _buildLoadingShimmer().paddingSymmetrical(24.w, 0) ? _buildLoadingShimmer().paddingSymmetrical(24.w, 0)
: viewModel.patientAncillaryOrderProceduresList.isEmpty : viewModel.patientAncillaryOrderProceduresList.isEmpty
@ -186,7 +186,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
), ),
child: Utils.getNoDataWidget( child: Utils.getNoDataWidget(
context, context,
noDataText: "No Procedures available for the selected order.".needTranslation, noDataText: LocaleKeys.noProceduresAvailableForSelectedOrder.tr(context: context),
isSmallWidget: true, isSmallWidget: true,
width: 62.w, width: 62.w,
height: 62.h, height: 62.h,
@ -372,7 +372,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
"Procedures".needTranslation.toText12( LocaleKeys.procedures.tr(context: context).toText12(
color: AppColors.textColorLight, color: AppColors.textColorLight,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
@ -385,7 +385,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
Column( Column(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
"Total Amount".needTranslation.toText12( LocaleKeys.totalAmount.tr(context: context).toText12(
color: AppColors.textColorLight, color: AppColors.textColorLight,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
@ -535,7 +535,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
// ), // ),
if (procedure.isCovered == true) if (procedure.isCovered == true)
AppCustomChipWidget( AppCustomChipWidget(
labelText: "Covered".needTranslation, labelText: LocaleKeys.covered.tr(context: context),
backgroundColor: AppColors.successColor.withValues(alpha: 0.1), backgroundColor: AppColors.successColor.withValues(alpha: 0.1),
textColor: AppColors.successColor, textColor: AppColors.successColor,
), ),
@ -551,7 +551,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
"Price".needTranslation.toText10(color: AppColors.textColorLight), LocaleKeys.price.tr(context: context).toText10(color: AppColors.textColorLight),
SizedBox(height: 4.h), SizedBox(height: 4.h),
Row( Row(
children: [ children: [
@ -570,7 +570,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
"VAT (15%)".needTranslation.toText10(color: AppColors.textColorLight), LocaleKeys.vatPercent.tr(context: context).toText10(color: AppColors.textColorLight),
SizedBox(height: 4.h), SizedBox(height: 4.h),
Row( Row(
children: [ children: [
@ -589,7 +589,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
"Total".needTranslation.toText10(color: AppColors.textColorLight), LocaleKeys.total.tr(context: context).toText10(color: AppColors.textColorLight),
SizedBox(height: 4.h), SizedBox(height: 4.h),
Row( Row(
children: [ children: [
@ -654,7 +654,7 @@ class _AncillaryOrderDetailsListState extends State<AncillaryOrderDetailsList> {
CustomButton( CustomButton(
borderWidth: 0, borderWidth: 0,
backgroundColor: AppColors.infoLightColor, backgroundColor: AppColors.infoLightColor,
text: "Proceed to Payment".needTranslation, text: LocaleKeys.proceedToPayment.tr(context: context),
onPressed: () { onPressed: () {
// Navigate to payment page with selected procedures // Navigate to payment page with selected procedures
Navigator.of(context).push( Navigator.of(context).push(

@ -1,6 +1,7 @@
import 'dart:async'; import 'dart:async';
import 'dart:developer'; import 'dart:developer';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_state.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/dependencies.dart';
@ -9,6 +10,7 @@ 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/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/todo_section/models/resp_models/ancillary_order_list_response_model.dart'; import 'package:hmg_patient_app_new/features/todo_section/models/resp_models/ancillary_order_list_response_model.dart';
import 'package:hmg_patient_app_new/features/todo_section/todo_section_view_model.dart'; import 'package:hmg_patient_app_new/features/todo_section/todo_section_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/todo_section/ancillary_procedures_details_page.dart'; import 'package:hmg_patient_app_new/presentation/todo_section/ancillary_procedures_details_page.dart';
import 'package:hmg_patient_app_new/presentation/todo_section/widgets/ancillary_orders_list.dart'; import 'package:hmg_patient_app_new/presentation/todo_section/widgets/ancillary_orders_list.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
@ -61,7 +63,7 @@ class _ToDoPageState extends State<ToDoPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
appState = getIt.get<AppState>(); appState = getIt.get<AppState>();
return CollapsingListView( return CollapsingListView(
title: "Ancillary Orders".needTranslation, title: LocaleKeys.ancillaryOrdersList.tr(context: context),
isLeading: true, isLeading: true,
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(

@ -79,7 +79,7 @@ class AncillaryOrdersList extends StatelessWidget {
), ),
child: Utils.getNoDataWidget( child: Utils.getNoDataWidget(
context, context,
noDataText: "You don't have any ancillary orders yet.".needTranslation, noDataText: LocaleKeys.youDontHaveAnyAncillaryOrdersYet.tr(context: context),
isSmallWidget: true, isSmallWidget: true,
width: 62.w, width: 62.w,
height: 62.h, height: 62.h,
@ -187,31 +187,31 @@ class AncillaryOrderCard extends StatelessWidget {
if (order.appointmentDate != null || isLoading) if (order.appointmentDate != null || isLoading)
AppCustomChipWidget( AppCustomChipWidget(
icon: AppAssets.appointment_calendar_icon, icon: AppAssets.appointment_calendar_icon,
labelText: isLoading ? "Date: Jan 20, 2024" : DateFormat('MMM dd, yyyy').format(order.appointmentDate!).needTranslation, labelText: isLoading ? "Date: Jan 20, 2024" : DateFormat('MMM dd, yyyy').format(order.appointmentDate!),
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),
// Appointment Number // Appointment Number
if (order.appointmentNo != null || isLoading) if (order.appointmentNo != null || isLoading)
AppCustomChipWidget( AppCustomChipWidget(
labelText: isLoading ? "Appt# : 98765" : "Appt #: ${order.appointmentNo}".needTranslation, labelText: isLoading ? "Appt# : 98765" : "Appt #: ${order.appointmentNo}",
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),
// Invoice Number // Invoice Number
if (order.invoiceNo != null || isLoading) if (order.invoiceNo != null || isLoading)
AppCustomChipWidget( AppCustomChipWidget(
labelText: isLoading ? "Invoice: 45678" : "Invoice: ${order.invoiceNo}".needTranslation, labelText: isLoading ? "Invoice: 45678" : LocaleKeys.invoiceWithNumber.tr(namedArgs: {'invoiceNo': '${order.invoiceNo}'}),
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),
// Queued Status // Queued Status
if (order.isQueued == true || isLoading) if (order.isQueued == true || isLoading)
AppCustomChipWidget( AppCustomChipWidget(
labelText: "Queued".needTranslation, labelText: LocaleKeys.queued.tr(context: context),
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),
// Check-in Available Status // Check-in Available Status
if (order.isCheckInAllow == true || isLoading) if (order.isCheckInAllow == true || isLoading)
AppCustomChipWidget( AppCustomChipWidget(
labelText: "Check-in Ready".needTranslation, labelText: LocaleKeys.checkInReady.tr(context: context),
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),
], ],
), ),
@ -225,7 +225,7 @@ class AncillaryOrderCard extends StatelessWidget {
if (order.isCheckInAllow == true || isLoading) if (order.isCheckInAllow == true || isLoading)
Expanded( Expanded(
child: CustomButton( child: CustomButton(
text: "Check In".needTranslation, text: LocaleKeys.checkIn.tr(context: context),
onPressed: () { onPressed: () {
if (isLoading) { if (isLoading) {
return; return;
@ -249,7 +249,7 @@ class AncillaryOrderCard extends StatelessWidget {
// View Details Button // View Details Button
Expanded( Expanded(
child: CustomButton( child: CustomButton(
text: "View Details".needTranslation, text: LocaleKeys.viewDetails.tr(context: context),
onPressed: () { onPressed: () {
if (isLoading) { if (isLoading) {
return; return;

@ -7,6 +7,7 @@ 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/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/todo_section/models/resp_models/ancillary_order_list_response_model.dart'; import 'package:hmg_patient_app_new/features/todo_section/models/resp_models/ancillary_order_list_response_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart'; import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
@ -73,7 +74,7 @@ class AncillaryProceduresList extends StatelessWidget {
), ),
child: Utils.getNoDataWidget( child: Utils.getNoDataWidget(
context, context,
noDataText: "You don't have any ancillary orders yet.".needTranslation, noDataText: LocaleKeys.youDontHaveAnyAncillaryOrdersYet.tr(context: context),
isSmallWidget: true, isSmallWidget: true,
width: 62.w, width: 62.w,
height: 62.h, height: 62.h,
@ -118,7 +119,7 @@ class AncillaryOrderCard extends StatelessWidget {
children: [ children: [
Row( Row(
children: [ children: [
"Order #".needTranslation.toText14( LocaleKeys.orderNumber.tr(context: context).toText14(
color: AppColors.textColorLight, color: AppColors.textColorLight,
weight: FontWeight.w500, weight: FontWeight.w500,
), ),
@ -181,31 +182,31 @@ class AncillaryOrderCard extends StatelessWidget {
AppCustomChipWidget( AppCustomChipWidget(
icon: AppAssets.calendar, icon: AppAssets.calendar,
labelText: labelText:
isLoading ? "Date: Jan 20, 2024" : "Date: ${DateFormat('MMM dd, yyyy').format(order.appointmentDate!)}".needTranslation, isLoading ? "Date: Jan 20, 2024" : "Date: ${DateFormat('MMM dd, yyyy').format(order.appointmentDate!)}",
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),
// Appointment Number // Appointment Number
if (order.appointmentNo != null || isLoading) if (order.appointmentNo != null || isLoading)
AppCustomChipWidget( AppCustomChipWidget(
labelText: isLoading ? "Appt #: 98765" : "Appt #: ${order.appointmentNo}".needTranslation, labelText: isLoading ? "Appt #: 98765" : "Appt #: ${order.appointmentNo}",
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),
// Invoice Number // Invoice Number
if (order.invoiceNo != null || isLoading) if (order.invoiceNo != null || isLoading)
AppCustomChipWidget( AppCustomChipWidget(
labelText: isLoading ? "Invoice: 45678" : "Invoice: ${order.invoiceNo}".needTranslation, labelText: isLoading ? "Invoice: 45678" : LocaleKeys.invoiceWithNumber.tr(namedArgs: {'invoiceNo': '${order.invoiceNo}'}),
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),
// Queued Status // Queued Status
if (order.isQueued == true || isLoading) if (order.isQueued == true || isLoading)
AppCustomChipWidget( AppCustomChipWidget(
labelText: "Queued".needTranslation, labelText: LocaleKeys.queued.tr(context: context),
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),
// Check-in Available Status // Check-in Available Status
if (order.isCheckInAllow == true || isLoading) if (order.isCheckInAllow == true || isLoading)
AppCustomChipWidget( AppCustomChipWidget(
labelText: "Check-in Ready".needTranslation, labelText: LocaleKeys.checkInReady.tr(context: context),
).toShimmer2(isShow: isLoading), ).toShimmer2(isShow: isLoading),
], ],
), ),
@ -219,7 +220,7 @@ class AncillaryOrderCard extends StatelessWidget {
if (order.isCheckInAllow == true || isLoading) if (order.isCheckInAllow == true || isLoading)
Expanded( Expanded(
child: CustomButton( child: CustomButton(
text: "Check In".needTranslation, text: LocaleKeys.checkIn.tr(context: context),
onPressed: () { onPressed: () {
if (isLoading) { if (isLoading) {
return; return;
@ -243,7 +244,7 @@ class AncillaryOrderCard extends StatelessWidget {
// View Details Button // View Details Button
Expanded( Expanded(
child: CustomButton( child: CustomButton(
text: "View Details".needTranslation, text: LocaleKeys.viewDetails.tr(context: context),
onPressed: () { onPressed: () {
if (isLoading) { if (isLoading) {
return; return;

@ -1,5 +1,6 @@
import 'dart:io' show Platform; import 'dart:io' show Platform;
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_export.dart'; import 'package:hmg_patient_app_new/core/app_export.dart';
@ -7,6 +8,7 @@ import 'package:hmg_patient_app_new/core/utils/calender_utils_new.dart';
import 'package:hmg_patient_app_new/core/utils/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/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/prescriptions/prescription_reminder_view.dart'; import 'package:hmg_patient_app_new/presentation/prescriptions/prescription_reminder_view.dart';
import 'package:hmg_patient_app_new/services/permission_service.dart'; import 'package:hmg_patient_app_new/services/permission_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/theme/colors.dart';
@ -40,13 +42,13 @@ class BottomSheetUtils{
Future<void> _showReminderBottomSheet(BuildContext providedContext, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted, Future<void> _showReminderBottomSheet(BuildContext providedContext, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted,
{required Function onSuccess, String? title, String? description, Function(int)? onMultiDateSuccess, bool? isMultiAllowed}) async { {required Function onSuccess, String? title, String? description, Function(int)? onMultiDateSuccess, bool? isMultiAllowed}) async {
showCommonBottomSheetWithoutHeight(providedContext, title: "Set the timer of reminder".needTranslation, child: PrescriptionReminderView( showCommonBottomSheetWithoutHeight(providedContext, title: LocaleKeys.setTimerOfReminder.tr(), child: PrescriptionReminderView(
setReminder: (int value) async { setReminder: (int value) async {
if (!isMultiAllowed!) { if (!isMultiAllowed!) {
if (onMultiDateSuccess == null) { if (onMultiDateSuccess == null) {
CalenderUtilsNew calendarUtils = CalenderUtilsNew.instance; CalenderUtilsNew calendarUtils = CalenderUtilsNew.instance;
await calendarUtils.createOrUpdateEvent( await calendarUtils.createOrUpdateEvent(
title: title ?? "You have appointment with Dr. ".needTranslation + doctorName, title: title ?? LocaleKeys.youHaveAppointmentWithDr.tr() + doctorName,
description: description ?? "At " + appoDateFormatted + " " + appoTimeFormatted, description: description ?? "At " + appoDateFormatted + " " + appoTimeFormatted,
scheduleDateTime: dateTime, scheduleDateTime: dateTime,
eventId: eventId, eventId: eventId,

@ -1,6 +1,8 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
Widget buildTime(Duration duration, {bool isHomePage = false}) { Widget buildTime(Duration duration, {bool isHomePage = false}) {
String twoDigits(int n) => n.toString().padLeft(2, '0'); String twoDigits(int n) => n.toString().padLeft(2, '0');
@ -11,9 +13,9 @@ Widget buildTime(Duration duration, {bool isHomePage = false}) {
return Row( return Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
buildTimeColumn(hours, "Hours".needTranslation), buildTimeColumn(hours, LocaleKeys.hours.tr()),
buildTimeColumn(minutes, "Mins".needTranslation), buildTimeColumn(minutes, LocaleKeys.mins.tr()),
buildTimeColumn(seconds, "Secs".needTranslation, isLast: true), buildTimeColumn(seconds, LocaleKeys.secs.tr(), isLast: true),
], ],
); );
} }

Loading…
Cancel
Save