Merge branch 'master' into dev_aamir

# Conflicts:
#	lib/core/api_consts.dart
pull/166/head
aamir-csol 2 months ago
commit 418297b6fb

@ -408,7 +408,7 @@
"brand": "العلامة التجارية",
"power": "القوة",
"diameter": "القطر",
"remarks": "ملاحظات",
"remarks": "ملاحظات: ",
"activeMedications": "الأدوية النشطة",
"expDate": "تاريخ انتهاء الصلاحية النشط:",
"route": "الطريق",
@ -1213,5 +1213,291 @@
"virtualTour": "جولة افتراضية",
"carParking": "موقف السيارات",
"latestNews": "آخر الأخبار",
"hmgContact": "اتصل بمجموعة الحبيب الطبية"
}
"hmgContact": "اتصل بمجموعة الحبيب الطبية",
"durationCannotExceed90": "لا يجوز أن تتجاوز المدة 90 دقيقة",
"unexpectedError": "حدث خطأ غير متوقع",
"gettingAmbulanceTransportOption": "جاري الحصول على خيارات نقل الإسعاف",
"fetchingAppointment": "جاري جلب الموعد",
"doYouWantToCancelTheRequest": "هل تريد إلغاء الطلب",
"cancellingRequest": "جاري إلغاء الطلب",
"fetchingTermsAndConditions": "جاري جلب الشروط والأحكام",
"selectLocationPrescriptionDelivery": "يرجى تحديد موقع توصيل الوصفة الطبية",
"noRadiologyOrders": "لم يتم العثور على أي طلبات تصوير شعاعي",
"ageIsRequired": "العمر مطلوب",
"invalidAge": "العمر غير صالح",
"ageMustBeBetween11And120": "يجب أن يكون العمر بين 11 و 120",
"heightIsRequired": "الطول مطلوب",
"invalidHeight": "الطول غير صالح",
"weightIsRequired": "الوزن مطلوب",
"invalidWeight": "الوزن غير صالح",
"timeToDrinkWater": "حان وقت شرب الماء! 💧",
"stayHydratedDrinkWater": "ابق رطبًا! اشرب {amount} مل من الماء.",
"visitPharmacyOnline": "زيارة الصيدلة على الانترنت",
"howAreYouFeelingToday": "كيف حالك اليوم؟",
"checkYourSymptomsWithScale": "تحقق من أعراضك باستخدام ذا المقياس",
"checkYourSymptoms": "تحقق من أعراضك",
"noUpcomingAppointmentPleaseBook": "ليس لديك أي مواعيد قادمة. يرجى حجز موعد",
"youHaveEROnlineCheckInRequest": "لديك طلب تسجيل وصول عبر الإنترنت للطوارئ",
"quickLinks": "روابط سريعة",
"viewMedicalFileLandingPage": "عرض الملف الطبي",
"immediateLiveCareRequest": "طلب LiveCare الفوري",
"yourTurnIsAfterPatients": "دورك بعد {count} مريض.",
"dontHaveHHCOrders": "ليس لديك أي أوامر رعاية صحية منزلية حتى الآن.",
"hhcOrders": "أوامر الرعاية الصحية المنزلية",
"requestedServices": "الخدمات المطلوبة",
"selectServices": "اختر الخدمات",
"selectedServices": "الخدمات المختارة",
"createNewRequest": "إنشاء طلب جديد",
"youHaveNoPendingRequests": "ليس لديك أي طلبات معلقة.",
"noInsuranceDataFound": "لم يتم العثور على بيانات التأمين...",
"noInsuranceUpdateRequest": "لم يتم العثور على أي طلبات لتحديث بيانات التأمين.",
"policyNumberInsurancePage": "الوثيقة: {number}",
"insuranceExpired": "التأمين منتهي الصلاحية",
"insuranceActive": "التأمين نشط",
"patientCardID": "رقم بطاقة المريض: {id}",
"noInsuranceApprovals": "لم تحصل على أي موافقات تأمينية حتى الآن.",
"noInsuranceWithHMG": "ليس لديك تأمين مسجل لدى مجموعة حبيب الطبية.",
"referenceRange": "النطاق المرجعي",
"downloadReport": "تنزيل التقرير",
"generatingReport": "جارٍ إنشاء التقرير، يرجى الانتظار...",
"noLabResults": "ليس لديك أي نتائج مختبرية حتى الآن.",
"labResultDetails": "تفاصيل نتائج المختبر",
"resultOf": "نتيجة",
"whatIsThisResult": "ما هي هذه النتيجة؟",
"lastTested": "آخر اختبار",
"byVisit": "حسب الزيارة",
"byTest": "حسب التحليل",
"results": "نتائج",
"viewResults": "عرض النتائج",
"rebook": "إعادة الحجز",
"noOphthalmologyAppointments": "لم يتم العثور على أي مواعيد في قسم طب العيون...",
"noVitalSignsRecordedYet": "لا توجد علامات حيوية مسجلة بعد",
"appointmentsAndVisits": "المواعيد والزيارات",
"labAndRadiology": "المختبر والأشعة",
"activeMedicationsAndPrescriptions": "الأدوية النشطة والوصفات الطبية",
"allPrescriptions": "جميع الوصفات",
"allMedications": "جميع الأدوية",
"youDontHaveAnyPrescriptionsYet": "ليس لديك أي وصفات طبية بعد.",
"youDontHaveAnyCompletedVisitsYet": "ليس لديك أي زيارات مكتملة بعد",
"others": "أخرى",
"allergyInfo": "معلومات الحساسية",
"vaccineInfo": "معلومات اللقاحات",
"updateInsuranceInfo": "تحديث التأمين",
"myInvoicesList": "قائمة فواتيري",
"ancillaryOrdersList": "قائمة الطلبات المساعدة",
"youDontHaveAnySickLeavesYet": "ليس لديك أي إجازات مرضية بعد.",
"medicalReports": "التقارير الطبية",
"sickLeaveReport": "تقرير الإجازة المرضية",
"weightTracker": "متتبع الوزن",
"askYourDoctor": "اسأل طبيبك",
"internetPairing": "الاقتران بالإنترنت",
"requested": "مطلوب",
"youDontHaveAnyMedicalReportsYet": "ليس لديك أي تقارير طبية بعد.",
"requestMedicalReport": "طلب تقرير طبي",
"youDoNotHaveAnyAppointmentsToRequestMedicalReport": "ليس لديك أي مواعيد لطلب تقرير طبي.",
"areYouSureYouWantToRequestMedicalReport": "هل أنت متأكد أنك تريد طلب تقرير طبي لهذا الموعد؟",
"yourMedicalReportRequestSubmittedSuccessfully": "تم إرسال طلب التقرير الطبي بنجاح.",
"monthlyHealthSummaryReportDisclaimer": "يعكس تقرير الملخص الصحي الشهري هذا المؤشرات الصحية ونتائج التحليل لأحدث الزيارات. يرجى ملاحظة أن هذا سيتم إرساله تلقائيًا من النظام ولا يعتبر تقريرًا رسميًا لذا لا ينبغي اتخاذ أي قرار طبي بناءً عليه",
"updatingMonthlyReportStatus": "جاري تحديث حالة التقرير الشهري...",
"monthlyReportStatusUpdatedSuccessfully": "تم تحديث حالة التقرير الشهري بنجاح",
"whoCanViewMyMedicalFile": "من يمكنه عرض ملفي الطبي؟",
"acceptedYourRequestToBeYourFamilyMember": "{status} طلبك لتكون فردًا من عائلتك",
"canViewYourFile": "يمكنه عرض ملفك",
"hasARequestPendingToBeYourFamilyMember": "لديه طلب {status} ليكون فردًا من عائلتك",
"wantsToAddYouAsTheirFamilyMember": "يريد إضافتك كفرد من عائلته",
"rejectedYourRequestToBeYourFamilyMember": "{status} طلبك لتكون فردًا من عائلتك",
"rejectedYourFamilyMemberRequest": "{status} طلب فرد عائلتك",
"notAvailable": "غير متاح",
"selectAProfile": "الرجاء تحديد ملف تعريف",
"switchFamilyFile": "قم بالتبديل من قائمة الملفات الطبية أدناه",
"medicalFiles": "الملفات الطبية",
"addANewFamilyMember": "إضافة فرد جديد من العائلة",
"viewInvoiceDetails": "عرض تفاصيل الفاتورة",
"outPatient": "مريض خارجي",
"invoiceDetails": "تفاصيل الفاتورة",
"sendingEmailPleaseWait": "جاري إرسال ال<D8A7><D984>ريد الإلكتروني، يرجى الانتظار...",
"emailSentSuccessfullyMessage": "تم إرسال البريد الإلكتروني بنجاح.",
"discount": "خصم",
"paid": "مدفوع",
"fetchingInvoiceDetails": "جارٍ جلب تفاصيل الفاتورة، يرجى الانتظار...",
"scanQRCode": "مسح رمز الاستجابة السريعة",
"parkingSlotDetails": "تفاصيل موقف السيارة",
"slotNumber": "رقم الموقف: {code}",
"basement": "الطابق: {description}",
"parkingDate": "التاريخ: {date}",
"parkedSince": "متوقف منذ: {time}",
"resetDirection": "إعادة تعيين الاتجاه",
"noPrescriptionOrdersYet": "ليس لديك أي طلبات وصفات طبية حتى الآن.",
"fetchingPrescriptionPDFPleaseWait": "جاري جلب ملف الوصفة الطبية، يرجى الانتظار...",
"ratingValue": "التقييم: {rating}",
"downloadPrescription": "تحميل الوصفة الطبية",
"fetchingPrescriptionDetails": "جاري جلب تفاصيل الوصفة الطبية...",
"switchBackFamilyFile": "العودة إلى ملف العائلة",
"profileAndSettings": "الملف الشخصي والإعدادات",
"quickActions": "إجراءات سريعة",
"notificationsSettings": "إعدادات الإشعارات",
"touchIDFaceIDServices": "خدمات Touch ID / Face ID",
"personalInformation": "المعلومات الشخصية",
"updateEmailAddress": "تحديث عنوان البريد الإلكتروني",
"helpAndSupport": "المساعدة والدعم",
"permissionsProfile": "الأذونات",
"privacyPolicy": "سياسة الخصوصية",
"deactivateAccount": "إلغاء تنشيط الحساب",
"ageYearsOld": "{age} {yearsOld}",
"youDontHaveRadiologyOrders": "ليس لديك أي نتائج للأشعة حتى الآن.",
"radiologyResult": "نتيجة الأشعة",
"viewRadiologyImage": "عرض صورة الأشعة",
"rateClinic": "تقييم العيادة",
"back": "رجوع",
"rateDoctor": "تقييم الطبيب",
"howWasYourLastVisitWithDoctor": "كيف كانت زيارتك الأخيرة مع الطبيب؟",
"dateOfBirthSymptoms": "ما هو تاريخ ميلادك؟",
"genderSymptoms": "ما هو جنسك؟",
"heightSymptoms": "كم طولك؟",
"weightSymptoms": "ما هو وزنك؟",
"femaleGender": "أنثى",
"previous": "سابق",
"selectedOrgans": "الهيئات المختارة",
"noOrgansSelected": "لم يتم تحديد أي أعضاء بعد",
"organSelector": "محدد الأعضاء",
"noPredictionsAvailable": "لا توجد تنبؤات متاحة",
"areYouSureYouWantToRestartOrganSelection": "هل أنت متأكد أنك تريد إعادة تشغيل اختيار الأعضاء؟",
"possibleConditions": "الحالات المحتملة",
"pleaseSelectAtLeastOneRiskBeforeProceeding": "يرجى اختيار عامل خطر واحد على الأقل قبل المتابعة",
"aboveYouSeeCommonRiskFactors": "أعلاه ترى عوامل الخطر الأكثر شيوعًا. على الرغم من أن /diagnosis قد تعيد أسئلة حول عوامل الخطر، ",
"readMore": "اقرأ المزيد",
"riskFactors": "عوامل الخطر",
"noRiskFactorsFound": "لم يتم العثور على عوامل خطر",
"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": "تحذير",
"vitalSignDetails": "تفاصيل العلامات الحيوية",
"resultOf": "نتيجة {date}",
"resultOfNoDate": "نتيجة --",
"referenceRangeBetween": "النطاق المرجعي: {low} {high} {unit}",
"referenceRangeMin": "النطاق المرجعي: ≥ {low} {unit}",
"referenceRangeMax": "النطاق المرجعي: ≤ {high} {unit}",
"noHistoryAvailable": "لا يوجد تاريخ متاح",
"bmiDescription": "مؤشر كتلة الجسم هو قياس يعتمد على الطول والوزن لتقدير دهون الجسم.",
"heightDescription": "يقاس الطول بالسنتيمتر ويستخدم لحساب مؤشر كتلة الجسم وتوصيات الجرعات.",
"weightDescription": "الوزن يساعد في تتبع الصحة العامة والتغذية والتغيرات مع مرور الوقت.",
"bloodPressureDescription": "ضغط الدم يعكس قوة الدم على جدران الشرايين. يظهر كانقباضي/انبساطي.",
"temperatureDescription": "درجة حرارة الجسم تعكس مدى سخونة جسمك وقد تتغير مع العدوى أو الالتهاب.",
"heartRateDescriptionVital": "معدل ضربات القلب يشير إلى عدد نبضات القلب في الدقيقة.",
"respiratoryRateDescription": "معدل التنفس هو عدد الأنفاس المأخوذة في الدقيقة.",
"bmiAdvice": "حافظ على نظام غذائي متوازن ونشاط منتظم. إذا كان مؤشر كتلة جسمك مرتفعًا أو منخفضًا، فكر في استشارة طبيبك.",
"heightAdvice": "لا حاجة لاتخاذ أي إجراء إلا إذا بدا قياسك غير صحيح. قم بتحديثه في زيارتك القادمة.",
"weightAdvice": "راقب تغيرات الوزن. الزيادة أو الخسارة المفاجئة قد تتطلب استشارة طبية.",
"bloodPressureAdvice": "استمر في تتبع ضغط دمك. يجب مناقشة القراءات المرتفعة أو المنخفضة مع طبيبك.",
"temperatureAdvice": "إذا كان لديك حمى مستمرة أو أعراض، اتصل بمقدم الرعاية الصحية.",
"heartRateAdvice": "تتبع اتجاهات معدل ضربات قلبك. إذا شعرت بدوار أو ألم في الصدر، اطلب الرعاية الطبية.",
"respiratoryRateAdvice": "إذا لاحظت ضيقًا في التنفس أو تنفسًا غير طبيعي، اطلب المشورة الطبية.",
"whatShouldIDoNext": "ماذا يجب أن أفعل بعد ذلك؟",
"customizeDrinkCup": "قم بتخصيص كوب مشروبك",
"tipsToStayHydrated": "نصائح للبقاء رطبًا",
"drinkBeforeYouFeelThirsty": "اشرب قبل أن تشعر بالعطش",
"keepRefillableBottleNextToYou": "احتفظ بزجاجة قابلة لإعادة التعبئة بجانبك",
"trackYourDailyIntakeToStayMotivated": "تتبع كمية الماء اليومية للحفاظ على الحافز",
"chooseSparklingWaterInsteadOfSoda": "اختر الماء الفوار بدلاً من الصودا",
"switchCup": "تبديل الكوب",
"plainWater": "ماء عادي",
"yourGoal": "هدفك",
"remaining": "المتبقي",
"hydrationStatus": "حالة الترطيب",
"areYouSureYouWantToCancelAllWaterReminders": "هل أنت متأكد أنك تريد إلغاء جميع تذكيرات الماء؟",
"remindersSet": "تم ضبط التذكيرات!",
"dailyWaterRemindersScheduledAt": "تم جدولة تذكيرات الماء اليومية في:",
"waterConsumption": "استهلاك المياه",
"selectNumberOfReminders": "حدد عدد التذكيرات",
"h2oSettings": "إعدادات H20",
"settingsSavedSuccessfully": "تم حفظ الإعدادات بنجاح",
"yourName": "اسمك",
"ageYears": "العمر (11-120) سنة",
"numberOfRemindersInADay": "عدد التذكيرات في اليوم",
"medications": "الأدوية",
"someRemarksAboutPrescription": "ستجدون هنا بعض الملاحظات حول الوصفة الطبية",
"notifyMeBeforeConsumptionTime": "أبلغني قبل وقت الاستهلاك",
"noMedicationsToday": "لا أدوية اليوم",
"route": "Route: {route}",
"frequency": "Frequency: {frequency}",
"instruction": "Instruction: {instruction}",
"duration": "Duration: {days}",
"reminders": "تذكيرات",
"reminderAddedToCalendar": "تمت إضافة تذكير إلى التقويم ✅",
"errorWhileSettingCalendar": "حدث خطأ أثناء ضبط التقويم:{error}",
"instructions": "التعليمات",
"requests": "الطلبات",
"thisWeek": "هذا الأسبوع",
"lastMonth": "الشهر الماضي",
"lastSixMonths": "آخر 6 أشهر",
"selectTime": "حدد الوقت",
"pleaseWaitYouWillBeCalledForVitalSigns": "يرجى الانتظار! سيتم استدعاؤك لقياس العلامات الحيوية",
"pleaseVisitRoomForVitalSigns": "يرجى زيارة الغرفة {roomNumber} لقياس العلامات الحيوية",
"pleaseVisitRoomToTheDoctor": "يرجى زيارة الغرفة {roomNumber} لمقابلة الطبيب"
}

@ -406,11 +406,8 @@
"brand": "Brand",
"power": "Power",
"diameter": "Diameter",
"remarks": "Remarks",
"activeMedications": "Active Medications",
"expDate": "Active Exp Date :",
"route": "Route",
"frequency": "Frequency",
"dailyQuantity": "Daily Quantity :",
"addReminder": "Add Reminder",
"cancelReminder": "Cancel Reminder",
@ -889,7 +886,6 @@
"pickADate": "Pick a Date",
"confirmingAppointmentPleaseWait": "Confirming Appointment, Please Wait...",
"appointmentConfirmedSuccessfully": "Appointment Confirmed Successfully",
"appointmentPayment": "Appointment Payment",
"checkingPaymentStatusPleaseWait": "Checking payment status, Please wait...",
"paymentFailedPleaseTryAgain": "Payment Failed! Please try again.",
@ -1207,5 +1203,292 @@
"virtualTour": "Virtual Tour",
"carParking": "Car Parking",
"latestNews": "Latest News",
"hmgContact": "HMG Contact"
}
"hmgContact": "HMG Contact",
"durationCannotExceed90": "Duration can not exceed 90 mins",
"unexpectedError": "Unexpected Error Occurred",
"gettingAmbulanceTransportOption": "Getting Ambulance Transport Option",
"fetchingAppointment": "Fetching Appointment",
"doYouWantToCancelTheRequest": "Do you want to cancel the request",
"cancellingRequest": "Cancelling request",
"fetchingTermsAndConditions": "Fetching Terms And Conditions",
"selectLocationPrescriptionDelivery": "Please select the location for prescription delivery",
"noRadiologyOrders": "No Radiology Orders Found",
"ageIsRequired": "Age is required",
"invalidAge": "Invalid age",
"ageMustBeBetween11And120": "Age must be between 11 and 120",
"heightIsRequired": "Height is required",
"invalidHeight": "Invalid height",
"weightIsRequired": "Weight is required",
"invalidWeight": "Invalid weight",
"timeToDrinkWater": "Time to Drink Water! 💧",
"stayHydratedDrinkWater": "Stay hydrated! Drink {amount}ml of water.",
"visitPharmacyOnline": "Visit Pharmacy Online",
"howAreYouFeelingToday": "How are you feeling today?",
"checkYourSymptomsWithScale": "Check your symptoms with this scale",
"checkYourSymptoms": "Check your symptoms",
"noUpcomingAppointmentPleaseBook": "You do not have any upcoming appointment. Please book an appointment",
"youHaveEROnlineCheckInRequest": "You have ER Online Check-In Request",
"quickLinks": "Quick Links",
"viewMedicalFileLandingPage": "View medical file",
"immediateLiveCareRequest": "Immediate LiveCare Request",
"yourTurnIsAfterPatients": "Your turn is after {count} patients.",
"dontHaveHHCOrders": "You don't have any Home Health Care orders yet.",
"hhcOrders": "HHC Orders",
"requestedServices": "Requested Services",
"selectServices": "Select Services",
"selectedServices": "Selected Services",
"createNewRequest": "Create new request",
"youHaveNoPendingRequests": "You have no pending requests.",
"noInsuranceDataFound": "No insurance data found...",
"noInsuranceUpdateRequest": "No insurance update requests found.",
"policyNumberInsurancePage": "Policy: {number}",
"insuranceExpired": "Insurance Expired",
"insuranceActive": "Insurance Active",
"patientCardID": "Patient Card ID: {id}",
"noInsuranceApprovals": "You don't have any insurance approvals yet.",
"noInsuranceWithHMG": "You don't have insurance registered with HMG.",
"referenceRange": "Reference Range",
"downloadReport": "Download report",
"generatingReport": "Generating report, Please wait...",
"noLabResults": "You don't have any lab results yet.",
"labResultDetails": "Lab Result Details",
"resultOf": "Result of",
"whatIsThisResult": "What is this result?",
"lastTested": "Last Tested",
"byVisit": "By Visit",
"byTest": "By Test",
"results": "results",
"viewResults": "View Results",
"rebook": "Rebook",
"noOphthalmologyAppointments": "No Ophthalmology appointments found...",
"noVitalSignsRecordedYet": "No vital signs recorded yet",
"appointmentsAndVisits": "Appointments & visits",
"labAndRadiology": "Lab & Radiology",
"activeMedicationsAndPrescriptions": "Active Medications & Prescriptions",
"allPrescriptions": "All Prescriptions",
"allMedications": "All Medications",
"youDontHaveAnyPrescriptionsYet": "You don't have any prescriptions yet.",
"youDontHaveAnyCompletedVisitsYet": "You don't have any completed visits yet",
"others": "Others",
"allergyInfo": "Allergy Info",
"vaccineInfo": "Vaccine Info",
"updateInsuranceInfo": "Update Insurance",
"myInvoicesList": "My Invoices List",
"ancillaryOrdersList": "Ancillary Orders List",
"youDontHaveAnySickLeavesYet": "You don't have any sick leaves yet.",
"medicalReports": "Medical Reports",
"sickLeaveReport": "Sick Leave Report",
"weightTracker": "Weight Tracker",
"askYourDoctor": "Ask Your Doctor",
"internetPairing": "Internet Pairing",
"requested": "Requested",
"youDontHaveAnyMedicalReportsYet": "You don't have any medical reports yet.",
"requestMedicalReport": "Request medical report",
"youDoNotHaveAnyAppointmentsToRequestMedicalReport": "You do not have any appointments to request a medical report.",
"areYouSureYouWantToRequestMedicalReport": "Are you sure you want to request a medical report for this appointment?",
"yourMedicalReportRequestSubmittedSuccessfully": "Your medical report request has been successfully submitted.",
"monthlyHealthSummaryReportDisclaimer": "This monthly health summary report reflects the health indicators and analysis results of the latest visits. Please note that this will be sent automatically from the system and it's not considered as a official report so no medical decision should be taken based on it",
"updatingMonthlyReportStatus": "Updating Monthly Report Status...",
"monthlyReportStatusUpdatedSuccessfully": "Monthly Report Status Updated Successfully",
"whoCanViewMyMedicalFile": "Who can view my medical file?",
"acceptedYourRequestToBeYourFamilyMember": "{status} your request to be your family member",
"canViewYourFile": "can view your file",
"hasARequestPendingToBeYourFamilyMember": "has a request {status} to be your family member",
"wantsToAddYouAsTheirFamilyMember": "wants to add you as their family member",
"rejectedYourRequestToBeYourFamilyMember": "{status} your request to be your family member",
"rejectedYourFamilyMemberRequest": "{status} your family member request",
"notAvailable": "N/A",
"selectAProfile": "Please select a profile",
"switchFamilyFile": "Switch from the below list of medical file",
"medicalFiles": "Medical Files",
"addANewFamilyMember": "Add a new family member",
"viewInvoiceDetails": "View invoice details",
"outPatient": "OutPatient",
"invoiceDetails": "Invoice Details",
"sendingEmailPleaseWait": "Sending email, Please wait...",
"emailSentSuccessfullyMessage": "Email sent successfully.",
"discount": "Discount",
"paid": "Paid",
"fetchingInvoiceDetails": "Fetching invoice details, Please wait...",
"scanQRCode": "Scan QR code",
"parkingSlotDetails": "Parking Slot Details",
"slotNumber": "Slot: {code}",
"basement": "Basement: {description}",
"parkingDate": "Date: {date}",
"parkedSince": "Parked Since: {time}",
"resetDirection": "Reset Direction",
"noPrescriptionOrdersYet": "You don't have any prescription orders yet.",
"fetchingPrescriptionPDFPleaseWait": "Fetching prescription PDF, Please wait...",
"ratingValue": "Rating: {rating}",
"downloadPrescription": "Download Prescription",
"fetchingPrescriptionDetails": "Fetching prescription details...",
"switchBackFamilyFile": "Switch Back To Family File",
"profileAndSettings": "Profile & Settings",
"quickActions": "Quick Actions",
"notificationsSettings": "Notifications Settings",
"touchIDFaceIDServices": "Touch ID / Face ID Services",
"personalInformation": "Personal Information",
"updateEmailAddress": "Update Email Address",
"helpAndSupport": "Help & Support",
"permissionsProfile": "Permissions",
"privacyPolicy": "Privacy Policy",
"deactivateAccount": "Deactivate account",
"ageYearsOld": "{age} {yearsOld}",
"youDontHaveRadiologyOrders": "You don't have any radiology results yet.",
"radiologyResult": "Radiology Result",
"viewRadiologyImage": "View Radiology Image",
"rateClinic": "Rate Clinic",
"back": "Back",
"rateDoctor": "Rate Doctor",
"howWasYourLastVisitWithDoctor": "How was your last visit with doctor?",
"dateOfBirthSymptoms": "What is your Date of Birth?",
"genderSymptoms": "What is your gender?",
"heightSymptoms": "How tall are you?",
"weightSymptoms": "What is your weight?",
"femaleGender": "Female",
"previous": "Previous",
"selectedOrgans": "Selected Organs",
"noOrgansSelected": "No organs selected yet",
"organSelector": "Organ Selector",
"noPredictionsAvailable": "No Predictions available",
"areYouSureYouWantToRestartOrganSelection": "Are you sure you want to restart the organ selection?",
"possibleConditions": "Possible Conditions",
"pleaseSelectAtLeastOneRiskBeforeProceeding": "Please select at least one risk before proceeding",
"aboveYouSeeCommonRiskFactors": "Above you see the most common risk factors. Although /diagnosis may return questions about risk factors, ",
"readMore": "Read more",
"riskFactors": "Risk Factors",
"noRiskFactorsFound": "No risk factors found",
"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",
"vitalSignDetails": "Vital Sign Details",
"resultOf": "Result of {date}",
"resultOfNoDate": "Result of --",
"referenceRangeBetween": "Reference range: {low} {high} {unit}",
"referenceRangeMin": "Reference range: ≥ {low} {unit}",
"referenceRangeMax": "Reference range: ≤ {high} {unit}",
"noHistoryAvailable": "No history available",
"bmiDescription": "BMI is a measurement based on height and weight that estimates body fat.",
"heightDescription": "Height is measured in centimeters and is used to calculate BMI and dosage recommendations.",
"weightDescription": "Weight helps track overall health, nutrition, and changes over time.",
"bloodPressureDescription": "Blood pressure reflects the force of blood against artery walls. It is shown as systolic/diastolic.",
"temperatureDescription": "Body temperature reflects how hot your body is and may change with infection or inflammation.",
"heartRateDescriptionVital": "Heart rate refers to the number of heart beats per minute.",
"respiratoryRateDescription": "Respiratory rate is the number of breaths taken per minute.",
"bmiAdvice": "Maintain a balanced diet and regular activity. If your BMI is high or low, consider consulting your doctor.",
"heightAdvice": "No action is needed unless your measurement looks incorrect. Update it during your next visit.",
"weightAdvice": "Monitor weight changes. Sudden gain or loss may require medical advice.",
"bloodPressureAdvice": "Keep tracking your blood pressure. High or low readings should be discussed with your doctor.",
"temperatureAdvice": "If you have a persistent fever or symptoms, contact your healthcare provider.",
"heartRateAdvice": "Track your heart rate trends. If you feel dizziness or chest pain, seek medical care.",
"respiratoryRateAdvice": "If you notice shortness of breath or abnormal breathing, seek medical advice.",
"whatShouldIDoNext": "What should I do next?",
"customizeDrinkCup": "Customize your drink cup",
"tipsToStayHydrated": "Tips to stay hydrated",
"drinkBeforeYouFeelThirsty": "Drink before you feel thirsty",
"keepRefillableBottleNextToYou": "Keep a refillable bottle next to you",
"trackYourDailyIntakeToStayMotivated": "Track your daily intake to stay motivated",
"chooseSparklingWaterInsteadOfSoda": "Choose sparkling water instead of soda",
"switchCup": "Switch Cup",
"plainWater": "Plain Water",
"yourGoal": "Your Goal",
"remaining": "Remaining",
"hydrationStatus": "Hydration Status",
"areYouSureYouWantToCancelAllWaterReminders": "Are you sure you want to cancel all water reminders?",
"remindersSet": "Reminders Set!",
"dailyWaterRemindersScheduledAt": "Daily water reminders scheduled at:",
"waterConsumption": "Water Consumption",
"selectActivityLevel": "Select Activity Level",
"selectNumberOfReminders": "Select Number of Reminders",
"h2oSettings": "H20 Settings",
"settingsSavedSuccessfully": "Settings saved successfully",
"yourName": "Your Name",
"ageYears": "Age (11-120) yrs",
"numberOfRemindersInADay": "Number of reminders in a day",
"medications": "Medications",
"remarks": "Remarks: ",
"someRemarksAboutPrescription": "some remarks about the prescription will be here",
"notifyMeBeforeConsumptionTime": "Notify me before the consumption time",
"noMedicationsToday": "No medications today",
"route": "Route: {route}",
"frequency": "Frequency: {frequency}",
"instruction": "Instruction: {instruction}",
"duration": "Duration: {days}",
"reminders": "Reminders",
"reminderAddedToCalendar": "Reminder added to calendar ✅",
"errorWhileSettingCalendar": "Error while setting calendar: {error}",
"instructions": "Instructions",
"requests": "Requests",
"thisWeek": "This Week",
"lastMonth": "Last Month",
"lastSixMonths": "Last 6 Months",
"selectTime": "Select Time",
"pleaseWaitYouWillBeCalledForVitalSigns": "Please wait! you will be called for vital signs",
"pleaseVisitRoomForVitalSigns": "Please visit Room {roomNumber} for vital signs",
"pleaseVisitRoomToTheDoctor": "Please visit Room {roomNumber} to the Doctor"
}

@ -151,6 +151,7 @@ var GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
///LiveChat
var GET_LIVECHAT_REQUEST = 'Services/Patients.svc/REST/GetPatientICProjects';
var GET_LIVECHAT_REQUEST_ID = 'Services/Patients.svc/REST/Patient_ICChatRequest_Insert';
///babyInformation
var GET_BABYINFORMATION_REQUEST = 'Services/Community.svc/REST/GetBabyByUserID';
@ -679,7 +680,7 @@ const DASHBOARD = 'Services/Patients.svc/REST/PatientDashboard';
class ApiConsts {
static const maxSmallScreen = 660;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.preProd;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat;
// static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT

@ -61,7 +61,6 @@ import 'package:hmg_patient_app_new/features/water_monitor/water_monitor_repo.da
import 'package:hmg_patient_app_new/features/water_monitor/water_monitor_view_model.dart';
import 'package:hmg_patient_app_new/presentation/health_trackers/health_trackers_view_model.dart';
import 'package:hmg_patient_app_new/services/analytics/analytics_service.dart';
import 'package:hmg_patient_app_new/presentation/monthly_reports/monthly_reports_page.dart';
import 'package:hmg_patient_app_new/services/cache_service.dart';
import 'package:hmg_patient_app_new/services/dialog_service.dart';
import 'package:hmg_patient_app_new/services/error_handler_service.dart';
@ -299,13 +298,13 @@ class AppDependencies {
activePrescriptionsRepo: getIt()
),
);
// getIt.registerFactory<QrParkingViewModel>(
// () => QrParkingViewModel(
// qrParkingRepo: getIt<QrParkingRepo>(),
// errorHandlerService: getIt<ErrorHandlerService>(),
// cacheService: getIt<CacheService>(),
// ),
// );
getIt.registerFactory<QrParkingViewModel>(
() => QrParkingViewModel(
qrParkingRepo: getIt<QrParkingRepo>(),
errorHandlerService: getIt<ErrorHandlerService>(),
cacheService: getIt<CacheService>(),
),
);
}
}

@ -104,7 +104,7 @@ class LocationUtils {
title: LocaleKeys.notice.tr(context: navigationService.navigatorKey.currentContext!),
navigationService.navigatorKey.currentContext!,
child: Utils.getWarningWidget(
loadingText: "Please grant location permission from app settings to see better results".needTranslation,
loadingText: "Please grant location permission from app settings to see better results",
isShowActionButtons: true,
onCancelTap: () {
navigationService.pop();
@ -265,7 +265,7 @@ class LocationUtils {
title: LocaleKeys.notice.tr(context: navigationService.navigatorKey.currentContext!),
navigationService.navigatorKey.currentContext!,
child: Utils.getWarningWidget(
loadingText: "Please grant location permission from app settings to see better results".needTranslation,
loadingText: "Please grant location permission from app settings to see better results",
isShowActionButtons: true,
onCancelTap: () {
navigationService.pop();

@ -215,14 +215,14 @@ showReminderBottomSheet(BuildContext context, DateTime dateTime, String doctorNa
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 {
showCommonBottomSheetWithoutHeight(providedContext, title: "Set the timer of reminder".needTranslation, child: PrescriptionReminderView(
showCommonBottomSheetWithoutHeight(providedContext, title: "Set the timer of reminder", child: PrescriptionReminderView(
setReminder: (int value) async {
if (!isMultiAllowed!) {
if (onMultiDateSuccess == null) {
CalendarUtils calendarUtils = await CalendarUtils.getInstance();
await calendarUtils.createOrUpdateEvent(
title: title ?? "You have appointment with Dr. ".needTranslation + doctorName,
description: description ?? "At " + appoDateFormatted + " " + appoTimeFormatted,
title: title ?? "You have appointment with Dr. $doctorName",
description: description ?? "At $appoDateFormatted $appoTimeFormatted",
scheduleDateTime: dateTime,
eventId: eventId,
location: '');

@ -959,11 +959,11 @@ class Utils {
static String getCardButtonText(int currentQueueStatus, String roomNumber) {
switch (currentQueueStatus) {
case 0:
return "Please wait! you will be called for vital signs".needTranslation;
return LocaleKeys.pleaseWaitYouWillBeCalledForVitalSigns.tr();
case 1:
return "Please visit Room $roomNumber for vital signs".needTranslation;
return LocaleKeys.pleaseVisitRoomForVitalSigns.tr(namedArgs: {'roomNumber': roomNumber.toString()});
case 2:
return "Please visit Room $roomNumber to the Doctor".needTranslation;
return LocaleKeys.pleaseVisitRoomToTheDoctor.tr(namedArgs: {'roomNumber': roomNumber.toString()});
}
return "";
}

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
@ -8,6 +9,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/features/blood_donation/blood_donation_view_model.dart';
import 'package:hmg_patient_app_new/features/blood_donation/models/blood_group_hospitals_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart' show AppColors;
import 'package:provider/provider.dart';
@ -23,14 +25,7 @@ class HospitalBottomSheetBodySelection extends StatelessWidget {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Please select the hospital you want to make an appointment.".needTranslation,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,
color: AppColors.greyTextColor,
),
),
LocaleKeys.selectHospital.tr(context: context).toText16(weight: FontWeight.w500, color: AppColors.greyTextColor),
SizedBox(height: 16.h),
SizedBox(
height: MediaQuery.sizeOf(context).height * .4,

@ -473,7 +473,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
result.fold(
(failure) async {
onError!("No doctors found for the search criteria".needTranslation);
onError!(LocaleKeys.noDoctorFound.tr());
},
(apiResponse) {
if (apiResponse.messageStatus == 2) {
@ -501,7 +501,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
result.fold(
(failure) async {
isDoctorsListLoading = false;
if (onError != null) onError("No doctors found for the search criteria".needTranslation);
if (onError != null) onError(LocaleKeys.noDoctorFound.tr());
notifyListeners();
},
@ -533,7 +533,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
result.fold(
(failure) async {
isDoctorsListLoading = false;
if (onError != null) onError("No doctors found for the search criteria".needTranslation);
if (onError != null) onError(LocaleKeys.noDoctorFound.tr());
notifyListeners();
},
@ -569,7 +569,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
result.fold(
(failure) async {
onError?.call("No doctors found for the search criteria".needTranslation);
onError?.call(LocaleKeys.noDoctorFound.tr());
},
(apiResponse) async {
if (apiResponse.messageStatus == 2) {
@ -784,7 +784,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
);
showCommonBottomSheet(navigationService.navigatorKey.currentContext!,
child: Utils.getLoadingWidget(loadingText: "Cancelling your previous appointment....".needTranslation),
child: Utils.getLoadingWidget(loadingText: LocaleKeys.cancellingAppointmentPleaseWait.tr()),
callBackFunc: (str) {},
title: "",
height: ResponsiveExtension.screenHeight * 0.3,
@ -794,7 +794,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
await cancelAppointment(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel).then((val) async {
navigationService.pop();
Future.delayed(Duration(milliseconds: 50)).then((value) async {});
LoadingUtils.showFullScreenLoader(barrierDismissible: true, isSuccessDialog: false, loadingText: "Booking your appointment...".needTranslation);
LoadingUtils.showFullScreenLoader(barrierDismissible: true, isSuccessDialog: false, loadingText: LocaleKeys.bookingYourAppointment.tr());
await insertSpecificAppointment(
onError: (err) {},
onSuccess: (apiResp) async {
@ -880,7 +880,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
);
showCommonBottomSheet(navigationService.navigatorKey.currentContext!,
child: Utils.getLoadingWidget(loadingText: "Cancelling your previous appointment....".needTranslation),
child: Utils.getLoadingWidget(loadingText: LocaleKeys.cancellingAppointmentPleaseWait.tr()),
callBackFunc: (str) {},
title: "",
height: ResponsiveExtension.screenHeight * 0.3,
@ -890,7 +890,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
await cancelAppointment(patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel).then((val) async {
navigationService.pop();
Future.delayed(Duration(milliseconds: 50)).then((value) async {});
LoadingUtils.showFullScreenLoader(barrierDismissible: true, isSuccessDialog: false, loadingText: "Booking your appointment...".needTranslation);
LoadingUtils.showFullScreenLoader(barrierDismissible: true, isSuccessDialog: false, loadingText: LocaleKeys.bookingYourAppointment.tr());
await insertSpecificAppointment(
onError: (err) {},
onSuccess: (apiResp) async {
@ -1204,7 +1204,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
result.fold(
(failure) async {
onError!("No doctors found for the search criteria...".needTranslation);
onError!(LocaleKeys.noDoctorFound.tr());
},
(apiResponse) {
if (apiResponse.messageStatus == 2) {
@ -1291,18 +1291,18 @@ class BookAppointmentsViewModel extends ChangeNotifier {
notifyListeners();
} else {
if (this.duration == 90) {
dialogService.showErrorBottomSheet(
message: "Duration can not exceed 90 min".needTranslation,
);
return;
}
// if (this.duration == 90) {
// dialogService.showErrorBottomSheet(
// message: "Duration can not exceed 90 min".needTranslation,
// );
// return;
// }
selectedBodyPartList.add(part);
var duration = getDuration();
if (duration > 90) {
selectedBodyPartList.remove(part);
dialogService.showErrorBottomSheet(
message: "Duration Exceeds 90 min".needTranslation,
message: LocaleKeys.durationCannotExceed90.tr(),
);
return;
}
@ -1336,7 +1336,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
result.fold(
(failure) async {
onError!("Invalid verification point scanned.".needTranslation);
onError!("Invalid verification point scanned.");
},
(apiResponse) {
// if (apiResponse.data['returnValue'] == 0) {
@ -1410,7 +1410,7 @@ class BookAppointmentsViewModel extends ChangeNotifier {
);
} else if (apiResponse.messageStatus == 1) {
if (apiResponse.data == null || apiResponse.data!.isEmpty) {
onError!("Unexpected Error Occurred".needTranslation);
onError!(LocaleKeys.unexpectedError.tr());
return;
}
notifyListeners();

@ -14,6 +14,8 @@ abstract class ContactUsRepo {
Future<Either<Failure, GenericApiModel<List<GetPatientICProjectsModel>>>> getLiveChatProjectsList();
Future<Either<Failure, GenericApiModel<String>>> getChatRequestID({required String name, required String mobileNo, required String workGroup});
Future<Either<Failure, GenericApiModel<dynamic>>> insertCOCItem({required RequestInsertCOCItem requestInsertCOCItem, PatientAppointmentHistoryResponseModel? patientSelectedAppointment});
}
@ -97,6 +99,45 @@ class ContactUsRepoImp implements ContactUsRepo {
}
}
@override
Future<Either<Failure, GenericApiModel<String>>> getChatRequestID({required String name, required String mobileNo, required String workGroup}) async {
Map<String, dynamic> body = {};
body['Name'] = name;
body['MobileNo'] = mobileNo;
body['WorkGroup'] = workGroup;
try {
GenericApiModel<String>? apiResponse;
Failure? failure;
await apiClient.post(
GET_LIVECHAT_REQUEST_ID,
body: body,
onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType;
},
onSuccess: (response, statusCode, {messageStatus, errorMessage}) {
try {
final requestId = response['RequestId'] as String;
apiResponse = GenericApiModel<String>(
messageStatus: messageStatus,
statusCode: statusCode,
errorMessage: null,
data: requestId,
);
} 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()));
}
}
@override
Future<Either<Failure, GenericApiModel<dynamic>>> insertCOCItem({required RequestInsertCOCItem requestInsertCOCItem, PatientAppointmentHistoryResponseModel? patientSelectedAppointment}) async {
final Map<String, dynamic> body = requestInsertCOCItem.toJson();

@ -29,6 +29,8 @@ class ContactUsViewModel extends ChangeNotifier {
int selectedLiveChatProjectIndex = -1;
String? chatRequestID;
List<String> feedbackAttachmentList = [];
PatientAppointmentHistoryResponseModel? patientFeedbackSelectedAppointment;
@ -153,6 +155,32 @@ class ContactUsViewModel extends ChangeNotifier {
);
}
Future<void> getChatRequestID({required String name, required String mobileNo, required String workGroup, Function(dynamic)? onSuccess, Function(String)? onError}) async {
final result = await contactUsRepo.getChatRequestID(name: name, mobileNo: mobileNo, workGroup: workGroup);
result.fold(
(failure) async {
await errorHandlerService.handleError(failure: failure);
if (onError != null) {
onError(failure.toString());
}
},
(apiResponse) {
if (apiResponse.messageStatus == 2) {
if (onError != null) {
onError(apiResponse.errorMessage ?? 'Unknown error');
}
} else if (apiResponse.messageStatus == 1) {
chatRequestID = apiResponse.data;
notifyListeners();
if (onSuccess != null) {
onSuccess(apiResponse);
}
}
},
);
}
Future<void> insertCOCItem({required String subject, required String message, Function(dynamic)? onSuccess, Function(String)? onError}) async {
RequestInsertCOCItem requestInsertCOCItem = RequestInsertCOCItem();
requestInsertCOCItem.attachment = feedbackAttachmentList.isNotEmpty ? feedbackAttachmentList.first : "";

@ -1,5 +1,6 @@
import 'dart:async';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart' as GMSMapServices;
import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -32,6 +33,7 @@ import 'package:hmg_patient_app_new/features/my_appointments/models/facility_sel
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/hospital_model.dart';
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/my_appointments_repo.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/RRT/rrt_request_type_select.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/RRT/terms_and_condition.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/call_ambulance/call_ambulance_page.dart';
@ -152,7 +154,7 @@ class EmergencyServicesViewModel extends ChangeNotifier {
print("the app state is ${appState.isAuthenticated}");
if (!appState.isAuthenticated) {
dialogService.showErrorBottomSheet(
message: "You Need To Login First To Continue".needTranslation,
message: LocaleKeys.loginToUseService.tr(),
onOkPressed: () {
navServices.pop();
getIt<AuthenticationViewModel>().onLoginPressed();
@ -196,7 +198,6 @@ class EmergencyServicesViewModel extends ChangeNotifier {
}
void filterErList(String query) {
print("the query is $query");
if (query.isEmpty) {
nearestERFilteredList = nearestERList;
} else {
@ -277,7 +278,6 @@ class EmergencyServicesViewModel extends ChangeNotifier {
flushData();
selectedFacility = FacilitySelection.ALL;
print("the app state is ${appState.isAuthenticated}");
if (appState.isAuthenticated) {
locationUtils!.getLocation(
isShowConfirmDialog: true,
@ -289,7 +289,7 @@ class EmergencyServicesViewModel extends ChangeNotifier {
});
} else {
dialogService.showErrorBottomSheet(
message: "You Need To Login First To Continue".needTranslation,
message: LocaleKeys.loginToUseService.tr(),
onOkPressed: () {
navServices.pop();
navServices.pushAndReplace(AppRoutes.loginScreen);
@ -311,7 +311,7 @@ class EmergencyServicesViewModel extends ChangeNotifier {
void updateBottomSheetState(BottomSheetType sheetType) {
if (sheetType == BottomSheetType.EXPANDED && selectedHospital == null) {
dialogService.showErrorBottomSheet(message: "Kindly Select Hospital".needTranslation);
dialogService.showErrorBottomSheet(message: LocaleKeys.selectHospital.tr());
return;
}
bottomSheetType = sheetType;
@ -481,21 +481,18 @@ class EmergencyServicesViewModel extends ChangeNotifier {
Future<void> getTransportationOption() async {
//handle the cache if the data is present then dont fetch it in the authenticated lifecycle
print("the app state is ${appState.isAuthenticated}");
if (appState.isAuthenticated == false) {
dialogService.showErrorBottomSheet(
message: "You Need To Login First To Continue".needTranslation,
message: LocaleKeys.loginToUseService.tr(),
onOkPressed: () {
navServices.pop();
print("inside the ok button");
getIt<AuthenticationViewModel>().onLoginPressed();
});
return;
}
int? id = appState.getAuthenticatedUser()?.patientId;
LoaderBottomSheet.showLoader(loadingText: "Getting Ambulance Transport Option".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.gettingAmbulanceTransportOption.tr());
notifyListeners();
var response = await emergencyServicesRepo.getTransportationMethods(id: id);
@ -514,7 +511,7 @@ class EmergencyServicesViewModel extends ChangeNotifier {
Future<void> getTransportationMethods() async {
int? id = appState.getAuthenticatedUser()?.patientId;
LoaderBottomSheet.showLoader(loadingText: "Getting Ambulance Transport Option".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.gettingAmbulanceTransportOption.tr());
notifyListeners();
var response = await emergencyServicesRepo.getTransportationMethods(id: id);
@ -703,7 +700,7 @@ class EmergencyServicesViewModel extends ChangeNotifier {
}
Future<void> getAppointments() async {
LoaderBottomSheet.showLoader(loadingText: "Fetching Appointment".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingAppointment.tr());
var result = await appointmentRepo.getPatientAppointments(isActiveAppointment: true, isArrivedAppointments: false);
LoaderBottomSheet.hideLoader();
@ -860,10 +857,10 @@ class EmergencyServicesViewModel extends ChangeNotifier {
Future<void> cancelOrder(AmbulanceRequestOrdersModel? order, {bool shouldPop = false}) async {
dialogService.showCommonBottomSheetWithoutH(
message: "Do you want to cancel the request".needTranslation,
message: LocaleKeys.doYouWantToCancelTheRequest.tr(),
onOkPressed: () async {
navServices.pop();
LoaderBottomSheet.showLoader(loadingText: "Cancelling request".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.cancellingRequest.tr());
var response = await emergencyServicesRepo.cancelOrder(order?.iD, appState.getAuthenticatedUser()?.patientId ?? 0);
LoaderBottomSheet.hideLoader();
response.fold((failure) => errorHandlerService.handleError(failure: failure), (success) {
@ -968,10 +965,10 @@ class EmergencyServicesViewModel extends ChangeNotifier {
FutureOr<void> cancelRRTOrder(int? orderID, {bool shouldPop = false}) async {
dialogService.showCommonBottomSheetWithoutH(
message: "Do you want to cancel the request".needTranslation,
message: LocaleKeys.doYouWantToCancelTheRequest.tr(),
onOkPressed: () async {
navServices.pop();
LoaderBottomSheet.showLoader(loadingText: "Cancelling request".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.cancellingRequest.tr());
var response = await emergencyServicesRepo.cancelRRTOrder(orderID);
LoaderBottomSheet.hideLoader();
response.fold((failure) => errorHandlerService.handleError(failure: failure), (success) {
@ -1001,11 +998,10 @@ class EmergencyServicesViewModel extends ChangeNotifier {
}
void openRRT() {
print("the app state is ${appState.isAuthenticated}");
if (appState.isAuthenticated) {
if (agreedToTermsAndCondition == false) {
dialogService.showErrorBottomSheet(
message: "You Need To Agree To Terms And Conditions".needTranslation,
message: LocaleKeys.pleaseAcceptTermsConditions.tr(),
onOkPressed: () {
if (navServices.context == null) return;
showCommonBottomSheetWithoutHeight(
@ -1042,9 +1038,9 @@ class EmergencyServicesViewModel extends ChangeNotifier {
bool result = await navServices.push(
CustomPageRoute(
page: MapUtilityScreen(
confirmButtonString: "Submit Request".needTranslation,
titleString: "Select Location".needTranslation,
subTitleString: "Please select the location".needTranslation,
confirmButtonString: LocaleKeys.submitRequest.tr(),
titleString: LocaleKeys.selectLocation.tr(),
subTitleString: LocaleKeys.pleaseSelectTheLocation.tr(),
isGmsAvailable: appState.isGMSAvailable,
),
direction: AxisDirection.down),
@ -1059,7 +1055,7 @@ class EmergencyServicesViewModel extends ChangeNotifier {
});
} else {
dialogService.showErrorBottomSheet(
message: "You Need To Login First To Continue".needTranslation,
message: LocaleKeys.loginToUseService.tr(),
onOkPressed: () {
navServices.pop();
getIt<AuthenticationViewModel>().onLoginPressed();
@ -1072,12 +1068,11 @@ class EmergencyServicesViewModel extends ChangeNotifier {
}
FutureOr<void> getTermsAndConditions() async {
LoaderBottomSheet.showLoader(loadingText: "Fetching Terms And Conditions".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingTermsAndConditions.tr());
var response = await emergencyServicesRepo.getTermsAndCondition();
LoaderBottomSheet.hideLoader();
response.fold((failure) => errorHandlerService.handleError(failure: failure), (success) {
termsAndConditions = success.data;
print("the response terms are $termsAndConditions");
notifyListeners();
navServices.push(
CustomPageRoute(page: TermsAndCondition(termsAndCondition: success.data ?? ""), direction: AxisDirection.down),

@ -940,7 +940,16 @@ class HmgServicesRepoImp implements HmgServicesRepo {
for (var vitalSignJson in vitalSignsList) {
if (vitalSignJson is Map<String, dynamic>) {
vitalSignList.add(VitalSignResModel.fromJson(vitalSignJson));
final vitalSign = VitalSignResModel.fromJson(vitalSignJson);
// Only add records where BOTH height AND weight are greater than 0
final hasValidWeight = _isValidValue(vitalSign.weightKg);
final hasValidHeight = _isValidValue(vitalSign.heightCm);
// Only add if both height and weight are valid (> 0)
if (hasValidWeight && hasValidHeight) {
vitalSignList.add(vitalSign);
}
}
}
}
@ -967,5 +976,22 @@ class HmgServicesRepoImp implements HmgServicesRepo {
}
}
/// Helper method to check if a value is valid (greater than 0)
bool _isValidValue(dynamic value) {
if (value == null) return false;
if (value is num) {
return value > 0;
}
if (value is String) {
if (value.trim().isEmpty) return false;
final parsed = double.tryParse(value);
return parsed != null && parsed > 0;
}
return false;
}
}

@ -84,7 +84,7 @@ class AppointmentType {
static String getNextActionText(nextAction) {
switch (nextAction) {
case 0:
return "No Action".needTranslation;
return LocaleKeys.upcomingNoAction.tr();
case 10:
return LocaleKeys.confirm.tr();
case 15:
@ -96,7 +96,7 @@ class AppointmentType {
case 90:
return LocaleKeys.checkinOption.tr();
default:
return "No Action".needTranslation;
return LocaleKeys.upcomingNoAction.tr();
}
}

@ -245,8 +245,8 @@ class PrescriptionsViewModel extends ChangeNotifier {
CustomPageRoute(
page: MapUtilityScreen(
confirmButtonString: LocaleKeys.next.tr(),
titleString: "Select Location".needTranslation,
subTitleString: "Please select the location for prescription delivery".needTranslation,
titleString: LocaleKeys.selectLocation.tr(),
subTitleString: LocaleKeys.selectLocationPrescriptionDelivery.tr(),
isGmsAvailable: getIt.get<AppState>().isGMSAvailable,
),
direction: AxisDirection.down),

@ -1,7 +1,9 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/features/authentication/models/resp_models/authenticated_user_resp_model.dart';
import 'package:hmg_patient_app_new/features/radiology/radiology_repo.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/radiology/radiology_result_page.dart';
import 'package:hmg_patient_app_new/services/error_handler_service.dart';
import 'package:hmg_patient_app_new/services/navigation_service.dart';
@ -97,7 +99,7 @@ class RadiologyViewModel extends ChangeNotifier {
);
} else {
if (onError != null) {
onError("No Radiology Orders Found".needTranslation);
onError(LocaleKeys.noRadiologyOrders.tr());
}
}
}

@ -1,5 +1,6 @@
import 'dart:developer';
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_assets.dart';
@ -14,6 +15,7 @@ import 'package:hmg_patient_app_new/features/water_monitor/models/update_user_de
import 'package:hmg_patient_app_new/features/water_monitor/models/user_progress_models.dart';
import 'package:hmg_patient_app_new/features/water_monitor/models/water_cup_model.dart';
import 'package:hmg_patient_app_new/features/water_monitor/water_monitor_repo.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.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/error_handler_service.dart';
@ -598,36 +600,36 @@ class WaterMonitorViewModel extends ChangeNotifier {
String? validateAge() {
if (ageController.text.trim().isEmpty) {
return 'Age is required'.needTranslation;
return LocaleKeys.ageIsRequired.tr();
}
final age = int.tryParse(ageController.text.trim());
if (age == null) {
return 'Invalid age'.needTranslation;
return LocaleKeys.invalidAge.tr();
}
if (age < 11 || age > 120) {
return 'Age must be between 11 and 120'.needTranslation;
return LocaleKeys.ageMustBeBetween11And120.tr();
}
return null;
}
String? validateHeight() {
if (heightController.text.trim().isEmpty) {
return 'Height is required'.needTranslation;
return LocaleKeys.heightIsRequired.tr();
}
final height = double.tryParse(heightController.text.trim());
if (height == null || height <= 0) {
return 'Invalid height'.needTranslation;
return LocaleKeys.invalidHeight.tr();
}
return null;
}
String? validateWeight() {
if (weightController.text.trim().isEmpty) {
return 'Weight is required'.needTranslation;
return LocaleKeys.weightIsRequired.tr();
}
final weight = double.tryParse(weightController.text.trim());
if (weight == null || weight <= 0) {
return 'Invalid weight'.needTranslation;
return LocaleKeys.invalidWeight.tr();
}
return null;
}
@ -1212,8 +1214,8 @@ class WaterMonitorViewModel extends ChangeNotifier {
// Schedule water reminders
await notificationService.scheduleWaterReminders(
reminderTimes: reminderTimes,
title: 'Time to Drink Water! 💧'.needTranslation,
body: 'Stay hydrated! Drink ${selectedCupCapacityMl}ml of water.'.needTranslation,
title: LocaleKeys.timeToDrinkWater.tr(),
body: LocaleKeys.stayHydratedDrinkWater.tr(namedArgs: {'amount': selectedCupCapacityMl.toString()}),
);
// Save reminder enabled state to cache
@ -1334,8 +1336,8 @@ class WaterMonitorViewModel extends ChangeNotifier {
await notificationService.scheduleNotification(
id: 9999,
// Use a unique ID for test notifications
title: 'Time to Drink Water! 💧'.needTranslation,
body: 'Stay hydrated! Drink ${selectedCupCapacityMl}ml of water.'.needTranslation,
title: LocaleKeys.timeToDrinkWater.tr(),
body: LocaleKeys.stayHydratedDrinkWater.tr(namedArgs: {'amount': selectedCupCapacityMl.toString()}),
scheduledDate: scheduledTime,
payload: 'test_notification',
);

@ -1208,5 +1208,285 @@ abstract class LocaleKeys {
static const carParking = 'carParking';
static const latestNews = 'latestNews';
static const hmgContact = 'hmgContact';
static const durationCannotExceed90 = 'durationCannotExceed90';
static const unexpectedError = 'unexpectedError';
static const gettingAmbulanceTransportOption = 'gettingAmbulanceTransportOption';
static const fetchingAppointment = 'fetchingAppointment';
static const doYouWantToCancelTheRequest = 'doYouWantToCancelTheRequest';
static const cancellingRequest = 'cancellingRequest';
static const fetchingTermsAndConditions = 'fetchingTermsAndConditions';
static const selectLocationPrescriptionDelivery = 'selectLocationPrescriptionDelivery';
static const noRadiologyOrders = 'noRadiologyOrders';
static const ageIsRequired = 'ageIsRequired';
static const invalidAge = 'invalidAge';
static const ageMustBeBetween11And120 = 'ageMustBeBetween11And120';
static const heightIsRequired = 'heightIsRequired';
static const invalidHeight = 'invalidHeight';
static const weightIsRequired = 'weightIsRequired';
static const invalidWeight = 'invalidWeight';
static const timeToDrinkWater = 'timeToDrinkWater';
static const stayHydratedDrinkWater = 'stayHydratedDrinkWater';
static const visitPharmacyOnline = 'visitPharmacyOnline';
static const howAreYouFeelingToday = 'howAreYouFeelingToday';
static const checkYourSymptomsWithScale = 'checkYourSymptomsWithScale';
static const checkYourSymptoms = 'checkYourSymptoms';
static const noUpcomingAppointmentPleaseBook = 'noUpcomingAppointmentPleaseBook';
static const youHaveEROnlineCheckInRequest = 'youHaveEROnlineCheckInRequest';
static const quickLinks = 'quickLinks';
static const viewMedicalFileLandingPage = 'viewMedicalFileLandingPage';
static const immediateLiveCareRequest = 'immediateLiveCareRequest';
static const yourTurnIsAfterPatients = 'yourTurnIsAfterPatients';
static const dontHaveHHCOrders = 'dontHaveHHCOrders';
static const hhcOrders = 'hhcOrders';
static const requestedServices = 'requestedServices';
static const selectServices = 'selectServices';
static const selectedServices = 'selectedServices';
static const createNewRequest = 'createNewRequest';
static const youHaveNoPendingRequests = 'youHaveNoPendingRequests';
static const noInsuranceDataFound = 'noInsuranceDataFound';
static const noInsuranceUpdateRequest = 'noInsuranceUpdateRequest';
static const policyNumberInsurancePage = 'policyNumberInsurancePage';
static const insuranceExpired = 'insuranceExpired';
static const insuranceActive = 'insuranceActive';
static const patientCardID = 'patientCardID';
static const noInsuranceApprovals = 'noInsuranceApprovals';
static const noInsuranceWithHMG = 'noInsuranceWithHMG';
static const referenceRange = 'referenceRange';
static const downloadReport = 'downloadReport';
static const generatingReport = 'generatingReport';
static const noLabResults = 'noLabResults';
static const labResultDetails = 'labResultDetails';
static const resultOf = 'resultOf';
static const whatIsThisResult = 'whatIsThisResult';
static const lastTested = 'lastTested';
static const byVisit = 'byVisit';
static const byTest = 'byTest';
static const results = 'results';
static const viewResults = 'viewResults';
static const rebook = 'rebook';
static const noOphthalmologyAppointments = 'noOphthalmologyAppointments';
static const noVitalSignsRecordedYet = 'noVitalSignsRecordedYet';
static const appointmentsAndVisits = 'appointmentsAndVisits';
static const labAndRadiology = 'labAndRadiology';
static const activeMedicationsAndPrescriptions = 'activeMedicationsAndPrescriptions';
static const allPrescriptions = 'allPrescriptions';
static const allMedications = 'allMedications';
static const youDontHaveAnyPrescriptionsYet = 'youDontHaveAnyPrescriptionsYet';
static const youDontHaveAnyCompletedVisitsYet = 'youDontHaveAnyCompletedVisitsYet';
static const others = 'others';
static const allergyInfo = 'allergyInfo';
static const vaccineInfo = 'vaccineInfo';
static const updateInsuranceInfo = 'updateInsuranceInfo';
static const myInvoicesList = 'myInvoicesList';
static const ancillaryOrdersList = 'ancillaryOrdersList';
static const youDontHaveAnySickLeavesYet = 'youDontHaveAnySickLeavesYet';
static const medicalReports = 'medicalReports';
static const sickLeaveReport = 'sickLeaveReport';
static const weightTracker = 'weightTracker';
static const askYourDoctor = 'askYourDoctor';
static const internetPairing = 'internetPairing';
static const requested = 'requested';
static const youDontHaveAnyMedicalReportsYet = 'youDontHaveAnyMedicalReportsYet';
static const requestMedicalReport = 'requestMedicalReport';
static const youDoNotHaveAnyAppointmentsToRequestMedicalReport = 'youDoNotHaveAnyAppointmentsToRequestMedicalReport';
static const areYouSureYouWantToRequestMedicalReport = 'areYouSureYouWantToRequestMedicalReport';
static const yourMedicalReportRequestSubmittedSuccessfully = 'yourMedicalReportRequestSubmittedSuccessfully';
static const monthlyHealthSummaryReportDisclaimer = 'monthlyHealthSummaryReportDisclaimer';
static const updatingMonthlyReportStatus = 'updatingMonthlyReportStatus';
static const monthlyReportStatusUpdatedSuccessfully = 'monthlyReportStatusUpdatedSuccessfully';
static const whoCanViewMyMedicalFile = 'whoCanViewMyMedicalFile';
static const acceptedYourRequestToBeYourFamilyMember = 'acceptedYourRequestToBeYourFamilyMember';
static const canViewYourFile = 'canViewYourFile';
static const hasARequestPendingToBeYourFamilyMember = 'hasARequestPendingToBeYourFamilyMember';
static const wantsToAddYouAsTheirFamilyMember = 'wantsToAddYouAsTheirFamilyMember';
static const rejectedYourRequestToBeYourFamilyMember = 'rejectedYourRequestToBeYourFamilyMember';
static const rejectedYourFamilyMemberRequest = 'rejectedYourFamilyMemberRequest';
static const notAvailable = 'notAvailable';
static const selectAProfile = 'selectAProfile';
static const switchFamilyFile = 'switchFamilyFile';
static const medicalFiles = 'medicalFiles';
static const addANewFamilyMember = 'addANewFamilyMember';
static const viewInvoiceDetails = 'viewInvoiceDetails';
static const outPatient = 'outPatient';
static const invoiceDetails = 'invoiceDetails';
static const sendingEmailPleaseWait = 'sendingEmailPleaseWait';
static const emailSentSuccessfullyMessage = 'emailSentSuccessfullyMessage';
static const discount = 'discount';
static const paid = 'paid';
static const fetchingInvoiceDetails = 'fetchingInvoiceDetails';
static const scanQRCode = 'scanQRCode';
static const parkingSlotDetails = 'parkingSlotDetails';
static const slotNumber = 'slotNumber';
static const basement = 'basement';
static const parkingDate = 'parkingDate';
static const parkedSince = 'parkedSince';
static const resetDirection = 'resetDirection';
static const noPrescriptionOrdersYet = 'noPrescriptionOrdersYet';
static const fetchingPrescriptionPDFPleaseWait = 'fetchingPrescriptionPDFPleaseWait';
static const ratingValue = 'ratingValue';
static const downloadPrescription = 'downloadPrescription';
static const fetchingPrescriptionDetails = 'fetchingPrescriptionDetails';
static const switchBackFamilyFile = 'switchBackFamilyFile';
static const profileAndSettings = 'profileAndSettings';
static const quickActions = 'quickActions';
static const notificationsSettings = 'notificationsSettings';
static const touchIDFaceIDServices = 'touchIDFaceIDServices';
static const personalInformation = 'personalInformation';
static const updateEmailAddress = 'updateEmailAddress';
static const helpAndSupport = 'helpAndSupport';
static const permissionsProfile = 'permissionsProfile';
static const privacyPolicy = 'privacyPolicy';
static const deactivateAccount = 'deactivateAccount';
static const ageYearsOld = 'ageYearsOld';
static const youDontHaveRadiologyOrders = 'youDontHaveRadiologyOrders';
static const radiologyResult = 'radiologyResult';
static const viewRadiologyImage = 'viewRadiologyImage';
static const rateClinic = 'rateClinic';
static const back = 'back';
static const rateDoctor = 'rateDoctor';
static const howWasYourLastVisitWithDoctor = 'howWasYourLastVisitWithDoctor';
static const dateOfBirthSymptoms = 'dateOfBirthSymptoms';
static const genderSymptoms = 'genderSymptoms';
static const heightSymptoms = 'heightSymptoms';
static const weightSymptoms = 'weightSymptoms';
static const femaleGender = 'femaleGender';
static const previous = 'previous';
static const selectedOrgans = 'selectedOrgans';
static const noOrgansSelected = 'noOrgansSelected';
static const organSelector = 'organSelector';
static const noPredictionsAvailable = 'noPredictionsAvailable';
static const areYouSureYouWantToRestartOrganSelection = 'areYouSureYouWantToRestartOrganSelection';
static const possibleConditions = 'possibleConditions';
static const pleaseSelectAtLeastOneRiskBeforeProceeding = 'pleaseSelectAtLeastOneRiskBeforeProceeding';
static const aboveYouSeeCommonRiskFactors = 'aboveYouSeeCommonRiskFactors';
static const readMore = 'readMore';
static const riskFactors = 'riskFactors';
static const noRiskFactorsFound = 'noRiskFactorsFound';
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';
static const vitalSignDetails = 'vitalSignDetails';
static const resultOfNoDate = 'resultOfNoDate';
static const referenceRangeBetween = 'referenceRangeBetween';
static const referenceRangeMin = 'referenceRangeMin';
static const referenceRangeMax = 'referenceRangeMax';
static const noHistoryAvailable = 'noHistoryAvailable';
static const bmiDescription = 'bmiDescription';
static const heightDescription = 'heightDescription';
static const weightDescription = 'weightDescription';
static const bloodPressureDescription = 'bloodPressureDescription';
static const temperatureDescription = 'temperatureDescription';
static const heartRateDescriptionVital = 'heartRateDescriptionVital';
static const respiratoryRateDescription = 'respiratoryRateDescription';
static const bmiAdvice = 'bmiAdvice';
static const heightAdvice = 'heightAdvice';
static const weightAdvice = 'weightAdvice';
static const bloodPressureAdvice = 'bloodPressureAdvice';
static const temperatureAdvice = 'temperatureAdvice';
static const heartRateAdvice = 'heartRateAdvice';
static const respiratoryRateAdvice = 'respiratoryRateAdvice';
static const whatShouldIDoNext = 'whatShouldIDoNext';
static const customizeDrinkCup = 'customizeDrinkCup';
static const tipsToStayHydrated = 'tipsToStayHydrated';
static const drinkBeforeYouFeelThirsty = 'drinkBeforeYouFeelThirsty';
static const keepRefillableBottleNextToYou = 'keepRefillableBottleNextToYou';
static const trackYourDailyIntakeToStayMotivated = 'trackYourDailyIntakeToStayMotivated';
static const chooseSparklingWaterInsteadOfSoda = 'chooseSparklingWaterInsteadOfSoda';
static const switchCup = 'switchCup';
static const plainWater = 'plainWater';
static const yourGoal = 'yourGoal';
static const remaining = 'remaining';
static const hydrationStatus = 'hydrationStatus';
static const areYouSureYouWantToCancelAllWaterReminders = 'areYouSureYouWantToCancelAllWaterReminders';
static const remindersSet = 'remindersSet';
static const dailyWaterRemindersScheduledAt = 'dailyWaterRemindersScheduledAt';
static const waterConsumption = 'waterConsumption';
static const selectNumberOfReminders = 'selectNumberOfReminders';
static const h2oSettings = 'h2oSettings';
static const settingsSavedSuccessfully = 'settingsSavedSuccessfully';
static const yourName = 'yourName';
static const ageYears = 'ageYears';
static const numberOfRemindersInADay = 'numberOfRemindersInADay';
static const medications = 'medications';
static const someRemarksAboutPrescription = 'someRemarksAboutPrescription';
static const notifyMeBeforeConsumptionTime = 'notifyMeBeforeConsumptionTime';
static const noMedicationsToday = 'noMedicationsToday';
static const reminders = 'reminders';
static const reminderAddedToCalendar = 'reminderAddedToCalendar';
static const errorWhileSettingCalendar = 'errorWhileSettingCalendar';
static const instructions = 'instructions';
static const requests = 'requests';
static const thisWeek = 'thisWeek';
static const lastMonth = 'lastMonth';
static const lastSixMonths = 'lastSixMonths';
static const selectTime = 'selectTime';
static const pleaseWaitYouWillBeCalledForVitalSigns = 'pleaseWaitYouWillBeCalledForVitalSigns';
static const pleaseVisitRoomForVitalSigns = 'pleaseVisitRoomForVitalSigns';
static const pleaseVisitRoomToTheDoctor = 'pleaseVisitRoomToTheDoctor';
}

@ -32,6 +32,7 @@ import 'package:hmg_patient_app_new/features/notifications/notifications_view_mo
import 'package:hmg_patient_app_new/features/payfort/payfort_view_model.dart';
import 'package:hmg_patient_app_new/features/prescriptions/prescriptions_view_model.dart';
import 'package:hmg_patient_app_new/features/profile_settings/profile_settings_view_model.dart';
import 'package:hmg_patient_app_new/features/qr_parking/qr_parking_view_model.dart';
import 'package:hmg_patient_app_new/features/radiology/radiology_view_model.dart';
import 'package:hmg_patient_app_new/features/smartwatch_health_data/health_provider.dart';
import 'package:hmg_patient_app_new/features/symptoms_checker/symptoms_checker_view_model.dart';
@ -191,6 +192,9 @@ void main() async {
ChangeNotifierProvider<ActivePrescriptionsViewModel>(
create: (_) => getIt.get<ActivePrescriptionsViewModel>(),
),
ChangeNotifierProvider<QrParkingViewModel>(
create: (_) => getIt.get<QrParkingViewModel>(),
),
ChangeNotifierProvider<TermsConditionsViewModel>(
create: (_) => getIt.get<TermsConditionsViewModel>(),
)

@ -134,7 +134,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Active Medications".needTranslation,
Text(LocaleKeys.activeMedications.tr(),
style: TextStyle(
color: AppColors.textColor,
fontSize: 27.f,
@ -191,7 +191,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
],
),
),
Text("Medications".needTranslation,
Text(LocaleKeys.medications.tr(),
style: TextStyle(
color: AppColors.primaryRedBorderColor,
fontSize: 12.f,
@ -253,8 +253,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
text: TextSpan(
children: [
TextSpan(
text: "Remarks: "
.needTranslation,
text: LocaleKeys.remarks.tr(),
style: TextStyle(
color:
AppColors.textColor,
@ -265,8 +264,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
),
TextSpan(
text:
"some remarks about the prescription will be here"
.needTranslation,
LocaleKeys.someRemarksAboutPrescription.tr(),
style: TextStyle(
color: AppColors
.lightGreyTextColor,
@ -312,8 +310,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
CrossAxisAlignment.start,
children: [
Text(
"Set Reminder"
.needTranslation,
LocaleKeys.setReminder.tr(),
style: TextStyle(
fontSize: 14.f,
fontWeight:
@ -321,8 +318,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
color: AppColors
.textColor)),
Text(
"Notify me before the consumption time"
.needTranslation,
LocaleKeys.notifyMeBeforeConsumptionTime.tr(),
style: TextStyle(
fontSize: 12.f,
color: AppColors
@ -346,7 +342,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
: Utils.getNoDataWidget(
context,
noDataText:
"No medications today".needTranslation,
LocaleKeys.noMedicationsToday.tr(),
),
),
),
@ -397,17 +393,16 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
children: [
AppCustomChipWidget(
labelText:
"Route: ${med.route}".needTranslation),
LocaleKeys.route.tr(namedArgs: {'route': med.route ?? ''})),
AppCustomChipWidget(
labelText:
"Frequency: ${med.frequency}".needTranslation),
LocaleKeys.frequency.tr(namedArgs: {'frequency': med.frequency ?? ''})),
AppCustomChipWidget(
labelText:
"Daily Dose: ${med.doseDailyQuantity}"
.needTranslation),
LocaleKeys.instruction.tr(namedArgs: {'instruction': med.doseDailyQuantity?.toString() ?? ''})),
AppCustomChipWidget(
labelText:
"Duration: ${med.days}".needTranslation),
LocaleKeys.duration.tr(namedArgs: {'days': med.days.toString() ?? ''})),
],
),
],
@ -419,7 +414,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
child: Row(children: [
Expanded(
child: CustomButton(
text: "Check Availability".needTranslation,
text: LocaleKeys.checkAvailability.tr(),
fontSize: 13.f,
onPressed: () {},
backgroundColor: AppColors.secondaryLightRedColor,
@ -430,7 +425,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
SizedBox(width: 12.h),
Expanded(
child: CustomButton(
text: "Read Instructions".needTranslation,
text: LocaleKeys.readInstructions.tr(),
fontSize: 13.f,
onPressed: () {})),
]),
@ -519,7 +514,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
MainAxisAlignment.spaceBetween,
children: [
Text(
"Reminders".needTranslation,
LocaleKeys.reminders.tr(),
style: TextStyle(
fontSize: 20.f,
fontWeight: FontWeight.w600,
@ -988,11 +983,11 @@ class _ReminderTimerDialogState extends State<ReminderTimerDialog> {
route: widget.med.route ?? "",
);
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text("Reminder added to calendar ✅".needTranslation)),
SnackBar(content: Text(LocaleKeys.reminderAddedToCalendar.tr())),
);
} catch (e) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text("Error while setting calendar: $e".needTranslation)),
SnackBar(content: Text(LocaleKeys.errorWhileSettingCalendar.tr(namedArgs: {'error': e.toString()}))),
);
}
Navigator.pop(context);

@ -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),
),

@ -129,9 +129,13 @@ class LiveChatPage extends StatelessWidget {
).paddingSymmetrical(16.h, 16.h),
).onPress(() {
contactUsVM.setSelectedLiveChatProjectIndex(index);
chatURL =
"https://chat.hmg.com/Index.aspx?Name=${appState.getAuthenticatedUser()!.firstName}&PatientID=${appState.getAuthenticatedUser()!.patientId}&MobileNo=${appState.getAuthenticatedUser()!.mobileNumber}&Language=${appState.isArabic() ? 'ar' : 'en'}&WorkGroup=${contactUsVM.liveChatProjectsList[index].value}";
debugPrint("Chat URL: $chatURL");
_getChatRequestID(
context,
contactUsVM,
name: appState.getAuthenticatedUser()!.firstName ?? '',
mobileNo: appState.getAuthenticatedUser()!.mobileNumber ?? '',
workGroup: contactUsVM.liveChatProjectsList[index].value ?? '',
);
}),
).paddingSymmetrical(24.h, 0.h),
),
@ -154,8 +158,14 @@ class LiveChatPage extends StatelessWidget {
child: CustomButton(
text: LocaleKeys.liveChat.tr(context: context),
onPressed: () async {
Uri uri = Uri.parse(chatURL);
launchUrl(uri, mode: LaunchMode.platformDefault, webOnlyWindowName: "");
if (contactUsVM.chatRequestID != null) {
chatURL = "https://chat.hmg.com/Index.aspx?RequestedId=${contactUsVM.chatRequestID}";
debugPrint("Chat URL: $chatURL");
Uri uri = Uri.parse(chatURL);
launchUrl(uri, mode: LaunchMode.platformDefault, webOnlyWindowName: "");
} else {
debugPrint("Chat Request ID is null");
}
},
backgroundColor: contactUsVM.selectedLiveChatProjectIndex == -1 ? AppColors.greyColor : AppColors.primaryRedColor,
borderColor: contactUsVM.selectedLiveChatProjectIndex == -1 ? AppColors.greyColor : AppColors.primaryRedColor,
@ -172,4 +182,20 @@ class LiveChatPage extends StatelessWidget {
}),
);
}
void _getChatRequestID(BuildContext context, ContactUsViewModel contactUsVM, {required String name, required String mobileNo, required String workGroup}) {
contactUsVM.getChatRequestID(
name: name,
mobileNo: mobileNo,
workGroup: workGroup,
onSuccess: (response) {
debugPrint("Chat Request ID received: ${contactUsVM.chatRequestID}");
chatURL = "https://chat.hmg.com/Index.aspx?RequestedId=${contactUsVM.chatRequestID}";
debugPrint("Chat URL: $chatURL");
},
onError: (error) {
debugPrint("Error getting chat request ID: $error");
},
);
}
}

@ -275,11 +275,11 @@ class _LandingPageState extends State<LandingPage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"How are you feeling today?".needTranslation.toText14(isBold: true),
"Check your symptoms with this scale".needTranslation.toText12(fontWeight: FontWeight.w500),
LocaleKeys.howAreYouFeelingToday.tr(context: context).toText14(isBold: true),
LocaleKeys.checkYourSymptomsWithScale.tr(context: context).toText12(fontWeight: FontWeight.w500),
SizedBox(height: 14.h),
CustomButton(
text: "Check your symptoms".needTranslation,
text: LocaleKeys.checkYourSymptoms.tr(context: context),
onPressed: () async {
context.navigateWithName(AppRoutes.userInfoSelection);
},
@ -416,7 +416,7 @@ class _LandingPageState extends State<LandingPage> {
children: [
Utils.buildSvgWithAssets(icon: AppAssets.home_calendar_icon, width: 32.h, height: 32.h),
SizedBox(height: 12.h),
"You do not have any upcoming appointment. Please book an appointment".needTranslation.toText12(isCenter: true),
LocaleKeys.noUpcomingAppointmentPleaseBook.tr(context: context).toText12(isCenter: true),
SizedBox(height: 12.h),
CustomButton(
text: LocaleKeys.bookAppo.tr(context: context),
@ -476,7 +476,7 @@ class _LandingPageState extends State<LandingPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"You have ER Online Check-In Request".needTranslation.toText12(isBold: true),
LocaleKeys.youHaveEROnlineCheckInRequest.tr(context: context).toText12(isBold: true),
Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
iconColor: AppColors.blackColor,
@ -503,10 +503,10 @@ class _LandingPageState extends State<LandingPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Quick Links".needTranslation.toText16(isBold: true),
LocaleKeys.quickLinks.tr(context: context).toText16(isBold: true),
Row(
children: [
"View medical file".needTranslation.toText12(color: AppColors.primaryRedColor),
LocaleKeys.viewMedicalFile.tr(context: context).toText12(color: AppColors.primaryRedColor),
SizedBox(width: 2.h),
Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 10.h),
],
@ -664,7 +664,7 @@ class _LandingPageState extends State<LandingPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppCustomChipWidget(
labelText: myAppointmentsViewModel.currentQueueStatus == 0 ? "In Queue".needTranslation : "Your Turn".needTranslation,
labelText: myAppointmentsViewModel.currentQueueStatus == 0 ? LocaleKeys.inQueue.tr() : LocaleKeys.yourTurn.tr(),
backgroundColor: Utils.getCardBorderColor(myAppointmentsViewModel.currentQueueStatus).withValues(alpha: 0.20),
textColor: Utils.getCardBorderColor(myAppointmentsViewModel.currentQueueStatus),
),
@ -672,9 +672,9 @@ class _LandingPageState extends State<LandingPage> {
],
),
SizedBox(height: 8.h),
"Hala ${appState.getAuthenticatedUser()!.firstName}!!!".needTranslation.toText16(isBold: true),
LocaleKeys.halaFirstName.tr(namedArgs: {'firstName': appState.getAuthenticatedUser()!.firstName!}).toText16(isBold: true),
SizedBox(height: 2.h),
"Thank you for your patience, here is your queue number.".needTranslation.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
LocaleKeys.thankYouForPatience.tr().toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
SizedBox(height: 8.h),
myAppointmentsViewModel.currentPatientQueueDetails.queueNo!.toText28(isBold: true),
SizedBox(height: 6.h),
@ -683,7 +683,7 @@ class _LandingPageState extends State<LandingPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
"Serving Now: ".needTranslation.toText14(isBold: true),
"${LocaleKeys.servingNow.tr()}: ".toText14(isBold: true),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
@ -691,7 +691,7 @@ class _LandingPageState extends State<LandingPage> {
SizedBox(width: 8.w),
AppCustomChipWidget(
deleteIcon: myAppointmentsViewModel.patientQueueDetailsList.first.callType == 1 ? AppAssets.call_for_vitals : AppAssets.call_for_doctor,
labelText: myAppointmentsViewModel.patientQueueDetailsList.first.callType == 1 ? "Call for vital signs".needTranslation : "Call for Doctor".needTranslation,
labelText: myAppointmentsViewModel.patientQueueDetailsList.first.callType == 1 ? LocaleKeys.callForVitalSigns.tr() : LocaleKeys.callForDoctor.tr(),
iconColor: myAppointmentsViewModel.patientQueueDetailsList.first.callType == 1 ? AppColors.primaryRedColor : AppColors.successColor,
textColor: myAppointmentsViewModel.patientQueueDetailsList.first.callType == 1 ? AppColors.primaryRedColor : AppColors.successColor,
iconSize: 14.w,
@ -746,7 +746,7 @@ class _LandingPageState extends State<LandingPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Immediate LiveCare Request".needTranslation.toText16(isBold: true),
LocaleKeys.immediateLiveCareRequest.tr(context: context).toText16(isBold: true),
SizedBox(height: 10.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -769,14 +769,14 @@ class _LandingPageState extends State<LandingPage> {
],
),
SizedBox(height: 10.h),
"Hala ${appState.getAuthenticatedUser()!.firstName}!!!".needTranslation.toText16(isBold: true),
LocaleKeys.halaFirstName.tr(namedArgs: {'firstName': appState.getAuthenticatedUser()!.firstName!}, context: context).toText16(isBold: true),
SizedBox(height: 8.h),
"Your turn is after ${immediateLiveCareViewModel.patientLiveCareHistoryList[0].patCount} patients.".needTranslation.toText14(isBold: true),
LocaleKeys.yourTurnIsAfterPatients.tr(namedArgs: {'count': immediateLiveCareViewModel.patientLiveCareHistoryList[0].patCount.toString()}, context: context).toText14(isBold: true),
SizedBox(height: 8.h),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Expected waiting time: ".needTranslation.toText12(isBold: true),
"${LocaleKeys.waitingTime.tr()}: ".toText12(isBold: true),
SizedBox(height: 7.h),
ValueListenableBuilder<Duration>(
valueListenable: immediateLiveCareViewModel.durationNotifier,

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
@ -5,6 +6,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/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/habib_wallet/habib_wallet_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/habib_wallet/habib_wallet_page.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@ -115,7 +117,7 @@ class HabibWalletCard extends StatelessWidget {
CustomButton(
icon: AppAssets.recharge_icon,
iconSize: 18.h,
text: "Recharge".needTranslation,
text: LocaleKeys.recharge.tr(context: context),
onPressed: () {},
backgroundColor: AppColors.infoColor,
borderColor: AppColors.infoColor,

@ -98,7 +98,7 @@ class LargeServiceCard extends StatelessWidget {
],
).paddingSymmetrical(16.w, 20.h),
CustomButton(
text: serviceCardData.isBold ? "Visit Pharmacy Online".needTranslation : LocaleKeys.bookNow.tr(context: context),
text: serviceCardData.isBold ? LocaleKeys.visitPharmacyOnline.tr() : LocaleKeys.bookNow.tr(context: context),
onPressed: () {
handleOnTap();
},

@ -1,7 +1,9 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.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/widget_extensions.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
class WelcomeWidget extends StatelessWidget {
@ -31,7 +33,7 @@ class WelcomeWidget extends StatelessWidget {
spacing: 4.h,
mainAxisSize: MainAxisSize.min,
children: [
"Welcome".needTranslation.toText14(color: AppColors.greyTextColor, height: 1, weight: FontWeight.w500),
LocaleKeys.welcome.tr(context: context).toText14(color: AppColors.greyTextColor, height: 1, weight: FontWeight.w500),
Row(
spacing: 4.h,
crossAxisAlignment: CrossAxisAlignment.center,

@ -10,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/features/hmg_services/hmg_services_view_model.dart';
import 'package:hmg_patient_app_new/features/hmg_services/models/resq_models/get_cmc_all_orders_resp_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/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
@ -121,7 +122,7 @@ class _HhcOrderDetailPageState extends State<HhcOrderDetailPage> {
Row(
children: [
if (!isLoading) ...[
"Request ID:".needTranslation.toText14(
LocaleKeys.requestID.tr(context: context).toText14(
color: AppColors.textColorLight,
weight: FontWeight.w500,
),
@ -186,7 +187,7 @@ class _HhcOrderDetailPageState extends State<HhcOrderDetailPage> {
),
child: Utils.getNoDataWidget(
context,
noDataText: "You don't have any Home Health Care orders yet.".needTranslation,
noDataText: LocaleKeys.dontHaveHHCOrders.tr(context: context),
isSmallWidget: true,
width: 62.w,
height: 62.h,
@ -199,7 +200,7 @@ class _HhcOrderDetailPageState extends State<HhcOrderDetailPage> {
@override
Widget build(BuildContext context) {
return CollapsingListView(
title: "HHC Orders".needTranslation,
title: LocaleKeys.hhcOrders.tr(context: context),
isLeading: true,
child: SingleChildScrollView(
child: Column(

@ -11,6 +11,7 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/hmg_services/hmg_services_view_model.dart';
import 'package:hmg_patient_app_new/features/hmg_services/models/resq_models/get_cmc_all_orders_resp_model.dart';
import 'package:hmg_patient_app_new/features/hmg_services/models/resq_models/get_cmc_services_resp_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/home_health_care/hhc_order_detail_page.dart';
import 'package:hmg_patient_app_new/presentation/home_health_care/hhc_selection_review_page.dart';
import 'package:hmg_patient_app_new/presentation/home_health_care/widgets/hhc_ui_selection_helper.dart';
@ -93,7 +94,7 @@ class _HhcProceduresPageState extends State<HhcProceduresPage> {
children: [
Row(
children: [
"Request ID:".needTranslation.toText14(color: AppColors.textColorLight, weight: FontWeight.w500),
LocaleKeys.requestID.tr(context: context).toText14(color: AppColors.textColorLight, weight: FontWeight.w500),
SizedBox(width: 4.w),
"${order.iD ?? '-'}".toText16(isBold: true),
],
@ -132,7 +133,7 @@ class _HhcProceduresPageState extends State<HhcProceduresPage> {
color: AppColors.primaryRedColor,
),
SizedBox(width: 6.w),
"Requested Services".needTranslation.toText14(
LocaleKeys.requestedServices.tr().toText14(
weight: FontWeight.w600,
color: AppColors.blackColor,
),
@ -209,7 +210,7 @@ class _HhcProceduresPageState extends State<HhcProceduresPage> {
),
SizedBox(width: 8.w),
Expanded(
child: "You have a pending order. Please wait for it to be processed.".needTranslation.toText12(
child: LocaleKeys.pendingOrderWait.tr(context: context).toText12(
color: AppColors.infoBannerTextColor,
fontWeight: FontWeight.w500,
),
@ -223,7 +224,7 @@ class _HhcProceduresPageState extends State<HhcProceduresPage> {
children: [
Expanded(
child: CustomButton(
text: "Cancel Order".needTranslation,
text: LocaleKeys.cancelOrder.tr(context: context),
onPressed: () => HhcUiSelectionHelper.showCancelConfirmationDialog(context: context, order: order),
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
@ -248,7 +249,7 @@ class _HhcProceduresPageState extends State<HhcProceduresPage> {
hasBottomPadding: false,
padding: EdgeInsets.only(top: 24.h),
context,
title: 'Select Services'.needTranslation,
title: LocaleKeys.selectServices.tr(context: context),
isCloseButtonVisible: true,
isDismissible: true,
callBackFunc: () {},
@ -257,9 +258,9 @@ class _HhcProceduresPageState extends State<HhcProceduresPage> {
child: Padding(
padding: EdgeInsets.all(24.h),
child: Text(
'No services available'.needTranslation,
LocaleKeys.noServicesAvailable.tr(context: context),
style: TextStyle(
fontSize: 16.h,
fontSize: 16.f,
color: AppColors.greyTextColor,
),
),
@ -300,7 +301,7 @@ class _HhcProceduresPageState extends State<HhcProceduresPage> {
duration: const Duration(milliseconds: 300),
curve: Curves.easeInOut,
width: 24.w,
height: 24.w,
height: 24.h,
decoration: BoxDecoration(
color: isSelected ? AppColors.primaryRedColor : Colors.transparent,
borderRadius: BorderRadius.circular(5.r),
@ -353,7 +354,7 @@ class _HhcProceduresPageState extends State<HhcProceduresPage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Selected Services".needTranslation.toText12(
LocaleKeys.selectedServices.tr(context: context).toText12(
color: AppColors.textColorLight,
fontWeight: FontWeight.w600,
),
@ -368,7 +369,7 @@ class _HhcProceduresPageState extends State<HhcProceduresPage> {
SizedBox(height: 16.h),
CustomButton(
borderWidth: 0,
text: "Next".needTranslation,
text: LocaleKeys.next.tr(context: context),
onPressed: () {
Navigator.pop(context);
_proceedWithSelectedService();
@ -398,9 +399,9 @@ class _HhcProceduresPageState extends State<HhcProceduresPage> {
bool result = await navigationServices.push(
CustomPageRoute(
page: MapUtilityScreen(
confirmButtonString: "Submit Request ".needTranslation,
titleString: "Select Location",
subTitleString: "Please select the location".needTranslation,
confirmButtonString: LocaleKeys.submitRequest.tr(context: context),
titleString: LocaleKeys.selectLocation.tr(context: context),
subTitleString: LocaleKeys.pleaseSelectTheLocation.tr(context: context),
isGmsAvailable: appState.isGMSAvailable,
),
direction: AxisDirection.down),
@ -447,7 +448,7 @@ class _HhcProceduresPageState extends State<HhcProceduresPage> {
return Scaffold(
backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView(
title: "Home Health Care".needTranslation,
title: LocaleKeys.homeHealthCare.tr(context: context),
history: () => Navigator.of(context).push(CustomPageRoute(page: HhcOrderDetailPage(), direction: AxisDirection.up)),
bottomChild: Consumer(
builder: (BuildContext context, HmgServicesViewModel hmgServicesViewModel, Widget? child) {
@ -466,7 +467,7 @@ class _HhcProceduresPageState extends State<HhcProceduresPage> {
padding: EdgeInsets.all(24.w),
child: CustomButton(
borderWidth: 0,
text: "Create new request".needTranslation,
text: LocaleKeys.createNewRequest.tr(context: context),
onPressed: () => _buildServicesListBottomsSheet(hmgServicesViewModel.hhcServicesList),
textColor: AppColors.whiteColor,
borderRadius: 12.r,
@ -494,7 +495,7 @@ class _HhcProceduresPageState extends State<HhcProceduresPage> {
Center(
child: Utils.getNoDataWidget(
context,
noDataText: "You have no pending requests.".needTranslation,
noDataText: LocaleKeys.youHaveNoPendingRequests.tr(context: context),
),
),
],

@ -50,7 +50,7 @@ class _HhcSelectionReviewPageState extends State<HhcSelectionReviewPage> {
final isArabic = appState.isArabic();
return CollapsingListView(
title: "Summary".needTranslation,
title: LocaleKeys.summary.tr(context: context),
bottomChild: _buildBottomButton(),
child: SingleChildScrollView(
padding: EdgeInsets.all(16.w),
@ -75,7 +75,7 @@ class _HhcSelectionReviewPageState extends State<HhcSelectionReviewPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Selected Services".needTranslation.toText14(
LocaleKeys.selectedServices.tr(context: context).toText14(
weight: FontWeight.w600,
color: AppColors.textColor,
letterSpacing: -0.4,
@ -86,7 +86,7 @@ class _HhcSelectionReviewPageState extends State<HhcSelectionReviewPage> {
runSpacing: 12.w,
children: widget.selectedServices.map((service) {
final serviceName = isArabic ? (service.textN ?? service.text ?? '') : (service.text ?? '');
return AppCustomChipWidget(labelText: serviceName.needTranslation);
return AppCustomChipWidget(labelText: serviceName);
}).toList(),
),
],
@ -110,7 +110,7 @@ class _HhcSelectionReviewPageState extends State<HhcSelectionReviewPage> {
if (lat == 0.0 || lng == 0.0) return SizedBox.shrink();
// Get address from geocode response
String address = "Selected Location".needTranslation;
String address = LocaleKeys.selectLocation.tr(context: context);
if (geocodeResponse != null && geocodeResponse.results.isNotEmpty) {
address = geocodeResponse.results.first.formattedAddress;
}
@ -133,7 +133,7 @@ class _HhcSelectionReviewPageState extends State<HhcSelectionReviewPage> {
),
child: CustomButton(
borderWidth: 0,
text: "Confirm".needTranslation,
text: LocaleKeys.confirm.tr(context: context),
onPressed: () => _handleConfirm(),
textColor: AppColors.whiteColor,
borderRadius: 12.r,
@ -155,10 +155,10 @@ class _HhcSelectionReviewPageState extends State<HhcSelectionReviewPage> {
padding: EdgeInsets.all(16.w),
child: Column(
children: [
Utils.getSuccessWidget(loadingText: "Your request has been successfully submitted.".needTranslation),
Utils.getSuccessWidget(loadingText: LocaleKeys.requestSubmittedSuccessfully.tr(context: context)),
Row(
children: [
"Here is your request #: ".needTranslation.toText14(
LocaleKeys.hereIsYourRequestNumber.tr(context: context).toText14(
color: AppColors.textColorLight,
weight: FontWeight.w500,
),
@ -200,7 +200,7 @@ class _HhcSelectionReviewPageState extends State<HhcSelectionReviewPage> {
title: LocaleKeys.notice.tr(context: context),
context,
child: Utils.getWarningWidget(
loadingText: "Are you sure you want to submit this request?".needTranslation,
loadingText: LocaleKeys.confirmSubmitRequest.tr(context: context),
isShowActionButtons: true,
onCancelTap: () {
Navigator.pop(context);

@ -25,7 +25,7 @@ class HhcUiSelectionHelper {
title: LocaleKeys.notice.tr(context: context),
context,
child: Utils.getWarningWidget(
loadingText: "Are you sure you want to cancel this order?".needTranslation,
loadingText: LocaleKeys.cancelOrderConfirmation.tr(context: context),
isShowActionButtons: true,
onCancelTap: () {
Navigator.pop(context);
@ -51,7 +51,7 @@ class HhcUiSelectionHelper {
padding: EdgeInsets.all(16.w),
child: Column(
children: [
Utils.getSuccessWidget(loadingText: "Order has been cancelled successfully".needTranslation),
Utils.getSuccessWidget(loadingText: LocaleKeys.orderCancelledSuccessfully.tr(context: context)),
SizedBox(height: 24.h),
Row(
children: [

@ -56,7 +56,7 @@ class InsuranceApprovalDetailsPage extends StatelessWidget {
AppCustomChipWidget(
icon: (!insuranceApprovalResponseModel.isLiveCareAppointment! ? AppAssets.walkin_appointment_icon : AppAssets.small_livecare_icon),
iconColor: !insuranceApprovalResponseModel.isLiveCareAppointment! ? AppColors.textColor : AppColors.whiteColor,
labelText: insuranceApprovalResponseModel.isLiveCareAppointment! ? LocaleKeys.livecare.tr(context: context) : "Walk In".needTranslation,
labelText: insuranceApprovalResponseModel.isLiveCareAppointment! ? LocaleKeys.livecare.tr(context: context) : LocaleKeys.walkin.tr(context: context),
backgroundColor: (!insuranceApprovalResponseModel.isLiveCareAppointment! ? AppColors.greyColor : AppColors.successColor),
textColor: (!insuranceApprovalResponseModel.isLiveCareAppointment! ? AppColors.textColor : AppColors.whiteColor),
),
@ -137,7 +137,7 @@ class InsuranceApprovalDetailsPage extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Status:".needTranslation.toText14(isBold: true),
"${LocaleKeys.status.tr(context: context)}: ".toText14(isBold: true),
insuranceApprovalResponseModel.apporvalDetails!.status!.toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor),
],
),

@ -95,7 +95,7 @@ class _InsuranceApprovalsPageState extends State<InsuranceApprovalsPage> {
),
),
)
: Utils.getNoDataWidget(context, noDataText: "You don't have any insurance approvals yet.".needTranslation);
: Utils.getNoDataWidget(context, noDataText: LocaleKeys.noInsuranceApprovals.tr(context: context));
},
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
),

@ -78,7 +78,7 @@ class _InsuranceHomePageState extends State<InsuranceHomePage> {
padding: EdgeInsets.only(top: MediaQuery.of(context).size.height * 0.12),
child: Utils.getNoDataWidget(
context,
noDataText: "You don't have insurance registered with HMG.".needTranslation,
noDataText: LocaleKeys.noInsuranceWithHMG.tr(context: context),
callToActionButton: CustomButton(
icon: AppAssets.update_insurance_card_icon,
iconColor: AppColors.successColor,

@ -54,7 +54,7 @@ class InsuranceApprovalCard extends StatelessWidget {
? "Walk In"
: insuranceApprovalResponseModel.isLiveCareAppointment!
? LocaleKeys.livecare.tr(context: context)
: "Walk In".needTranslation,
: LocaleKeys.walkin.tr(context: context),
backgroundColor: isLoading ? AppColors.greyColor : (!insuranceApprovalResponseModel.isLiveCareAppointment! ? AppColors.greyColor : AppColors.successColor),
textColor: isLoading ? AppColors.textColor : (!insuranceApprovalResponseModel.isLiveCareAppointment! ? AppColors.textColor : AppColors.whiteColor),
).toShimmer2(isShow: isLoading),

@ -111,7 +111,7 @@ class InsuranceHistory extends StatelessWidget {
)
: Utils.getNoDataWidget(
context,
noDataText: "No insurance update requests found.".needTranslation,
noDataText: LocaleKeys.noInsuranceUpdateRequest.tr(context: context),
// isSmallWidget: true,
// width: 62,
// height: 62,

@ -90,7 +90,7 @@ class PatientInsuranceCardUpdateCard extends StatelessWidget {
],
).paddingSymmetrical(16.h, 16.h),
).paddingSymmetrical(24.h, 0.h)
: Utils.getNoDataWidget(context, noDataText: "No insurance data found...".needTranslation),
: Utils.getNoDataWidget(context, noDataText: LocaleKeys.noInsuranceDataFound.tr(context: context)),
SizedBox(
height: 24.h,
),

@ -50,12 +50,12 @@ class PatientInsuranceCard extends StatelessWidget {
children: [
SizedBox(
width: MediaQuery.of(context).size.width * 0.45, child: "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}".toText18(isBold: true)),
"Policy: ${insuranceCardDetailsModel.insurancePolicyNo}".needTranslation.toText12(isBold: true, color: AppColors.lightGrayColor),
LocaleKeys.policyNumber.tr(namedArgs: {'number': insuranceCardDetailsModel.insurancePolicyNo ?? ''}, context: context).toText12(isBold: true, color: AppColors.lightGrayColor),
],
),
AppCustomChipWidget(
icon: isInsuranceExpired ? AppAssets.cancel_circle_icon : AppAssets.insurance_active_icon,
labelText: isInsuranceExpired ? "Insurance Expired".needTranslation : "Insurance Active".needTranslation,
labelText: isInsuranceExpired ? LocaleKeys.insuranceExpired.tr(context: context) : LocaleKeys.insuranceActive.tr(context: context),
iconColor: isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor,
textColor: isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor,
iconSize: 12,
@ -78,7 +78,7 @@ class PatientInsuranceCard extends StatelessWidget {
labelText: "${LocaleKeys.expiryDate.tr(context: context)} ${DateUtil.formatDateToDate(DateUtil.convertStringToDate(insuranceCardDetailsModel.cardValidTo), false)}",
labelPadding: EdgeInsetsDirectional.only(start: -4.h, end: 8.h),
),
AppCustomChipWidget(labelText: "Patient Card ID: ${insuranceCardDetailsModel.patientCardID}".needTranslation),
AppCustomChipWidget(labelText: LocaleKeys.patientCardID.tr(namedArgs: {'id': insuranceCardDetailsModel.patientCardID ?? ''}, context: context)),
],
),
SizedBox(height: 10.h),

@ -44,7 +44,7 @@ class LabOrderByTest extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppCustomChipWidget(
richText: '${"Last Tested:".needTranslation} ${DateUtil.formatDateToDate(DateUtil.convertStringToDate(tests!.createdOn), false)}'.toText12(fontWeight: FontWeight.w500),
richText: '${"${LocaleKeys.lastTested.tr(context: context)}:"} ${DateUtil.formatDateToDate(DateUtil.convertStringToDate(tests!.createdOn), false)}'.toText12(fontWeight: FontWeight.w500),
backgroundColor: AppColors.greyLightColor,
textColor: AppColors.textColor,
),

File diff suppressed because one or more lines are too long

@ -89,9 +89,9 @@ class LabResultByClinic extends StatelessWidget {
hasShadow: true,
),
child: CustomButton(
text: "Download report".needTranslation,
text: LocaleKeys.downloadReport.tr(context: context),
onPressed: () async {
LoaderBottomSheet.showLoader(loadingText: "Generating report, Please wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.generatingReport.tr(context: context));
await labViewModel
.getLabResultReportPDF(
labOrder: labOrder,
@ -114,7 +114,7 @@ class LabResultByClinic extends StatelessWidget {
} catch (ex) {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Cannot open file".needTranslation),
child: Utils.getErrorWidget(loadingText: "Cannot open file"),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,

@ -1,8 +1,10 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.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/features/lab/lab_view_model.dart';
import 'package:hmg_patient_app_new/features/lab/models/resp_models/lab_result.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/lab/lab_result_via_clinic/lab_order_result_item.dart';
import 'package:provider/provider.dart' show Selector, Provider, ReadContext;
@ -17,8 +19,7 @@ class LabResultList extends StatelessWidget {
builder: (__, list, ___) {
if (list.isEmpty && context.read<LabViewModel>().labSpecialResult.isEmpty) {
return Utils.getNoDataWidget(context,
noDataText: "You don't have any lab results yet."
.needTranslation);
noDataText: LocaleKeys.noLabResults.tr(context: context));
} else {
return ListView.builder(
physics: NeverScrollableScrollPhysics(),

@ -71,7 +71,7 @@ class LabOrderResultItem extends StatelessWidget {
child: Visibility(
visible: tests?.referanceRange != null,
child: Text(
"(Reference range: ${tests?.referanceRange})".needTranslation,
"(${LocaleKeys.referenceRange.tr(context: context)}: ${tests?.referanceRange})",
style: TextStyle(
fontSize: 12.f,
fontWeight: FontWeight.w500,

@ -32,7 +32,7 @@ class LabResultDetails extends StatelessWidget {
@override
Widget build(BuildContext context) {
return CollapsingListView(
title: 'Lab Result Details'.needTranslation,
title: LocaleKeys.labResultDetails.tr(context: context),
child: SingleChildScrollView(
child: Column(
spacing: 16.h,
@ -89,7 +89,7 @@ class LabResultDetails extends StatelessWidget {
],
),
SizedBox(height: 4.h),
("Result of ${recentLabResult.verifiedOn ?? ""}".needTranslation).toText11(weight: FontWeight.w500, color: AppColors.greyTextColor),
("${LocaleKeys.resultOf.tr(context: context)} ${recentLabResult.verifiedOn ?? ""}").toText11(weight: FontWeight.w500, color: AppColors.greyTextColor),
],
),
Row(
@ -116,7 +116,7 @@ class LabResultDetails extends StatelessWidget {
Visibility(
visible: recentLabResult.referanceRange != null,
child: Text(
"Reference range: \n${recentLabResult.referanceRange!.trim()}".needTranslation,
"${LocaleKeys.referenceRange.tr(context: context)}: \n${recentLabResult.referanceRange!.trim()}",
style: TextStyle(
fontSize: 12.f,
fontWeight: FontWeight.w500,
@ -261,13 +261,15 @@ class LabResultDetails extends StatelessWidget {
leftLabelFormatter: (value) {
value = double.parse(value.toStringAsFixed(1));
// return leftLabels(value.toStringAsFixed(2));
if(value == labmodel.highRefrenceValue)
return leftLabels("High".needTranslation);
if (value == labmodel.highRefrenceValue) {
return leftLabels(LocaleKeys.high.tr());
}
if(value== labmodel.lowRefenceValue)
return leftLabels("Low".needTranslation);
if (value == labmodel.lowRefenceValue) {
return leftLabels(LocaleKeys.low.tr());
}
return SizedBox.shrink();
return SizedBox.shrink();
// }
},
graphColor:AppColors.blackColor,
@ -366,8 +368,7 @@ class LabResultDetails extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 8.h,
children: [
"What is this result?"
.needTranslation
LocaleKeys.whatIsThisResult.tr(context: context)
.toText16(weight: FontWeight.w600, color: AppColors.textColor),
testDescription?.toText12(
fontWeight: FontWeight.w500, color: AppColors.textColorLight) ??

@ -96,7 +96,7 @@ class EyeMeasurementDetailsPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.leftEye.tr().needTranslation.toText14(isBold: true),
LocaleKeys.leftEye.tr().toText14(isBold: true),
SizedBox(height: 16.h),
getRow(LocaleKeys.sphere.tr(), '${patientAppointmentHistoryResponseModel.listHISGetGlassPrescription![0].leftEyeSpherical}', '-'),
getRow(LocaleKeys.cylinder.tr(), '${patientAppointmentHistoryResponseModel.listHISGetGlassPrescription![0].leftEyeCylinder}', '-'),
@ -139,7 +139,7 @@ class EyeMeasurementDetailsPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.leftEye.tr().needTranslation.toText14(isBold: true),
LocaleKeys.leftEye.tr().toText14(isBold: true),
SizedBox(height: 16.h),
getRow(LocaleKeys.brand.tr(), '${patientAppointmentHistoryResponseModel.listHISGetContactLensPrescription![1].brand}', ''),
getRow('B.C', '${patientAppointmentHistoryResponseModel.listHISGetContactLensPrescription![1].baseCurve}', ''),

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
@ -7,6 +8,7 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
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/my_appointments_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_card.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
@ -75,7 +77,7 @@ class EyeMeasurementsAppointmentsPage extends StatelessWidget {
),
),
)
: Utils.getNoDataWidget(context, noDataText: "No Ophthalmology appointments found...".needTranslation);
: Utils.getNoDataWidget(context, noDataText: LocaleKeys.noOphthalmologyAppointments.tr(context: context));
},
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
),

@ -195,8 +195,8 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
).withHorizontalPadding(24.w).onPress(() {
DialogService dialogService = getIt.get<DialogService>();
dialogService.showFamilyBottomSheetWithoutH(
label: "Family Files".needTranslation,
message: "This clinic or doctor is only available for the below eligible profiles.".needTranslation,
label: LocaleKeys.familyTitle.tr(context: context),
message: "",
onSwitchPress: (FamilyFileResponseModelLists profile) {
medicalFileViewModel.switchFamilyFiles(responseID: profile.responseId, patientID: profile.patientId, phoneNumber: profile.mobileNumber);
},
@ -289,7 +289,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
Consumer<InsuranceViewModel>(builder: (context, insuranceVM, child) {
return AppCustomChipWidget(
icon: insuranceVM.isInsuranceExpired ? AppAssets.cancel_circle_icon : AppAssets.insurance_active_icon,
labelText: insuranceVM.isInsuranceExpired ? "Insurance Expired".needTranslation : "Insurance Active".needTranslation,
labelText: insuranceVM.isInsuranceExpired ? LocaleKeys.insuranceExpired.tr(context: context) : LocaleKeys.insuranceActive.tr(context: context),
iconColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor,
textColor: insuranceVM.isInsuranceExpired ? AppColors.primaryRedColor : AppColors.successColor,
iconSize: 12.w,
@ -316,7 +316,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Vital Signs".needTranslation.toText16(weight: FontWeight.w500, letterSpacing: -0.2),
LocaleKeys.vitalSigns.tr(context: context).toText16(weight: FontWeight.w500, letterSpacing: -0.2),
Row(
children: [
LocaleKeys.viewAll.tr().toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
@ -359,7 +359,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
children: [
Utils.buildSvgWithAssets(icon: AppAssets.call_for_vitals, width: 32.h, height: 32.h),
SizedBox(height: 12.h),
"No vital signs recorded yet".needTranslation.toText12(isCenter: true),
LocaleKeys.noVitalSignsRecordedYet.tr().toText12(isCenter: true),
],
),
),
@ -417,20 +417,20 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
}),
SizedBox(height: 16.h),
TextInputWidget(
labelText: LocaleKeys.search.tr(context: context),
hintText: "Type any record".needTranslation,
controller: TextEditingController(),
keyboardType: TextInputType.number,
isEnable: true,
prefix: null,
autoFocus: false,
isBorderAllowed: false,
isAllowLeadingIcon: true,
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 8.h),
leadingIcon: AppAssets.search_icon,
hintColor: AppColors.textColor,
).paddingSymmetrical(24.w, 0.0),
// TextInputWidget(
// labelText: LocaleKeys.search.tr(context: context),
// hintText: "Type any record".needTranslation,
// controller: TextEditingController(),
// keyboardType: TextInputType.number,
// isEnable: true,
// prefix: null,
// autoFocus: false,
// isBorderAllowed: false,
// isAllowLeadingIcon: true,
// padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 8.h),
// leadingIcon: AppAssets.search_icon,
// hintColor: AppColors.textColor,
// ).paddingSymmetrical(24.w, 0.0),
SizedBox(height: 16.h),
// Using CustomExpandableList
CustomExpandableList(
@ -547,7 +547,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
onSuccess: (dynamic respData) async {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
title: "Pick a Date".needTranslation,
title: LocaleKeys.pickADate.tr(context: context),
context,
child: AppointmentCalendar(),
isFullScreen: false,
@ -577,7 +577,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Appointments & visits".needTranslation.toText16(weight: FontWeight.w500, letterSpacing: -0.2),
LocaleKeys.appointmentsAndVisits.tr().toText16(weight: FontWeight.w500, letterSpacing: -0.2),
Row(
children: [
LocaleKeys.viewAll.tr().toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
@ -615,7 +615,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
children: [
Utils.buildSvgWithAssets(icon: AppAssets.home_calendar_icon, width: 32.h, height: 32.h),
SizedBox(height: 12.h),
"You do not have any appointments. Please book an appointment".needTranslation.toText12(isCenter: true),
LocaleKeys.noUpcomingAppointmentPleaseBook.tr(context: context).toText12(isCenter: true),
SizedBox(height: 12.h),
CustomButton(
text: LocaleKeys.bookAppo.tr(context: context),
@ -662,7 +662,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
openDoctorScheduleCalendar(myAppointmentsVM.patientAppointmentsHistoryList[index]);
},
onAskDoctorTap: () async {
LoaderBottomSheet.showLoader(loadingText: "Checking doctor availability...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingDoctorAvailability.tr(context: context));
await myAppointmentsViewModel.isDoctorAvailable(
projectID: myAppointmentsVM.patientAppointmentsHistoryList[index].projectID,
doctorId: myAppointmentsVM.patientAppointmentsHistoryList[index].doctorID,
@ -687,7 +687,6 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
});
} else {
LoaderBottomSheet.hideLoader();
print("Doctor is not available");
}
},
onError: (_) {
@ -705,7 +704,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
).paddingSymmetrical(0.w, 0.h);
}),
SizedBox(height: 10.h),
"Lab & Radiology".needTranslation.toText16(weight: FontWeight.w500, letterSpacing: -0.2),
LocaleKeys.labAndRadiology.tr().toText16(weight: FontWeight.w500, letterSpacing: -0.2),
SizedBox(height: 16.h),
Row(
children: [
@ -728,7 +727,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
Expanded(
child: LabRadCard(
icon: AppAssets.radiology_icon,
labelText: "${LocaleKeys.radiology.tr(context: context)} Results".needTranslation,
labelText: "${LocaleKeys.radiology.tr(context: context)} ${LocaleKeys.results.tr(context: context)}",
// labOrderTests: ["Complete blood count", "Creatinine", "Blood Sugar",
// labOrderTests: ["Chest X-ray", "Abdominal Ultrasound", "Dental X-ray"],
labOrderTests: [],
@ -744,7 +743,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
],
).paddingSymmetrical(0.w, 0.h),
SizedBox(height: 24.h),
"Active Medications & Prescriptions".needTranslation.toText16(weight: FontWeight.w500, letterSpacing: -0.2),
LocaleKeys.activeMedicationsAndPrescriptions.tr().toText16(weight: FontWeight.w500, letterSpacing: -0.2),
SizedBox(height: 16.h),
Consumer<PrescriptionsViewModel>(builder: (context, prescriptionVM, child) {
return prescriptionVM.isPrescriptionsOrdersLoading
@ -836,7 +835,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
children: [
Expanded(
child: CustomButton(
text: "All Prescriptions".needTranslation,
text: LocaleKeys.allPrescriptions.tr(context: context),
onPressed: () {
Navigator.of(context).push(
CustomPageRoute(
@ -859,7 +858,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
SizedBox(width: 6.w),
Expanded(
child: CustomButton(
text: "All Medications".needTranslation,
text: LocaleKeys.allMedications.tr(context: context),
onPressed: () {},
backgroundColor: AppColors.secondaryLightRedColor,
borderColor: AppColors.secondaryLightRedColor,
@ -887,7 +886,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
),
child: Utils.getNoDataWidget(
context,
noDataText: "You don't have any prescriptions yet.".needTranslation,
noDataText: LocaleKeys.youDontHaveAnyPrescriptionsYet.tr(context: context),
isSmallWidget: true,
width: 62.w,
height: 62.h,
@ -945,7 +944,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
),
child: Utils.getNoDataWidget(
context,
noDataText: "You don't have any completed visits yet".needTranslation,
noDataText: LocaleKeys.youDontHaveAnyCompletedVisitsYet.tr(context: context),
isSmallWidget: true,
width: 62.w,
height: 62.h,
@ -1017,7 +1016,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
).paddingSymmetrical(0.w, 0);
}),
SizedBox(height: 24.h),
"Others".needTranslation.toText16(weight: FontWeight.w500, letterSpacing: -0.2),
LocaleKeys.others.tr(context: context).toText16(weight: FontWeight.w500, letterSpacing: -0.2),
SizedBox(height: 16.h),
GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
@ -1031,7 +1030,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
shrinkWrap: true,
children: [
MedicalFileCard(
label: "Eye Test Results".needTranslation,
label: LocaleKeys.eyeMeasurements.tr(context: context),
textColor: AppColors.blackColor,
backgroundColor: AppColors.whiteColor,
svgIcon: AppAssets.eye_result_icon,
@ -1048,7 +1047,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
);
}),
MedicalFileCard(
label: "Allergy Info".needTranslation,
label: LocaleKeys.allergyInfo.tr(context: context),
textColor: AppColors.blackColor,
backgroundColor: AppColors.whiteColor,
svgIcon: AppAssets.allergy_info_icon,
@ -1063,7 +1062,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
);
}),
MedicalFileCard(
label: "Vaccine Info".needTranslation,
label: LocaleKeys.vaccineInfo.tr(context: context),
textColor: AppColors.blackColor,
backgroundColor: AppColors.whiteColor,
svgIcon: AppAssets.vaccine_info_icon,
@ -1108,7 +1107,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
),
child: Utils.getNoDataWidget(
context,
noDataText: "You don't have insurance registered with HMG.".needTranslation,
noDataText: LocaleKeys.noInsuranceWithHMG.tr(context: context),
isSmallWidget: true,
width: 62.w,
height: 62.h,
@ -1153,7 +1152,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
shrinkWrap: true,
children: [
MedicalFileCard(
label: "Update Insurance".needTranslation,
label: LocaleKeys.updateInsuranceInfo.tr(context: context),
textColor: AppColors.blackColor,
backgroundColor: AppColors.whiteColor,
svgIcon: AppAssets.update_insurance_icon,
@ -1177,7 +1176,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
);
}),
MedicalFileCard(
label: "My Invoices List".needTranslation,
label: LocaleKeys.myInvoicesList.tr(context: context),
textColor: AppColors.blackColor,
backgroundColor: AppColors.whiteColor,
svgIcon: AppAssets.invoices_list_icon,
@ -1191,7 +1190,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
);
}),
MedicalFileCard(
label: "Ancillary Orders List".needTranslation,
label: LocaleKeys.ancillaryOrdersList.tr(context: context),
textColor: AppColors.blackColor,
backgroundColor: AppColors.whiteColor,
svgIcon: AppAssets.ancillary_orders_list_icon,
@ -1232,7 +1231,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
),
child: Utils.getNoDataWidget(
context,
noDataText: "You don't have any sick leaves yet.".needTranslation,
noDataText: LocaleKeys.youDontHaveAnySickLeavesYet.tr(context: context),
isSmallWidget: true,
width: 62.w,
height: 62.h,
@ -1267,7 +1266,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
);
}),
MedicalFileCard(
label: "Medical Reports".needTranslation,
label: LocaleKeys.medicalReports.tr(context: context),
textColor: AppColors.blackColor,
backgroundColor: AppColors.whiteColor,
svgIcon: AppAssets.medical_reports_icon,
@ -1283,7 +1282,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
);
}),
MedicalFileCard(
label: "Sick Leave Report".needTranslation,
label: LocaleKeys.sickLeaveReport.tr(context: context),
textColor: AppColors.blackColor,
backgroundColor: AppColors.whiteColor,
svgIcon: AppAssets.sick_leave_report_icon,
@ -1308,7 +1307,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
children: [
Row(
children: [
"Health Trackers".needTranslation.toText16(weight: FontWeight.w500, color: AppColors.textColor),
LocaleKeys.healthTrackers.tr(context: context).toText16(weight: FontWeight.w500, color: AppColors.textColor),
],
),
SizedBox(height: 16.h),
@ -1324,7 +1323,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
shrinkWrap: true,
children: [
MedicalFileCard(
label: "Blood Sugar".needTranslation,
label: LocaleKeys.bloodSugar.tr(context: context),
textColor: AppColors.blackColor,
backgroundColor: AppColors.whiteColor,
svgIcon: AppAssets.blood_sugar_icon,
@ -1332,7 +1331,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
iconSize: 36.w,
).onPress(() => context.navigateWithName(AppRoutes.healthTrackerDetailPage, arguments: HealthTrackerTypeEnum.bloodSugar)),
MedicalFileCard(
label: "Blood Pressure".needTranslation,
label: LocaleKeys.bloodPressure.tr(context: context),
textColor: AppColors.blackColor,
backgroundColor: AppColors.whiteColor,
svgIcon: AppAssets.lab_result_icon,
@ -1340,7 +1339,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
iconSize: 36.w,
).onPress(() => context.navigateWithName(AppRoutes.healthTrackerDetailPage, arguments: HealthTrackerTypeEnum.bloodPressure)),
MedicalFileCard(
label: "Weight Tracker".needTranslation,
label: LocaleKeys.weightTracker.tr(context: context),
textColor: AppColors.blackColor,
backgroundColor: AppColors.whiteColor,
svgIcon: AppAssets.weight_tracker_icon,
@ -1352,7 +1351,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
SizedBox(height: 16.h),
Row(
children: [
"Others".needTranslation.toText16(weight: FontWeight.w500, color: AppColors.textColor),
LocaleKeys.others.tr().toText16(weight: FontWeight.w500, color: AppColors.textColor),
],
),
SizedBox(height: 16.h),
@ -1368,21 +1367,21 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
shrinkWrap: true,
children: [
MedicalFileCard(
label: "Ask Your Doctor".needTranslation,
label: LocaleKeys.askYourDoctor.tr(context: context),
textColor: AppColors.blackColor,
backgroundColor: AppColors.whiteColor,
svgIcon: AppAssets.ask_doctor_medical_file_icon,
isLargeText: true,
iconSize: 36.w,
).onPress(() {}),
MedicalFileCard(
label: "Internet Pairing".needTranslation,
textColor: AppColors.blackColor,
backgroundColor: AppColors.whiteColor,
svgIcon: AppAssets.internet_pairing_icon,
isLargeText: true,
iconSize: 36.w,
).onPress(() {}),
// MedicalFileCard(
// label: LocaleKeys.internetPairing.tr(context: context),
// textColor: AppColors.blackColor,
// backgroundColor: AppColors.whiteColor,
// svgIcon: AppAssets.internet_pairing_icon,
// isLargeText: true,
// iconSize: 36.w,
// ).onPress(() {}),
],
).paddingSymmetrical(0.w, 0.0),
SizedBox(height: 24.h),

@ -245,7 +245,7 @@ class _PatientSickleavesListPageState extends State<PatientSickleavesListPage> {
Expanded(
flex: 6,
child: CustomButton(
text: "Download Report".needTranslation,
text: LocaleKeys.downloadReport.tr(context: context),
onPressed: () async {
LoaderBottomSheet.showLoader();
await medicalFileViewModel.getPatientSickLeavePDF(sickLeave, appState.getAuthenticatedUser()!).then((val) async {
@ -293,7 +293,7 @@ class _PatientSickleavesListPageState extends State<PatientSickleavesListPage> {
),
),
)
: Utils.getNoDataWidget(context, noDataText: "You don't have any sick leaves yet.".needTranslation);
: Utils.getNoDataWidget(context, noDataText: LocaleKeys.youDontHaveAnySickLeavesYet.tr(context: context));
},
).paddingSymmetrical(24.h, 0.h),
],

@ -1,5 +1,6 @@
import 'dart:async';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -9,6 +10,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/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:provider/provider.dart';
@ -40,7 +42,7 @@ class _VaccineListPageState extends State<VaccineListPage> {
return Scaffold(
backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView(
title: "Vaccine Info".needTranslation,
title: LocaleKeys.vaccineInfo.tr(context: context),
child: SingleChildScrollView(
child: Consumer<MedicalFileViewModel>(builder: (context, medicalFileVM, child) {
return Column(
@ -170,7 +172,7 @@ class _VaccineListPageState extends State<VaccineListPage> {
),
),
)
: Utils.getNoDataWidget(context, noDataText: "No vaccines data found...".needTranslation);
: Utils.getNoDataWidget(context, noDataText: LocaleKeys.noDataAvailable.tr(context: context));
},
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
),

@ -183,7 +183,7 @@ class MedicalFileAppointmentCard extends StatelessWidget {
iconSize: 16.h,
)
: CustomButton(
text: "Rebook".needTranslation,
text: LocaleKeys.rebook.tr(context: context),
onPressed: () {
onRescheduleTap();
},

@ -94,7 +94,7 @@ class PatientSickLeaveCard extends StatelessWidget {
: Expanded(
flex: 6,
child: CustomButton(
text: "Download Report".needTranslation,
text: LocaleKeys.downloadReport.tr(context: context),
onPressed: () async {
LoaderBottomSheet.showLoader();
await medicalFileViewModel.getPatientSickLeavePDF(patientSickLeavesResponseModel, _appState.getAuthenticatedUser()!).then((val) async {
@ -106,7 +106,7 @@ class PatientSickLeaveCard extends StatelessWidget {
} catch (ex) {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Cannot open file".needTranslation),
child: Utils.getErrorWidget(loadingText: "Cannot open file"),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
@ -6,6 +7,7 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/appointments/widgets/appointment_card.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
@ -20,7 +22,7 @@ class MedicalReportRequestPage extends StatelessWidget {
Widget build(BuildContext context) {
medicalFileViewModel = Provider.of<MedicalFileViewModel>(context, listen: false);
return CollapsingListView(
title: "Medical Reports".needTranslation,
title: LocaleKeys.medicalReports.tr(context: context),
isClose: true,
child: Column(
children: [

@ -44,7 +44,7 @@ class _MedicalReportsPageState extends State<MedicalReportsPage> {
children: [
Expanded(
child: CollapsingListView(
title: "Medical Reports".needTranslation,
title: LocaleKeys.medicalReports.tr(context: context),
child: SingleChildScrollView(
child: Consumer<MedicalFileViewModel>(builder: (context, medicalFileVM, child) {
return Column(
@ -88,7 +88,7 @@ class _MedicalReportsPageState extends State<MedicalReportsPage> {
Row(
children: [
CustomButton(
text: "Requested".needTranslation,
text: LocaleKeys.requested.tr(context: context),
onPressed: () {
setState(() {
expandedIndex = null;
@ -300,7 +300,7 @@ class _MedicalReportsPageState extends State<MedicalReportsPage> {
Expanded(
flex: 6,
child: CustomButton(
text: "Download Report".needTranslation,
text: LocaleKeys.downloadReport.tr(context: context),
onPressed: () async {
LoaderBottomSheet.showLoader();
await medicalFileViewModel.getPatientMedicalReportPDF(report, appState.getAuthenticatedUser()!).then((val) async {
@ -348,7 +348,7 @@ class _MedicalReportsPageState extends State<MedicalReportsPage> {
),
),
)
: Utils.getNoDataWidget(context, noDataText: "You don't have any medical reports yet.".needTranslation)
: Utils.getNoDataWidget(context, noDataText: LocaleKeys.youDontHaveAnyMedicalReportsYet.tr(context: context))
.paddingSymmetrical(24.h, 24.h);
},
).paddingSymmetrical(24.h, 0.h),
@ -366,7 +366,7 @@ class _MedicalReportsPageState extends State<MedicalReportsPage> {
hasShadow: true,
),
child: CustomButton(
text: "Request medical report".needTranslation,
text: LocaleKeys.requestMedicalReport.tr(context: context),
onPressed: () async {
LoaderBottomSheet.showLoader();
await medicalFileViewModel.getPatientMedicalReportAppointmentsList(onSuccess: (val) async {
@ -385,7 +385,7 @@ class _MedicalReportsPageState extends State<MedicalReportsPage> {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "You do not have any appointments to request a medical report.".needTranslation),
child: Utils.getErrorWidget(loadingText: LocaleKeys.youDoNotHaveAnyAppointmentsToRequestMedicalReport.tr(context: context)),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
@ -414,7 +414,7 @@ class _MedicalReportsPageState extends State<MedicalReportsPage> {
title: LocaleKeys.notice.tr(context: context),
context,
child: Utils.getWarningWidget(
loadingText: "Are you sure you want to request a medical report for this appointment?".needTranslation,
loadingText: LocaleKeys.areYouSureYouWantToRequestMedicalReport.tr(context: context),
isShowActionButtons: true,
onCancelTap: () {
Navigator.pop(context);
@ -425,7 +425,7 @@ class _MedicalReportsPageState extends State<MedicalReportsPage> {
await medicalFileViewModel.insertRequestForMedicalReport(onSuccess: (val) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(context,
child: Utils.getSuccessWidget(loadingText: "Your medical report request has been successfully submitted.".needTranslation),
child: Utils.getSuccessWidget(loadingText: LocaleKeys.yourMedicalReportRequestSubmittedSuccessfully.tr(context: context)),
callBackFunc: () {
medicalFileViewModel.setIsPatientMedicalReportsLoading(true);
medicalFileViewModel.onMedicalReportTabChange(0);

@ -144,7 +144,7 @@ class PatientMedicalReportCard extends StatelessWidget {
} catch (ex) {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Cannot open file".needTranslation),
child: Utils.getErrorWidget(loadingText: "Cannot open file"),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,

@ -95,10 +95,7 @@ class MonthlyReport extends StatelessWidget {
Utils.buildSvgWithAssets(icon: AppAssets.prescription_remarks_icon, width: 18.w, height: 18.h),
SizedBox(width: 9.h),
Expanded(
child:
"This monthly health summary report reflects the health indicators and analysis results of the latest visits. Please note that this will be sent automatically from the system and its not considered as a official report so no medical decision should be taken based on it"
.needTranslation
.toText10(weight: FontWeight.w500, color: AppColors.greyTextColorLight),
child: LocaleKeys.monthlyHealthSummaryReportDisclaimer.tr(context: context).toText10(weight: FontWeight.w500, color: AppColors.greyTextColorLight),
),
],
),
@ -146,7 +143,7 @@ class MonthlyReport extends StatelessWidget {
CustomButton(
text: LocaleKeys.save.tr(),
onPressed: () async {
LoaderBottomSheet.showLoader(loadingText: "Updating Monthly Report Status...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.updatingMonthlyReportStatus.tr(context: context));
await monthlyReportVM.updatePatientHealthSummaryReport(
rSummaryReport: monthlyReportVM.isHealthSummaryEnabled,
onSuccess: (response) async {
@ -157,7 +154,7 @@ class MonthlyReport extends StatelessWidget {
);
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getSuccessWidget(loadingText: "Monthly Report Status Updated Successfully".needTranslation),
child: Utils.getSuccessWidget(loadingText: LocaleKeys.monthlyReportStatusUpdatedSuccessfully.tr(context: context)),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,

@ -1,310 +0,0 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_export.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/monthly_reports/monthly_reports_view_model.dart';
import 'package:hmg_patient_app_new/presentation/monthly_reports/user_agreement_page.dart';
import 'package:provider/provider.dart';
import '../../generated/locale_keys.g.dart';
import '../../theme/colors.dart';
import '../../widgets/appbar/app_bar_widget.dart';
import '../../widgets/input_widget.dart';
import '../../widgets/loader/bottomsheet_loader.dart';
class MonthlyReportsPage extends StatefulWidget {
const MonthlyReportsPage({super.key});
@override
State<MonthlyReportsPage> createState() => _MonthlyReportsPageState();
}
class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
bool isHealthSummaryEnabled = false;
bool isTermsAccepted = false;
final TextEditingController emailController = TextEditingController();
@override
void dispose() {
emailController.dispose();
super.dispose();
}
void _showError(String message) {
ScaffoldMessenger.of(context).hideCurrentSnackBar();
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(message),
behavior: SnackBarBehavior.floating,
),
);
}
void _showSuccessSnackBar() {
ScaffoldMessenger.of(context).hideCurrentSnackBar();
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
"Successfully updated".needTranslation,
style: const TextStyle(
color: AppColors.whiteColor,
fontWeight: FontWeight.w600,
),
),
behavior: SnackBarBehavior.floating,
backgroundColor: AppColors.textGreenColor,
duration: const Duration(seconds: 2),
),
);
}
Future<void> _onSavePressed() async {
if (!isTermsAccepted) {
_showError("Please accept the terms and conditions".needTranslation);
return;
}
final email = emailController.text.trim();
if (email.isEmpty) {
_showError("Please enter your email".needTranslation);
return;
}
final vm = context.read<MonthlyReportsViewModel>();
// LoaderBottomSheet.showLoader();
final ok = await vm.saveMonthlyReport(email: email);
// LoaderBottomSheet.hideLoader();
if (ok) {
setState(() => isHealthSummaryEnabled = true);
_showSuccessSnackBar();
} else {
// _showError("Failed to update".needTranslation);
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.scaffoldBgColor,
appBar: CustomAppBar(
onBackPressed: () => Navigator.of(context).pop(),
onLanguageChanged: (_) {},
hideLogoAndLang: true,
),
body: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Monthly Reports".needTranslation,
style: TextStyle(
color: AppColors.textColor,
fontSize: 27.f,
fontWeight: FontWeight.w600,
),
),
SizedBox(height: 16.h),
Container(
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 8.h),
height: 54.h,
alignment: Alignment.center,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: (12.r),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"Patient Health Summary Report".needTranslation,
style: TextStyle(
color: AppColors.textColor,
fontSize: 14.f,
fontWeight: FontWeight.w600,
),
),
_buildToggle(),
],
),
),
SizedBox(height: 16.h),
TextInputWidget(
controller: emailController,
labelText: "Eamil*".needTranslation,
hintText: "email@email.com",
isEnable: true,
prefix: null,
isAllowRadius: true,
isBorderAllowed: false,
isAllowLeadingIcon: true,
autoFocus: true,
keyboardType: TextInputType.emailAddress,
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 8.h),
onChange: (value) {
setState(() {});
},
).paddingOnly(top: 8.h, bottom: 8.h),
Row(
children: [
Text(
"To View The Terms and Conditions".needTranslation,
style: TextStyle(
color: AppColors.textColor,
fontSize: 14.f,
fontWeight: FontWeight.w600,
),
),
InkWell(
child: Text(
"Click here".needTranslation,
style: TextStyle(
color: AppColors.primaryRedColor,
fontSize: 14.f,
fontWeight: FontWeight.w600,
),
),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (_) => const UserAgreementPage(),
),
);
},
),
],
),
SizedBox(height: 12.h),
GestureDetector(
onTap: () => setState(() => isTermsAccepted = !isTermsAccepted),
child: Row(
children: [
AnimatedContainer(
duration: const Duration(milliseconds: 200),
height: 24.h,
width: 24.h,
decoration: BoxDecoration(
color: isTermsAccepted
? AppColors.textGreenColor
: Colors.transparent,
borderRadius: BorderRadius.circular(6),
border: Border.all(
color: isTermsAccepted
? AppColors.lightGreenColor
: AppColors.greyColor,
width: 2.h,
),
),
child: isTermsAccepted
? Icon(Icons.check, size: 16.f, color: AppColors.whiteColor,)
: null,
),
SizedBox(width: 12.h),
Text(
"I agree to the terms and conditions".needTranslation,
style: context.dynamicTextStyle(
fontSize: 12.f,
fontWeight: FontWeight.w500,
color: AppColors.textColor,
),
),
],
),
),
SizedBox(height: 12.h),
Text(
"This monthly Health Summary Report reflects the health indicators and analysis results of the latest visits. Please note that this will be sent automatically from the system and it's not considered as an official report so no medical decisions should be taken based on it"
.needTranslation,
style: TextStyle(
color: AppColors.textColor,
fontSize: 10.f,
fontWeight: FontWeight.w600,
),
),
SizedBox(height: 12.h),
Image.asset('assets/images/jpg/report.jpg'),
SizedBox(height: 16.h),
Row(
children: [
Expanded(
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: AppColors.successColor,
foregroundColor: AppColors.whiteColor,
elevation: 0,
padding: const EdgeInsets.symmetric(vertical: 14),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
onPressed: _onSavePressed,
child: Text(
LocaleKeys.save.tr(),
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 16.f,
),
),
),
),
],
),
],
),
).paddingAll(16),
);
}
Widget _buildToggle() {
final value = isHealthSummaryEnabled;
return AbsorbPointer(
absorbing: true,
child: AnimatedContainer(
duration: const Duration(milliseconds: 200),
width: 50.h,
height: 28.h,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: value
? AppColors.lightGreenColor
: AppColors.greyColor.withOpacity(0.3),
),
child: AnimatedAlign(
duration: const Duration(milliseconds: 200),
alignment: value ? Alignment.centerRight : Alignment.centerLeft,
child: Padding(
padding: const EdgeInsets.all(3),
child: Container(
width: 22.h,
height: 22.h,
decoration: BoxDecoration(
shape: BoxShape.circle,
color: value
? AppColors.textGreenColor
: AppColors.greyTextColor,
),
),
),
),
),
);
}
}

@ -1,117 +0,0 @@
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/features/monthly_reports/terms_conditions_view_model.dart';
import 'package:provider/provider.dart';
import 'package:webview_flutter/webview_flutter.dart';
import '../../theme/colors.dart';
import '../../widgets/appbar/app_bar_widget.dart';
class UserAgreementPage extends StatefulWidget {
const UserAgreementPage({super.key});
@override
State<UserAgreementPage> createState() => _UserAgreementPageState();
}
class _UserAgreementPageState extends State<UserAgreementPage> {
late final WebViewController _webViewController;
bool _isLoading = true;
String? _errorMessage;
@override
void initState() {
super.initState();
_webViewController = WebViewController()
..setJavaScriptMode(JavaScriptMode.unrestricted)
..setBackgroundColor(const Color(0x00000000))
..setNavigationDelegate(
NavigationDelegate(
onPageStarted: (_) {
setState(() {
_isLoading = true;
});
},
onPageFinished: (_) {
setState(() {
_isLoading = false;
});
},
onWebResourceError: (error) {
},
),
);
WidgetsBinding.instance.addPostFrameCallback((_) {
final vm =
Provider.of<TermsConditionsViewModel>(context, listen: false);
vm.getTermsConditions(
onSuccess: () {
final htmlString = vm.termsConditionsHtml ?? '';
if (htmlString.isNotEmpty) {
setState(() {
_errorMessage = null;
_isLoading = true;
});
_webViewController.loadHtmlString(htmlString);
} else {
setState(() {
_isLoading = false;
_errorMessage = 'لا توجد شروط متاحة حالياً'.needTranslation;
});
}
},
onError: (msg) {
setState(() {
_isLoading = false;
_errorMessage = msg;
});
},
);
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.scaffoldBgColor,
appBar: CustomAppBar(
onBackPressed: () => Navigator.of(context).pop(),
onLanguageChanged: (_) {},
hideLogoAndLang: true,
),
body: Stack(
children: [
WebViewWidget(controller: _webViewController),
if (_errorMessage != null)
Center(
child: Container(
margin: const EdgeInsets.all(16),
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: AppColors.whiteColor,
borderRadius: BorderRadius.circular(8),
),
child: Text(
_errorMessage!,
textAlign: TextAlign.center,
style: TextStyle(
color: AppColors.primaryRedColor,
fontWeight: FontWeight.w600,
),
),
),
),
if (_isLoading)
const Center(
child: CircularProgressIndicator(),
),
],
),
);
}
}

@ -50,7 +50,7 @@ class _FamilyMedicalScreenState extends State<FamilyMedicalScreen> {
AppState appState = getIt.get<AppState>();
return CollapsingListView(
title: "Medical Files".needTranslation,
title: LocaleKeys.medicalFiles.tr(context: context),
bottomChild: appState.getAuthenticatedUser()!.isParentUser!
? Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
@ -59,13 +59,13 @@ class _FamilyMedicalScreenState extends State<FamilyMedicalScreen> {
),
padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 20.h),
child: CustomButton(
text: "Add a new family member".needTranslation,
text: LocaleKeys.addANewFamilyMember.tr(context: context),
onPressed: () {
DialogService dialogService = getIt.get<DialogService>();
medicalVM!.clearAuthValues();
dialogService.showAddFamilyFileSheet(
label: "Add Family Member".needTranslation,
message: "Please fill the below field to add a new family member to your profile".needTranslation,
label: LocaleKeys.addFamilyMember.tr(context: context),
message: LocaleKeys.pleaseFillBelowFieldToAddNewFamilyMember.tr(context: context),
onVerificationPress: () {
medicalVM!.addFamilyFile(otpTypeEnum: OTPTypeEnum.sms);
});

@ -54,12 +54,10 @@ class _FamilyCardsState extends State<FamilyCards> {
children: [
Utils.buildSvgWithAssets(icon: AppAssets.alertSquare),
SizedBox(width: 8.h),
"Who can view my medical file ?"
.needTranslation
.toText14(color: AppColors.textColor, isUnderLine: true, weight: FontWeight.w500)
LocaleKeys.whoCanViewMyMedicalFile.tr(context: context).toText14(color: AppColors.textColor, isUnderLine: true, weight: FontWeight.w500)
.onPress(() {
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Manage Family".needTranslation,
label: LocaleKeys.manageFiles.tr(context: context),
message: "",
child: manageFamily(),
onOkPressed: () {},
@ -213,7 +211,7 @@ class _FamilyCardsState extends State<FamilyCards> {
onPressed: () {
if (canSwitch) widget.onSelect(profile);
},
text: isActive ? "Active".needTranslation : "Switch".needTranslation,
text: isActive ? LocaleKeys.active.tr(context: context) : LocaleKeys.switchLogin.tr(context: context),
backgroundColor: isActive || !canSwitch ? Colors.grey.shade200 : AppColors.secondaryLightRedColor,
borderColor: isActive || !canSwitch ? Colors.grey.shade200 : AppColors.secondaryLightRedColor,
textColor: isActive || !canSwitch ? AppColors.greyTextColor : AppColors.primaryRedColor,
@ -309,7 +307,7 @@ class _FamilyCardsState extends State<FamilyCards> {
height: 30.h,
chipType: ChipTypeEnum.alert,
backgroundColor: AppColors.lightGrayBGColor,
chipText: "Medical File: ${profile.patientId ?? "N/A".needTranslation}",
chipText: "${LocaleKeys.medicalFile.tr(context: context)}: ${profile.patientId ?? "N/A"}",
iconAsset: null,
isShowBorder: false,
borderRadius: 8.h,
@ -364,26 +362,26 @@ class _FamilyCardsState extends State<FamilyCards> {
switch (status) {
case FamilyFileEnum.active:
if (isRequestFromMySide) {
return "${status.displayName} your request to be your family member".needTranslation;
return LocaleKeys.acceptedYourRequestToBeYourFamilyMember.tr(namedArgs: {'status': status.displayName}, context: context);
} else {
return "can view your file".needTranslation;
return LocaleKeys.canViewYourFile.tr(context: context);
}
case FamilyFileEnum.pending:
if (isRequestFromMySide) {
return "has a request ${status.displayName} to be your family member".needTranslation;
return LocaleKeys.hasARequestPendingToBeYourFamilyMember.tr(namedArgs: {'status': status.displayName}, context: context);
} else {
return "wants to add you as their family member".needTranslation;
return LocaleKeys.wantsToAddYouAsTheirFamilyMember.tr(context: context);
}
case FamilyFileEnum.rejected:
if (isRequestFromMySide) {
return "${status.displayName} your request to be your family member".needTranslation;
return LocaleKeys.rejectedYourRequestToBeYourFamilyMember.tr(namedArgs: {'status': status.displayName}, context: context);
} else {
return "${status.displayName} your family member request".needTranslation;
return LocaleKeys.rejectedYourFamilyMemberRequest.tr(namedArgs: {'status': status.displayName}, context: context);
}
case FamilyFileEnum.inactive:
return "Inactive".needTranslation;
return LocaleKeys.inactive.tr(context: context);
default:
return "N/A".needTranslation;
return LocaleKeys.notAvailable.tr(context: context);
}
}
}

@ -1,7 +1,9 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/features/medical_file/models/family_file_response_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/my_family/widget/family_cards.dart';
import 'package:hmg_patient_app_new/services/navigation_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
@ -15,8 +17,8 @@ class MyFamilySheet {
titleWidget: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
'Please select a profile'.needTranslation.toText21(isBold: true),
'switch from the below list of medical file'.needTranslation.toText16(weight: FontWeight.w100, color: AppColors.greyTextColor),
LocaleKeys.selectAProfile.tr(context: context).toText21(isBold: true),
LocaleKeys.switchFamilyFile.tr(context: context).toText16(weight: FontWeight.w100, color: AppColors.greyTextColor),
],
),
child: FamilyCards(

@ -39,9 +39,9 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
children: [
Expanded(
child: CollapsingListView(
title: "Invoice Details".needTranslation,
title: LocaleKeys.invoiceDetails.tr(context: context),
sendEmail: () async {
LoaderBottomSheet.showLoader(loadingText: "Sending email, Please wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.sendingEmailPleaseWait.tr(context: context));
await myInvoicesViewModel.sendInvoiceEmail(
appointmentNo: widget.getInvoiceDetailsResponseModel.appointmentNo!,
projectID: widget.getInvoiceDetailsResponseModel.projectID!,
@ -49,7 +49,7 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getSuccessWidget(loadingText: "Email sent successfully.".needTranslation),
child: Utils.getSuccessWidget(loadingText: LocaleKeys.emailSentSuccessfullyMessage.tr(context: context)),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
@ -223,12 +223,12 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 24.h),
"Total Balance".needTranslation.toText18(isBold: true).paddingSymmetrical(24.h, 0.h),
LocaleKeys.totalBalance.tr(context: context).toText18(isBold: true).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 17.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Amount before tax".needTranslation.toText14(isBold: true),
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(widget.getInvoiceDetailsResponseModel.listConsultation!.first.totalShare.toString().toText16(isBold: true), AppColors.blackColor, 13,
isSaudiCurrency: true),
],
@ -236,7 +236,7 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"VAT 15%".needTranslation.toText14(isBold: true, color: AppColors.greyTextColor),
LocaleKeys.vat15.tr(context: context).toText14(isBold: true, color: AppColors.greyTextColor),
Utils.getPaymentAmountWithSymbol(
widget.getInvoiceDetailsResponseModel.listConsultation!.first.totalVATAmount!.toString().toText14(isBold: true, color: AppColors.greyTextColor), AppColors.greyTextColor, 13,
isSaudiCurrency: true),
@ -246,7 +246,7 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Discount".needTranslation.toText14(isBold: true),
LocaleKeys.discount.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(widget.getInvoiceDetailsResponseModel.listConsultation!.first.discountAmount!.toString().toText14(isBold: true, color: AppColors.primaryRedColor),
AppColors.primaryRedColor, 13,
isSaudiCurrency: true),
@ -255,7 +255,7 @@ class _MyInvoicesDetailsPageState extends State<MyInvoicesDetailsPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Paid".needTranslation.toText14(isBold: true),
LocaleKeys.paid.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(
widget.getInvoiceDetailsResponseModel.listConsultation!.first.grandTotal!.toString().toText14(isBold: true, color: AppColors.textColor), AppColors.textColor, 13,
isSaudiCurrency: true),

@ -77,7 +77,7 @@ class _MyInvoicesListState extends State<MyInvoicesList> {
getInvoicesListResponseModel: myInvoicesVM.allInvoicesList[index],
onTap: () async {
myInvoicesVM.setInvoiceDetailLoading();
LoaderBottomSheet.showLoader(loadingText: "Fetching invoice details, Please wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingInvoiceDetails.tr(context: context));
await myInvoicesVM.getInvoiceDetails(
appointmentNo: myInvoicesVM.allInvoicesList[index].appointmentNo!,
invoiceNo: myInvoicesVM.allInvoicesList[index].invoiceNo!,

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
@ -41,11 +42,11 @@ class InvoiceListCard extends StatelessWidget {
AppCustomChipWidget(
icon: AppAssets.walkin_appointment_icon,
iconColor: AppColors.textColor,
labelText: 'Walk In'.needTranslation,
labelText: LocaleKeys.walkin.tr(context: context),
textColor: AppColors.textColor,
),
AppCustomChipWidget(
labelText: 'OutPatient'.needTranslation,
labelText: LocaleKeys.outPatient.tr(context: context),
backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.1),
textColor: AppColors.primaryRedColor,
),
@ -127,7 +128,7 @@ class InvoiceListCard extends StatelessWidget {
),
SizedBox(height: 16.h),
CustomButton(
text: "View invoice details".needTranslation,
text: LocaleKeys.viewInvoiceDetails.tr(context: context),
onPressed: () {
if (onTap != null) {
onTap!();

@ -0,0 +1,285 @@
import 'package:easy_localization/easy_localization.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/size_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/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/widgets/appbar/collapsing_list_view.dart';
import 'package:share_plus/share_plus.dart';
class NotificationDetailsPage extends StatelessWidget {
final NotificationResponseModel notification;
const NotificationDetailsPage({
super.key,
required this.notification,
});
@override
Widget build(BuildContext context) {
// Debug logging
print('=== Notification Details ===');
print('Message: ${notification.message}');
print('MessageType: ${notification.messageType}');
print('MessageTypeData: ${notification.messageTypeData}');
print('VideoURL: ${notification.videoURL}');
print('========================');
return CollapsingListView(
title: LocaleKeys.notificationDetails.tr(),
trailing: IconButton(
icon: Icon(
Icons.share_outlined,
size: 24.h,
color: AppColors.textColor,
),
onPressed: () {
_shareNotification();
},
),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 24.h),
// Notification content card
_buildNotificationCard(context),
SizedBox(height: 24.h),
],
).paddingSymmetrical(24.w, 0.h),
),
);
}
Widget _buildNotificationCard(BuildContext context) {
return Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 24.h,
hasShadow: true,
),
padding: EdgeInsets.all(16.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Date and Time row
Row(
children: [
// Time chip with clock icon
Container(
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h),
decoration: BoxDecoration(
color: AppColors.greyColor,
borderRadius: BorderRadius.circular(8),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.access_time, size: 12.w, color: AppColors.textColor),
SizedBox(width: 4.w),
_formatTime(notification.isSentOn).toText10(
weight: FontWeight.w500,
color: AppColors.textColor,
),
],
),
),
SizedBox(width: 8.w),
// Date chip with calendar icon
Container(
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h),
decoration: BoxDecoration(
color: AppColors.greyColor,
borderRadius: BorderRadius.circular(8),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.calendar_today, size: 12.w, color: AppColors.textColor),
SizedBox(width: 4.w),
_formatDate(notification.isSentOn).toText10(
weight: FontWeight.w500,
color: AppColors.textColor,
),
],
),
),
],
),
SizedBox(height: 16.h),
// Notification message
if (notification.message != null && notification.message!.isNotEmpty)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.messageNotification.tr().toText14(
weight: FontWeight.w600,
color: AppColors.greyTextColor,
),
SizedBox(height: 8.h),
notification.message!.toText16(
weight: FontWeight.w400,
color: AppColors.textColor,
maxlines: 100,
),
SizedBox(height: 16.h),
],
),
// Notification image (if MessageType is "image")
if (notification.messageType != null &&
notification.messageType!.toLowerCase() == "image")
Builder(
builder: (context) {
// Try to get image URL from videoURL or messageTypeData
String? imageUrl;
if (notification.videoURL != null && notification.videoURL!.isNotEmpty) {
imageUrl = notification.videoURL;
print('Image URL from videoURL: $imageUrl');
} else if (notification.messageTypeData != null && notification.messageTypeData!.isNotEmpty) {
imageUrl = notification.messageTypeData;
print('Image URL from messageTypeData: $imageUrl');
}
if (imageUrl == null || imageUrl.isEmpty) {
print('No image URL found. videoURL: ${notification.videoURL}, messageTypeData: ${notification.messageTypeData}');
return SizedBox.shrink();
}
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.attachedImage.tr().toText14(
weight: FontWeight.w600,
color: AppColors.greyTextColor,
),
SizedBox(height: 8.h),
ClipRRect(
borderRadius: BorderRadius.circular(12.h),
child: Image.network(
imageUrl,
width: double.infinity,
fit: BoxFit.cover,
errorBuilder: (context, error, stackTrace) {
print('Error loading image: $error');
print('Image URL: $imageUrl');
return Container(
height: 200.h,
decoration: BoxDecoration(
color: AppColors.greyColor.withValues(alpha: 0.2),
borderRadius: BorderRadius.circular(12.h),
),
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.broken_image_outlined,
size: 48.h,
color: AppColors.greyTextColor,
),
SizedBox(height: 8.h),
LocaleKeys.failedToLoadImage.tr().toText12(
color: AppColors.greyTextColor,
),
SizedBox(height: 4.h),
Text(
imageUrl!,
style: TextStyle(fontSize: 8, color: AppColors.greyTextColor),
textAlign: TextAlign.center,
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
],
),
),
);
},
loadingBuilder: (context, child, loadingProgress) {
if (loadingProgress == null) {
print('Image loaded successfully');
return child;
}
return Container(
height: 200.h,
decoration: BoxDecoration(
color: AppColors.greyColor.withValues(alpha: 0.2),
borderRadius: BorderRadius.circular(12.h),
),
child: Center(
child: CircularProgressIndicator(
value: loadingProgress.expectedTotalBytes != null
? loadingProgress.cumulativeBytesLoaded /
loadingProgress.expectedTotalBytes!
: null,
),
),
);
},
),
),
SizedBox(height: 16.h),
],
);
},
),
// Additional notification info
if (notification.notificationType != null && notification.notificationType!.isNotEmpty)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.typeNotification.tr().toText14(
weight: FontWeight.w600,
color: AppColors.greyTextColor,
),
SizedBox(height: 8.h),
notification.notificationType!.toText16(
weight: FontWeight.w400,
color: AppColors.textColor,
),
],
),
],
),
);
}
void _shareNotification() async {
final String shareText = '''
${notification.message ?? 'Notification'}
Time: ${_formatTime(notification.isSentOn)}
Date: ${_formatDate(notification.isSentOn)}
${notification.notificationType != null ? '\nType: ${notification.notificationType}' : ''}
'''.trim();
await Share.share(shareText);
}
String _formatTime(String? dateTimeString) {
if (dateTimeString == null || dateTimeString.isEmpty) return '--';
try {
final dateTime = DateUtil.convertStringToDate(dateTimeString);
return DateFormat('hh:mm a').format(dateTime);
} catch (e) {
return '--';
}
}
String _formatDate(String? dateTimeString) {
if (dateTimeString == null || dateTimeString.isEmpty) return '--';
try {
final dateTime = DateUtil.convertStringToDate(dateTimeString);
return DateFormat('dd MMM yyyy').format(dateTime);
} catch (e) {
return '--';
}
}
}

@ -1,15 +1,21 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_staggered_animations/flutter_staggered_animations.dart';
import 'package:hmg_patient_app_new/core/app_assets.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/utils.dart';
import 'package:hmg_patient_app_new/extensions/int_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/features/notifications/notifications_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/lab/lab_result_item_view.dart';
import 'package:hmg_patient_app_new/presentation/notifications/notification_details_page.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:provider/provider.dart';
import 'package:intl/intl.dart';
class NotificationsListPage extends StatelessWidget {
const NotificationsListPage({super.key});
@ -17,7 +23,7 @@ class NotificationsListPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return CollapsingListView(
title: "Notifications".needTranslation,
title: LocaleKeys.notifications.tr(context: context),
child: SingleChildScrollView(
child: Consumer<NotificationsViewModel>(builder: (context, notificationsVM, child) {
return Container(
@ -46,24 +52,134 @@ class NotificationsListPage extends StatelessWidget {
child: SlideAnimation(
verticalOffset: 100.0,
child: FadeInAnimation(
child: AnimatedContainer(
duration: Duration(milliseconds: 300),
curve: Curves.easeInOut,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 16.h),
// "Notification Title".toText14(),
// SizedBox(height: 8.h),
Row(
children: [
Expanded(child: notificationsVM.notificationsList[index].message!.toText16(isBold: notificationsVM.notificationsList[index].isRead ?? false)),
],
child: GestureDetector(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => NotificationDetailsPage(
notification: notificationsVM.notificationsList[index],
),
),
SizedBox(height: 12.h),
DateUtil.formatDateToDate(DateUtil.convertStringToDate(notificationsVM.notificationsList[index].isSentOn!), false).toText14(weight: FontWeight.w500),
1.divider,
],
);
},
child: AnimatedContainer(
duration: Duration(milliseconds: 300),
curve: Curves.easeInOut,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 16.h),
// Message row with red dot for unread
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: notificationsVM.notificationsList[index].message!.toText16(
isBold: (notificationsVM.notificationsList[index].isRead == false),
weight: (notificationsVM.notificationsList[index].isRead == false)
? FontWeight.w600
: FontWeight.w400,
),
),
SizedBox(width: 8.w),
// Red dot for unread notifications ONLY
if (notificationsVM.notificationsList[index].isRead == false)
Container(
width: 8.w,
height: 8.w,
decoration: BoxDecoration(
color: Colors.red,
shape: BoxShape.circle,
),
),
],
),
SizedBox(height: 12.h),
// First row: Time and Date chips with arrow
Row(
children: [
// Time chip with clock icon
Container(
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h),
decoration: BoxDecoration(
color: AppColors.greyColor,
borderRadius: BorderRadius.circular(8),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.access_time, size: 12.w, color: AppColors.textColor),
SizedBox(width: 4.w),
_formatTime(notificationsVM.notificationsList[index].isSentOn).toText10(
weight: FontWeight.w500,
color: AppColors.textColor,
),
],
),
),
SizedBox(width: 8.w),
// Date chip with calendar icon
Container(
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h),
decoration: BoxDecoration(
color: AppColors.greyColor,
borderRadius: BorderRadius.circular(8),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.calendar_today, size: 12.w, color: AppColors.textColor),
SizedBox(width: 4.w),
_formatDate(notificationsVM.notificationsList[index].isSentOn).toText10(
weight: FontWeight.w500,
color: AppColors.textColor,
),
],
),
),
Spacer(),
// Arrow icon
Utils.buildSvgWithAssets(
icon: AppAssets.arrow_forward,
width: 16.w,
height: 16.h,
iconColor: AppColors.greyTextColor,
),
],
),
// Second row: Contains Image chip (if MessageType is "image")
if (notificationsVM.notificationsList[index].messageType != null &&
notificationsVM.notificationsList[index].messageType!.toLowerCase() == "image")
Padding(
padding: EdgeInsets.only(top: 8.h),
child: Row(
children: [
Container(
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 4.h),
decoration: BoxDecoration(
color: AppColors.greyColor,
borderRadius: BorderRadius.circular(8),
),
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(Icons.image_outlined, size: 12.w, color: AppColors.textColor),
SizedBox(width: 4.w),
'Contains Image'.toText10(
weight: FontWeight.w500,
color: AppColors.textColor,
),
],
),
),
],
),
),
SizedBox(height: 16.h),
1.divider,
],
),
),
),
),
@ -75,4 +191,24 @@ class NotificationsListPage extends StatelessWidget {
),
);
}
String _formatTime(String? dateTimeString) {
if (dateTimeString == null || dateTimeString.isEmpty) return '--';
try {
final dateTime = DateUtil.convertStringToDate(dateTimeString);
return DateFormat('hh:mm a').format(dateTime);
} catch (e) {
return '--';
}
}
String _formatDate(String? dateTimeString) {
if (dateTimeString == null || dateTimeString.isEmpty) return '--';
try {
final dateTime = DateUtil.convertStringToDate(dateTimeString);
return DateFormat('dd MMM yyyy').format(dateTime);
} catch (e) {
return '--';
}
}
}

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
@ -6,6 +7,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/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@ -67,13 +69,13 @@ class _OnboardingScreenState extends State<OnboardingScreen> {
children: [
onboardingView(
AppAnimations.onboarding_1,
"Booking appointment has never been easy".needTranslation,
"In few clicks find yourself having consultation with the doctor of your choice.".needTranslation,
LocaleKeys.onboardingHeading1.tr(context: context),
LocaleKeys.onboardingBody1.tr(context: context),
),
onboardingView(
AppAnimations.onboarding_2,
"Access the medical history on finger tips".needTranslation,
"Keep track on your medical history including labs, prescription, insurance, etc".needTranslation,
LocaleKeys.onboardingHeading2.tr(context: context),
LocaleKeys.onboardingBody2.tr(context: context),
),
],
onPageChanged: (int index) {
@ -107,7 +109,7 @@ class _OnboardingScreenState extends State<OnboardingScreen> {
transitionBuilder: (child, anim) => FadeTransition(opacity: anim, child: child),
child: selectedIndex == 0
? CustomButton(
text: "Skip".needTranslation,
text: LocaleKeys.skip.tr(context: context),
onPressed: () => goToHomePage(),
width: 86.w,
height: 56.h,
@ -136,13 +138,13 @@ class _OnboardingScreenState extends State<OnboardingScreen> {
iconSize: 32.w,
width: 86.w,
height: 56.h,
text: "".needTranslation,
text: "",
backgroundColor: Colors.transparent,
onPressed: () {
pageController.animateToPage(1, duration: Duration(milliseconds: 400), curve: Curves.easeInOut);
})
: CustomButton(
text: "Get Started".needTranslation,
text: LocaleKeys.getStarted.tr(context: context),
fontWeight: FontWeight.w500,
fontSize: 16.f,
height: 56.h,

@ -1,9 +1,10 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:hmg_patient_app_new/core/app_export.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/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/parking/parking_slot.dart';
import 'package:provider/provider.dart';
@ -85,7 +86,7 @@ class _ParkingPageState extends State<ParkingPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Parking".needTranslation,
LocaleKeys.parking.tr(context: context),
style: TextStyle(
color: AppColors.textColor,
fontSize: 27.f,
@ -100,22 +101,7 @@ class _ParkingPageState extends State<ParkingPage> {
hasShadow: true,
),
child: Padding(
padding: EdgeInsets.all(16.h),
child: Text(
"Dr. Sulaiman Al Habib hospital are conduction a test for the emerging corona"
" virus and issuing travel certificates 24/7 in a short time and with high accuracy."
" Those wishing to benefit from this service can visit one of Dr. Sulaiman Al Habib branches "
"to conduct a corona test within few minutes. Dr. Sulaiman Al Habib hospital are conduction"
" a test for the emerging corona virus and issuing travel certificates 24/7 in a short time and with high accuracy. "
"Those wishing to benefit from this service can visit one of Dr. Sulaiman Al Habib branches to conduct a corona test within few minutes.",
style: TextStyle(
color: AppColors.textColor,
fontSize: 12,
height: 1.4,
fontWeight: FontWeight.w500,
),
),
),
padding: EdgeInsets.all(16.h), child: LocaleKeys.parkingDescription.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.textColor)),
).paddingOnly(top: 16, bottom: 16),
],
),
@ -131,18 +117,16 @@ class _ParkingPageState extends State<ParkingPage> {
),
child: Padding(
padding: EdgeInsets.all(24.h),
child: SizedBox(
width: double.infinity,
height: 56,
child: CustomButton(
text: "Read Barcodes".needTranslation,
onPressed: () => _readQR(context), // always non-null
isDisabled: vm.isLoading,
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
fontSize: 18,
fontWeight: FontWeight.bold,
),
child: CustomButton(
text: LocaleKeys.scanQRCode.tr(context: context),
onPressed: () => _readQR(context),
// always non-null
isDisabled: vm.isLoading,
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
fontSize: 18.f,
height: 56.h,
fontWeight: FontWeight.bold,
),
),
),

@ -1,10 +1,12 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_export.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/qr_parking/models/qr_parking_response_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import '../../features/qr_parking/qr_parking_view_model.dart';
import '../../theme/colors.dart';
import '../../widgets/appbar/app_bar_widget.dart';
@ -157,7 +159,7 @@ class _ParkingSlotState extends State<ParkingSlot> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Parking Slot Details".needTranslation,
LocaleKeys.parkingSlotDetails.tr(context: context),
style: TextStyle(
fontSize: 16.f,
fontWeight: FontWeight.w600,
@ -170,16 +172,16 @@ class _ParkingSlotState extends State<ParkingSlot> {
runSpacing: 4,
children: [
AppCustomChipWidget(
labelText: "Slot: ${widget.model.qRParkingCode ?? '-'}".needTranslation,
labelText: LocaleKeys.slotNumber.tr(namedArgs: {'code': widget.model.qRParkingCode ?? '-'}, context: context),
),
AppCustomChipWidget(
labelText: "Basement: ${widget.model.floorDescription ?? '-'}".needTranslation,
labelText: LocaleKeys.basement.tr(namedArgs: {'description': widget.model.floorDescription ?? '-'}, context: context),
),
AppCustomChipWidget(
labelText: "Date: ${_formatPrettyDate(widget.model.createdOn)}".needTranslation,
labelText: LocaleKeys.parkingDate.tr(namedArgs: {'date': _formatPrettyDate(widget.model.createdOn)}, context: context),
),
AppCustomChipWidget(
labelText: "Parked Since: ${_formatPrettyTime(widget.model.createdOn)}".needTranslation,
labelText: LocaleKeys.parkedSince.tr(namedArgs: {'time': _formatPrettyTime(widget.model.createdOn)}, context: context),
),
],
),
@ -193,7 +195,7 @@ class _ParkingSlotState extends State<ParkingSlot> {
width: double.infinity,
height: 48.h,
child: CustomButton(
text: "Get Direction".needTranslation,
text: LocaleKeys.getDirections.tr(context: context),
onPressed: _openDirection,
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
@ -210,14 +212,14 @@ class _ParkingSlotState extends State<ParkingSlot> {
width: double.infinity,
height: 48.h,
child: CustomButton(
text: "Reset Direction".needTranslation,
text: LocaleKeys.resetDirection.tr(context: context),
onPressed: _resetDirection,
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
fontSize: 18,
fontSize: 18.f,
fontWeight: FontWeight.bold,
borderRadius: 10,
borderRadius: 10.r,
),
),
],

@ -118,7 +118,7 @@ class PrescriptionDeliveryOrderSummaryPage extends StatelessWidget {
child: CustomButton(
text: LocaleKeys.submit.tr(context: context),
onPressed: () async {
LoaderBottomSheet.showLoader(loadingText: "Submitting your request...");
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.loadingText.tr(context: context));
await prescriptionsViewModel.submitPrescriptionDeliveryRequest(
latitude: prescriptionsViewModel.locationGeocodeResponse.results.first.geometry.location.lat.toString(),
longitude: prescriptionsViewModel.locationGeocodeResponse.results.first.geometry.location.lng.toString(),
@ -129,7 +129,7 @@ class PrescriptionDeliveryOrderSummaryPage extends StatelessWidget {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getSuccessWidget(loadingText: "Request sent successfully.".needTranslation),
child: Utils.getSuccessWidget(loadingText: LocaleKeys.requestSubmittedSuccessfully.tr(context: context)),
callBackFunc: () {
Navigator.of(context).pop();
},

@ -88,7 +88,7 @@ class PrescriptionDeliveryOrdersListPage extends StatelessWidget {
),
),
)
: Utils.getNoDataWidget(context, noDataText: "You don't have any prescription orders yet.".needTranslation);
: Utils.getNoDataWidget(context, noDataText: LocaleKeys.noPrescriptionOrdersYet.tr(context: context));
},
).paddingSymmetrical(24.h, 0.h),
],

@ -62,7 +62,7 @@ class _PrescriptionDetailPageState extends State<PrescriptionDetailPage> {
child: CollapsingListView(
title: LocaleKeys.prescriptions.tr(context: context),
instructions: () async {
LoaderBottomSheet.showLoader(loadingText: "Fetching prescription PDF, Please wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingPrescriptionPDFPleaseWait.tr(context: context));
await prescriptionsViewModel.getPrescriptionInstructionsPDF(widget.prescriptionsResponseModel, onSuccess: (val) {
LoaderBottomSheet.hideLoader();
if (prescriptionsViewModel.prescriptionInstructionsPDFLink.isNotEmpty) {
@ -71,7 +71,7 @@ class _PrescriptionDetailPageState extends State<PrescriptionDetailPage> {
} else {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Unable to fetch PDF".needTranslation),
child: Utils.getErrorWidget(loadingText: "Unable to fetch PDF"),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
@ -136,7 +136,7 @@ class _PrescriptionDetailPageState extends State<PrescriptionDetailPage> {
AppCustomChipWidget(
icon: AppAssets.rating_icon,
iconColor: AppColors.ratingColorYellow,
labelText: "Rating: ${widget.prescriptionsResponseModel.decimalDoctorRate}".needTranslation,
labelText: LocaleKeys.ratingValue.tr(namedArgs: {'rating': widget.prescriptionsResponseModel.decimalDoctorRate.toString()}, context: context),
),
AppCustomChipWidget(
labelText: widget.prescriptionsResponseModel.name!,
@ -145,9 +145,9 @@ class _PrescriptionDetailPageState extends State<PrescriptionDetailPage> {
),
SizedBox(height: 16.h),
CustomButton(
text: "Download Prescription".needTranslation,
text: LocaleKeys.downloadPrescription.tr(context: context),
onPressed: () async {
LoaderBottomSheet.showLoader(loadingText: "Fetching prescription PDF, Please wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingPrescriptionPDFPleaseWait.tr(context: context));
await prescriptionVM.getPrescriptionPDFBase64(widget.prescriptionsResponseModel).then((val) async {
LoaderBottomSheet.hideLoader();
if (prescriptionVM.prescriptionPDFBase64Data.isNotEmpty) {
@ -157,7 +157,7 @@ class _PrescriptionDetailPageState extends State<PrescriptionDetailPage> {
} catch (ex) {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Cannot open file".needTranslation),
child: Utils.getErrorWidget(loadingText: "Cannot open file"),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
@ -221,7 +221,7 @@ class _PrescriptionDetailPageState extends State<PrescriptionDetailPage> {
: LocaleKeys.prescriptionDeliveryError.tr(context: context),
onPressed: () async {
if (widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported!) {
LoaderBottomSheet.showLoader(loadingText: "Fetching prescription details...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingPrescriptionDetails.tr(context: context));
await prescriptionsViewModel.getPrescriptionDetails(widget.prescriptionsResponseModel, onSuccess: (val) {
LoaderBottomSheet.hideLoader();
prescriptionsViewModel.initiatePrescriptionDelivery();

@ -54,7 +54,7 @@ class _PrescriptionReminderViewState extends State<PrescriptionReminderView> {
),
child: RadioListTile<int>(
title: Text(
"${_options[index]} minutes before".needTranslation,
"${_options[index]} ${LocaleKeys.minute.tr(context: context)}",
style: TextStyle(
fontSize: 16.h,
fontWeight: FontWeight.w500,

@ -247,7 +247,7 @@ class _PrescriptionsListPageState extends State<PrescriptionsListPage> {
: LocaleKeys.prescriptionDeliveryError.tr(context: context),
onPressed: () async {
if (prescription.isHomeMedicineDeliverySupported!) {
LoaderBottomSheet.showLoader(loadingText: "Fetching prescription details...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingPrescriptionDetails.tr(context: context));
await prescriptionsViewModel.getPrescriptionDetails(prescriptionsViewModel.patientPrescriptionOrders[index],
onSuccess: (val) {
LoaderBottomSheet.hideLoader();
@ -322,7 +322,7 @@ class _PrescriptionsListPageState extends State<PrescriptionsListPage> {
),
),
)
: Utils.getNoDataWidget(context, noDataText: "You don't have any prescriptions yet.".needTranslation);
: Utils.getNoDataWidget(context, noDataText: LocaleKeys.youDontHaveAnyPrescriptionsYet.tr(context: context));
},
).paddingSymmetrical(24.h, 0.h),
],

@ -83,7 +83,7 @@ class ProfileSettingsState extends State<ProfileSettings> {
@override
Widget build(BuildContext context) {
return CollapsingListView(
title: "Profile & Settings".needTranslation,
title: LocaleKeys.profileAndSettings.tr(context: context),
logout: () {},
isClose: true,
child: SingleChildScrollView(
@ -114,8 +114,8 @@ class ProfileSettingsState extends State<ProfileSettings> {
onAddFamilyMemberPress: () {
DialogService dialogService = getIt.get<DialogService>();
dialogService.showAddFamilyFileSheet(
label: "Add Family Member".needTranslation,
message: "Please fill the below field to add a new family member to your profile".needTranslation,
label: LocaleKeys.addFamilyMember.tr(),
message: LocaleKeys.pleaseFillBelowFieldToAddNewFamilyMember.tr(),
onVerificationPress: () {
medicalVm.addFamilyFile(otpTypeEnum: OTPTypeEnum.sms);
});
@ -149,7 +149,7 @@ class ProfileSettingsState extends State<ProfileSettings> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.wallet, width: 40.w, height: 40.h),
"Habib Wallet".needTranslation.toText16(weight: FontWeight.w600, maxlines: 2).expanded,
LocaleKeys.habibWallet.tr(context: context).toText16(weight: FontWeight.w600, maxlines: 2).expanded,
Utils.buildSvgWithAssets(icon: getIt.get<AppState>().isArabic() ? AppAssets.arrow_back : AppAssets.arrow_forward),
],
),
@ -165,7 +165,7 @@ class ProfileSettingsState extends State<ProfileSettings> {
iconSize: 22.w,
iconColor: AppColors.infoColor,
textColor: AppColors.infoColor,
text: "Recharge".needTranslation,
text: LocaleKeys.recharge.tr(context: context),
borderWidth: 0.w,
fontWeight: FontWeight.w500,
borderColor: Colors.transparent,
@ -183,9 +183,7 @@ class ProfileSettingsState extends State<ProfileSettings> {
),
],
),
"Quick Actions"
.needTranslation
.toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1)
LocaleKeys.quickActions.tr(context: context).toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1)
.paddingOnly(left: 24.w, right: 24.w),
Container(
margin: EdgeInsets.only(left: 24.w, right: 24.w, top: 16.h, bottom: 24.h),
@ -195,17 +193,15 @@ class ProfileSettingsState extends State<ProfileSettings> {
children: [
actionItem(AppAssets.language_change, LocaleKeys.language.tr(context: context), () {
showCommonBottomSheetWithoutHeight(context, title: LocaleKeys.language.tr(context: context), child: AppLanguageChange(), callBackFunc: () {}, isFullScreen: false);
}, trailingLabel: Utils.appState.isArabic() ? "العربية".needTranslation : "English".needTranslation),
}, trailingLabel: Utils.appState.isArabic() ? "العربية" : "English"),
1.divider,
actionItem(AppAssets.bell, "Notifications Settings".needTranslation, () {}),
actionItem(AppAssets.bell, LocaleKeys.notificationsSettings.tr(context: context), () {}),
1.divider,
actionItem(AppAssets.touch_face_id, "Touch ID / Face ID Services".needTranslation, () {}, switchValue: true),
actionItem(AppAssets.touch_face_id, LocaleKeys.touchIDFaceIDServices.tr(), () {}, switchValue: true),
],
),
),
"Personal Information"
.needTranslation
.toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1)
LocaleKeys.personalInformation.tr().toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1)
.paddingOnly(left: 24.w, right: 24.w),
Container(
margin: EdgeInsets.only(left: 24.w, right: 24.w, top: 16.h, bottom: 24.h),
@ -213,7 +209,7 @@ class ProfileSettingsState extends State<ProfileSettings> {
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r, hasShadow: true),
child: Column(
children: [
actionItem(AppAssets.email_transparent, "Update Email Address".needTranslation, () {}),
actionItem(AppAssets.email_transparent, LocaleKeys.updateEmailAddress.tr(), () {}),
// 1.divider,
// actionItem(AppAssets.smart_phone_fill, "Phone Number".needTranslation, () {}),
// 1.divider,
@ -223,9 +219,7 @@ class ProfileSettingsState extends State<ProfileSettings> {
],
),
),
"Help & Support"
.needTranslation
.toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1)
LocaleKeys.helpAndSupport.tr().toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1)
.paddingOnly(left: 24.w, right: 24.w),
Container(
margin: EdgeInsets.only(left: 24.w, right: 24.w, top: 16.h),
@ -237,9 +231,9 @@ class ProfileSettingsState extends State<ProfileSettings> {
launchUrl(Uri.parse("tel://" + "+966 11 525 9999"));
}, trailingLabel: "011 525 9999"),
1.divider,
actionItem(AppAssets.permission, "Permissions".needTranslation, () {}, trailingLabel: "Location, Camera"),
actionItem(AppAssets.permission, LocaleKeys.permissions.tr(), () {}, trailingLabel: "Location, Camera"),
1.divider,
actionItem(AppAssets.rate, "Rate Our App".needTranslation, () {
actionItem(AppAssets.rate, LocaleKeys.rateApp.tr(), () {
if (Platform.isAndroid) {
Utils.openWebView(
url: 'https://play.google.com/store/apps/details?id=com.ejada.hmg',
@ -251,13 +245,13 @@ class ProfileSettingsState extends State<ProfileSettings> {
}
}, isExternalLink: true),
1.divider,
actionItem(AppAssets.privacy_terms, "Privacy Policy".needTranslation, () {
actionItem(AppAssets.privacy_terms, LocaleKeys.privacyPolicy.tr(), () {
Utils.openWebView(
url: 'https://hmg.com/en/Pages/Privacy.aspx',
);
}, isExternalLink: true),
1.divider,
actionItem(AppAssets.privacy_terms, "Terms & Conditions".needTranslation, () {
actionItem(AppAssets.privacy_terms, LocaleKeys.termsConditoins.tr(context: context), () {
Utils.openWebView(
url: 'https://hmg.com/en/Pages/Terms.aspx',
);
@ -268,7 +262,7 @@ class ProfileSettingsState extends State<ProfileSettings> {
CustomButton(
height: 56.h,
icon: AppAssets.minus,
text: "Deactivate account".needTranslation,
text: LocaleKeys.deactivateAccount.tr(),
onPressed: () {},
).paddingAll(24.w),
],
@ -363,7 +357,7 @@ class FamilyCardWidget extends StatelessWidget {
runSpacing: 4.h,
children: [
AppCustomChipWidget(
labelText: "${profile.age} Years Old".needTranslation,
labelText: LocaleKeys.ageYearsOld.tr(namedArgs: {'age': profile.age.toString(), 'yearsOld': LocaleKeys.yearsOld.tr(context: context)}),
),
isActive && appState.getAuthenticatedUser()!.bloodGroup != null
? AppCustomChipWidget(
@ -396,17 +390,17 @@ class FamilyCardWidget extends StatelessWidget {
if (isLoading) {
icon = AppAssets.cancel_circle_icon;
labelText = "Insurance".needTranslation;
labelText = LocaleKeys.insurance.tr(context: context);
iconColor = AppColors.primaryRedColor;
backgroundColor = AppColors.primaryRedColor;
} else if (isExpired) {
icon = AppAssets.cancel_circle_icon;
labelText = "Insurance Expired".needTranslation;
labelText = LocaleKeys.insuranceExpired.tr(context: context);
iconColor = AppColors.primaryRedColor;
backgroundColor = AppColors.primaryRedColor.withValues(alpha: 0.15);
} else {
icon = AppAssets.insurance_active_icon;
labelText = "Insurance Active".needTranslation;
labelText = LocaleKeys.insuranceActive.tr(context: context);
iconColor = AppColors.successColor;
backgroundColor = AppColors.successColor.withValues(alpha: 0.15);
}
@ -451,7 +445,7 @@ class FamilyCardWidget extends StatelessWidget {
return CustomButton(
icon: canSwitch ? AppAssets.switch_user : AppAssets.add_family,
text: canSwitch ? "Switch Family File".needTranslation : "Add a new family member".needTranslation,
text: canSwitch ? LocaleKeys.switchFamilyFile.tr() : LocaleKeys.addANewFamilyMember.tr(),
onPressed: canSwitch ? () => onFamilySwitchPress(profile) : onAddFamilyMemberPress,
backgroundColor: canSwitch ? AppColors.secondaryLightRedColor : AppColors.primaryRedColor,
borderColor: canSwitch ? AppColors.secondaryLightRedColor : AppColors.primaryRedColor,
@ -467,7 +461,7 @@ class FamilyCardWidget extends StatelessWidget {
return CustomButton(
icon: AppAssets.switch_user,
text: canSwitchBack ? "Switch Back To Family File".needTranslation : "Switch".needTranslation,
text: canSwitchBack ? LocaleKeys.switchBackFamilyFile.tr() : LocaleKeys.switchLogin.tr(),
backgroundColor: canSwitchBack ? AppColors.primaryRedColor : Colors.grey.shade200,
borderColor: canSwitchBack ? AppColors.primaryRedColor : Colors.grey.shade200,
textColor: canSwitchBack ? AppColors.whiteColor : AppColors.greyTextColor,

@ -73,7 +73,7 @@ class FamilyCardWidget extends StatelessWidget {
runSpacing: 4.h,
children: [
AppCustomChipWidget(
labelText: "${profile.age} Years Old".needTranslation,
labelText: "${profile.age} ${LocaleKeys.yearsOld.tr(context: context)}",
),
isActive && appState.getAuthenticatedUser()!.bloodGroup != null
? AppCustomChipWidget(
@ -106,17 +106,17 @@ class FamilyCardWidget extends StatelessWidget {
if (isLoading) {
icon = AppAssets.cancel_circle_icon;
labelText = "Insurance".needTranslation;
labelText = LocaleKeys.insurance.tr(context: context);
iconColor = AppColors.primaryRedColor;
backgroundColor = AppColors.primaryRedColor;
} else if (isExpired) {
icon = AppAssets.cancel_circle_icon;
labelText = "Insurance Expired".needTranslation;
labelText = LocaleKeys.insuranceExpired.tr(context: context);
iconColor = AppColors.primaryRedColor;
backgroundColor = AppColors.primaryRedColor.withValues(alpha: 0.15);
} else {
icon = AppAssets.insurance_active_icon;
labelText = "Insurance Active".needTranslation;
labelText = LocaleKeys.insuranceActive.tr(context: context);
iconColor = AppColors.successColor;
backgroundColor = AppColors.successColor.withValues(alpha: 0.15);
}
@ -161,7 +161,7 @@ class FamilyCardWidget extends StatelessWidget {
return CustomButton(
icon: canSwitch ? AppAssets.switch_user : AppAssets.add_family,
text: canSwitch ? "Switch Family File".needTranslation : "Add a new family member".needTranslation,
text: canSwitch ? LocaleKeys.switchAccount.tr() : LocaleKeys.addANewFamilyMember.tr(),
onPressed: canSwitch ? () => onFamilySwitchPress(profile) : onAddFamilyMemberPress,
backgroundColor: canSwitch ? AppColors.secondaryLightRedColor : AppColors.primaryRedColor,
borderColor: canSwitch ? AppColors.secondaryLightRedColor : AppColors.primaryRedColor,
@ -177,7 +177,7 @@ class FamilyCardWidget extends StatelessWidget {
return CustomButton(
icon: AppAssets.switch_user,
text: canSwitchBack ? "Switch Back To Family File".needTranslation : "Switch".needTranslation,
text: canSwitchBack ? LocaleKeys.switchBackFamilyFile.tr() : LocaleKeys.switchLogin.tr(),
backgroundColor: canSwitchBack ? AppColors.primaryRedColor : Colors.grey.shade200,
borderColor: canSwitchBack ? AppColors.primaryRedColor : Colors.grey.shade200,
textColor: canSwitchBack ? AppColors.whiteColor : AppColors.greyTextColor,

@ -179,7 +179,7 @@ class _RadiologyOrdersPageState extends State<RadiologyOrdersPage> {
}
if (model.patientRadiologyOrdersViewList.isEmpty) {
return Utils.getNoDataWidget(ctx, noDataText: "You don't have any radiology results yet.".needTranslation);
return Utils.getNoDataWidget(ctx, noDataText: LocaleKeys.youDontHaveRadiologyOrders.tr(context: context));
}
return ListView.builder(
@ -239,7 +239,7 @@ class _RadiologyOrdersPageState extends State<RadiologyOrdersPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppCustomChipWidget(labelText: "${group.length} ${'results'.needTranslation}"),
AppCustomChipWidget(labelText: "${group.length} ${LocaleKeys.results.tr(context: context)}"),
Icon(isExpanded ? Icons.expand_less : Icons.expand_more),
],
),
@ -323,7 +323,7 @@ class _RadiologyOrdersPageState extends State<RadiologyOrdersPage> {
icon: AppAssets.view_report_icon,
iconColor: AppColors.primaryRedColor,
iconSize: 16.h,
text: "View Results".needTranslation,
text: LocaleKeys.viewResults.tr(context: context),
onPressed: () {
model.navigationService.push(
CustomPageRoute(

@ -1,5 +1,6 @@
import 'dart:async';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
@ -10,6 +11,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/features/radiology/models/resp_models/patient_radiology_response_model.dart';
import 'package:hmg_patient_app_new/features/radiology/radiology_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@ -49,7 +51,7 @@ class _RadiologyResultPageState extends State<RadiologyResultPage> {
children: [
Expanded(
child: CollapsingListView(
title: "Radiology Result".needTranslation,
title: LocaleKeys.radiologyResult.tr(context: context),
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24.h),
@ -72,13 +74,13 @@ class _RadiologyResultPageState extends State<RadiologyResultPage> {
widget.patientRadiologyResponseModel.reportData!.trim().toText12(isBold: true, color: AppColors.textColorLight),
SizedBox(height: 16.h),
CustomButton(
text: "View Radiology Image".needTranslation,
text: LocaleKeys.viewRadiologyImage.tr(context: context),
onPressed: () async {
if (radiologyViewModel.radiologyImageURL.isNotEmpty) {
Uri uri = Uri.parse(radiologyViewModel.radiologyImageURL);
launchUrl(uri, mode: LaunchMode.platformDefault, webOnlyWindowName: "");
} else {
Utils.showToast("Radiology image not available".needTranslation);
Utils.showToast("Radiology image not available");
}
},
backgroundColor: AppColors.primaryRedColor,
@ -111,7 +113,7 @@ class _RadiologyResultPageState extends State<RadiologyResultPage> {
hasShadow: true,
),
child: CustomButton(
text: "Download report".needTranslation,
text: LocaleKeys.downloadReport.tr(context: context),
onPressed: () async {
LoaderBottomSheet.showLoader();
await radiologyViewModel.getRadiologyPDF(patientRadiologyResponseModel: widget.patientRadiologyResponseModel, authenticatedUser: _appState.getAuthenticatedUser()!, onError: (err) {
@ -132,7 +134,7 @@ class _RadiologyResultPageState extends State<RadiologyResultPage> {
} catch (ex) {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Cannot open file".needTranslation),
child: Utils.getErrorWidget(loadingText: "Cannot open file"),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
@ -5,6 +6,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/features/my_appointments/appointment_rating_view_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/rate_appointment/widget/doctor_row.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@ -77,9 +79,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Rate Clinic".needTranslation.toText16(isBold: true),
LocaleKeys.rateClinic.tr(context: context).toText16(isBold: true),
SizedBox(height: 12),
Row(
mainAxisAlignment: MainAxisAlignment.center,
@ -147,13 +147,13 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
children: [
Expanded(
child: CustomButton(
text: "Back".needTranslation,
text: LocaleKeys.back.tr(context: context),
backgroundColor: Color(0xffFEE9EA),
borderColor: Color(0xffFEE9EA),
textColor: Color(0xffED1C2B),
onPressed: () {
appointmentRatingViewModel!.setTitle("Rate Doctor".needTranslation);
appointmentRatingViewModel!.setSubTitle("How was your last visit with doctor?".needTranslation);
appointmentRatingViewModel!.setTitle(LocaleKeys.rateDoctor.tr(context: context));
appointmentRatingViewModel!.setSubTitle(LocaleKeys.howWasYourLastVisitWithDoctor.tr(context: context));
appointmentRatingViewModel!.setClinicOrDoctor(false);
setState(() {
@ -164,7 +164,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
SizedBox(width: 10),
Expanded(
child: CustomButton(
text: "Submit".needTranslation,
text: LocaleKeys.submit.tr(context: context),
onPressed: () {
submitRating();

@ -1,9 +1,11 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.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/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/my_appointments/appointment_rating_view_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/rate_appointment/rate_appointment_clinic.dart';
import 'package:hmg_patient_app_new/presentation/rate_appointment/widget/doctor_row.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
@ -88,9 +90,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Please rate the doctor".needTranslation.toText16(isBold: true),
"Please rate the doctor".toText16(isBold: true),
SizedBox(height: 12),
Row(
mainAxisAlignment: MainAxisAlignment.center,
@ -142,7 +142,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
maxLines: 4,
decoration: InputDecoration.collapsed(
hintText: "Notes".needTranslation,
hintText: LocaleKeys.notes.tr(context: context),
hintStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
@ -172,7 +172,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
children: [
Expanded(
child: CustomButton(
text: "Later".needTranslation,
text: "Later",
backgroundColor: Color(0xffFEE9EA),
borderColor: Color(0xffFEE9EA),
textColor: Color(0xffED1C2B),
@ -184,11 +184,11 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
SizedBox(width: 10),
Expanded(
child: CustomButton(
text: "Next".needTranslation,
text: LocaleKeys.next.tr(context: context),
onPressed: () {
// Set up clinic rating and show clinic rating view
appointmentRatingViewModel!.setTitle("Rate Clinic".needTranslation);
appointmentRatingViewModel!.setSubTitle("How was your appointment?".needTranslation);
appointmentRatingViewModel!.setTitle(LocaleKeys.rateDoctor.tr(context: context),);
appointmentRatingViewModel!.setSubTitle(LocaleKeys.howWasYourLastVisitWithDoctor.tr(context: context),);
appointmentRatingViewModel!.setClinicOrDoctor(true);
setState(() {});

@ -38,7 +38,7 @@ class SmartwatchInstructionsPage extends StatelessWidget {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Supported Smart Watches".needTranslation.toText20(isBold: true),
LocaleKeys.supportedSmartWatches.tr().toText20(isBold: true),
SizedBox(height: 16.h),
Row(
children: [
@ -161,15 +161,15 @@ class SmartwatchInstructionsPage extends StatelessWidget {
),
),
SizedBox(height: 12),
"Please make sure that your Samsung Watch is connected to your Phone, is actively synced & updated.".needTranslation.toText14(isBold: true),
SizedBox(height: 12),
"Before syncing data, please make sure that you have followed the instructions properly.".needTranslation.toText14(isBold: true),
LocaleKeys.pleaseMakeSureSamsungWatchConnected.tr().toText14(isBold: true),
SizedBox(height: 8.h),
LocaleKeys.beforeSyncingDataFollowInstructions.tr().toText14(isBold: true),
SizedBox(height: 12),
InkWell(
onTap: () {
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(
height: 130.h,
),
@ -186,7 +186,7 @@ class SmartwatchInstructionsPage extends StatelessWidget {
);
} else {
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: () {
Navigator.pop(context);
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 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:health/health.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';
class HealthMetricInfo {
@ -39,7 +41,7 @@ class HealthMetrics {
unit: 'BPM',
color: AppColors.primaryRedColor,
icon: Icons.favorite,
description: "Your heart rate indicates how many times your heart beats per minute".needTranslation,
description: LocaleKeys.heartRateDescription.tr(),
minHealthyValue: 60,
maxHealthyValue: 100,
svgIcon: "assets/images/smartwatches/heartrate_icon.svg"),
@ -51,7 +53,7 @@ class HealthMetrics {
// color: Colors.blue,
color: Color(0xff3A3558),
icon: Icons.air,
description: "Blood oxygen level indicates how much oxygen your red blood cells are carrying".needTranslation,
description: LocaleKeys.bloodOxygenDescription.tr(),
minHealthyValue: 95,
maxHealthyValue: 100,
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:hmg_patient_app_new/core/app_assets.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/widget_extensions.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/presentation/symptoms_checker/widgets/interactive_body_widget.dart';
import 'package:hmg_patient_app_new/services/dialog_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
@ -38,11 +40,11 @@ class _OrganSelectorPageState extends State<OrganSelectorPage> {
void _onNextPressed(SymptomsCheckerViewModel viewModel) async {
if (!viewModel.validateSelection()) {
dialogService.showErrorBottomSheet(
message: 'Please select at least one organ'.needTranslation,
message: LocaleKeys.noOrgansSelected.tr(context: context),
);
return;
}
LoaderBottomSheet.showLoader(loadingText: "Please wait".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.pleaseWait.tr(context: context),);
final String userName = 'guest_user';
final String password = '123456';
@ -112,7 +114,7 @@ class _OrganSelectorPageState extends State<OrganSelectorPage> {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Text(
"Organ Selector".needTranslation,
LocaleKeys.organSelector.tr(context: context),
style: TextStyle(
color: AppColors.textColor,
fontSize: 22.f,
@ -249,7 +251,7 @@ class _OrganSelectorPageState extends State<OrganSelectorPage> {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Text(
'Selected Organs'.needTranslation,
LocaleKeys.selectedOrgans.tr(context: context),
style: TextStyle(
fontSize: 16.f,
fontWeight: FontWeight.w600,
@ -264,7 +266,7 @@ class _OrganSelectorPageState extends State<OrganSelectorPage> {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Text(
'No organs selected yet'.needTranslation,
LocaleKeys.noOrgansSelected.tr(context: context),
style: TextStyle(
color: AppColors.greyTextColor,
fontSize: 14.f,
@ -301,7 +303,7 @@ class _OrganSelectorPageState extends State<OrganSelectorPage> {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: CustomButton(
text: 'Next'.needTranslation,
text: LocaleKeys.next.tr(context: context),
onPressed: () => _onNextPressed(viewModel),
isDisabled: viewModel.selectedOrgans.isEmpty,
backgroundColor: AppColors.primaryRedColor,

@ -51,7 +51,7 @@ class PossibleConditionsPage extends StatelessWidget {
child: Padding(
padding: EdgeInsets.all(24.h),
child: Text(
'No Predictions available'.needTranslation,
LocaleKeys.noPredictionsAvailable.tr(context: context),
style: TextStyle(
fontSize: 16.h,
color: AppColors.greyTextColor,
@ -102,7 +102,7 @@ class PossibleConditionsPage extends StatelessWidget {
title: LocaleKeys.notice.tr(context: context),
context,
child: Utils.getWarningWidget(
loadingText: "Are you sure you want to restart the organ selection?".needTranslation,
loadingText: LocaleKeys.areYouSureYouWantToRestartOrganSelection.tr(context: context),
isShowActionButtons: true,
onCancelTap: () => Navigator.pop(context),
onConfirmTap: () => onConfirm(),
@ -161,7 +161,7 @@ class PossibleConditionsPage extends StatelessWidget {
return Scaffold(
backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView(
title: "Possible Conditions".needTranslation,
title: LocaleKeys.possibleConditions.tr(context: context),
trailing: _buildTrailingSection(context),
child: Consumer<SymptomsCheckerViewModel>(
builder: (context, symptomsCheckerViewModel, child) {

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -8,6 +9,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/widget_extensions.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/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
@ -44,7 +46,7 @@ class _RiskFactorsScreenState extends State<RiskFactorsScreen> {
context.navigateWithName(AppRoutes.suggestionsPage);
} else {
dialogService.showErrorBottomSheet(
message: 'Please select at least one risk before proceeding'.needTranslation,
message: LocaleKeys.pleaseSelectAtLeastOneRiskBeforeProceeding.tr(context: context),
);
}
}
@ -121,11 +123,10 @@ class _RiskFactorsScreenState extends State<RiskFactorsScreen> {
),
children: [
TextSpan(
text: "Above you see the most common risk factors. Although /diagnosis may return questions about risk factors, "
.needTranslation,
text: LocaleKeys.aboveYouSeeCommonRiskFactors.tr(context: context),
),
TextSpan(
text: "read more".needTranslation,
text: LocaleKeys.readMore.tr(context: context),
style: TextStyle(
color: AppColors.primaryRedColor,
fontWeight: FontWeight.w500,
@ -216,7 +217,7 @@ class _RiskFactorsScreenState extends State<RiskFactorsScreen> {
children: [
Expanded(
child: CollapsingListView(
title: "Risk Factors".needTranslation,
title: LocaleKeys.riskFactors.tr(context: context),
leadingCallback: () => context.pop(),
child: viewModel.isRiskFactorsLoading
? _buildLoadingShimmer()
@ -249,7 +250,7 @@ class _RiskFactorsScreenState extends State<RiskFactorsScreen> {
Icon(Icons.info_outline, size: 64.h, color: AppColors.greyTextColor),
SizedBox(height: 16.h),
Text(
'No risk factors found'.needTranslation,
LocaleKeys.noRiskFactorsFound.tr(context: context),
style: TextStyle(
fontSize: 18.f,
fontWeight: FontWeight.w600,
@ -258,7 +259,7 @@ class _RiskFactorsScreenState extends State<RiskFactorsScreen> {
),
SizedBox(height: 8.h),
Text(
'Based on your selected symptoms, no additional risk factors were identified.'.needTranslation,
LocaleKeys.basedOnYourSelectedSymptomsNoRiskFactors.tr(context: context),
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 14.f,
@ -282,7 +283,7 @@ class _RiskFactorsScreenState extends State<RiskFactorsScreen> {
children: [
Expanded(
child: CustomButton(
text: "Previous".needTranslation,
text: LocaleKeys.previous.tr(context: context),
onPressed: _onPreviousPressed,
backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.11),
borderColor: Colors.transparent,
@ -293,7 +294,7 @@ class _RiskFactorsScreenState extends State<RiskFactorsScreen> {
SizedBox(width: 12.w),
Expanded(
child: CustomButton(
text: "Next".needTranslation,
text: LocaleKeys.next.tr(context: context),
onPressed: () => _onNextPressed(viewModel),
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.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/widget_extensions.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/theme/colors.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);
} else {
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: [
Expanded(
child: CollapsingListView(
title: "Suggestions".needTranslation,
title: LocaleKeys.suggestions.tr(),
leadingCallback: () => context.pop(),
child: viewModel.isSuggestionsLoading
? _buildLoadingShimmer()
@ -225,7 +227,7 @@ class _SuggestionsScreenState extends State<SuggestionsScreen> {
Icon(Icons.info_outline, size: 64.h, color: AppColors.greyTextColor),
SizedBox(height: 16.h),
Text(
'No organs selected'.needTranslation,
LocaleKeys.noOrgansSelected.tr(),
style: TextStyle(
fontSize: 18.f,
fontWeight: FontWeight.w600,
@ -234,7 +236,7 @@ class _SuggestionsScreenState extends State<SuggestionsScreen> {
),
SizedBox(height: 8.h),
Text(
'Please go back and select organs first'.needTranslation,
LocaleKeys.pleaseGoBackAndSelectOrgansFirst.tr(),
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 14.f,
@ -258,7 +260,7 @@ class _SuggestionsScreenState extends State<SuggestionsScreen> {
children: [
Expanded(
child: CustomButton(
text: "Previous".needTranslation,
text: LocaleKeys.previous.tr(),
onPressed: _onPreviousPressed,
backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.11),
borderColor: Colors.transparent,
@ -269,7 +271,7 @@ class _SuggestionsScreenState extends State<SuggestionsScreen> {
SizedBox(width: 12.w),
Expanded(
child: CustomButton(
text: "Next".needTranslation,
text: LocaleKeys.next.tr(),
onPressed: () => _onNextPressed(viewModel),
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,

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

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

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.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/widget_extensions.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/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@ -149,20 +151,20 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
viewModel.selectedWeight == null;
// 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)
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 =
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 =
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(
children: [
Expanded(
child: CollapsingListView(
title: "Symptoms Checker".needTranslation,
title: LocaleKeys.symptomsChecker.tr(context: context),
isLeading: true,
child: SingleChildScrollView(
child: Column(
@ -173,7 +175,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
padding: EdgeInsets.symmetric(vertical: 24.h, horizontal: 16.w),
child: Column(
children: [
"Hello $name, Is your information up to date?".needTranslation.toText16(
LocaleKeys.helloIsYourInformationUpToDate.tr(namedArgs: {'name': name}).toText16(
weight: FontWeight.w600,
color: AppColors.textColor,
),
@ -181,7 +183,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
_buildEditInfoTile(
context: context,
leadingIcon: AppAssets.genderIcon,
title: "Gender".needTranslation,
title: LocaleKeys.gender.tr(context: context),
subTitle: genderText,
onTap: () {
viewModel.setUserInfoPage(0, isSinglePageEdit: true);
@ -193,7 +195,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
_buildEditInfoTile(
context: context,
leadingIcon: AppAssets.calendarGrey,
title: "Age".needTranslation,
title: LocaleKeys.age.tr(context: context),
subTitle: ageText,
iconColor: AppColors.greyTextColor,
onTap: () {
@ -206,7 +208,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
_buildEditInfoTile(
context: context,
leadingIcon: AppAssets.rulerIcon,
title: "Height".needTranslation,
title: LocaleKeys.height.tr(context: context),
subTitle: heightText,
onTap: () {
viewModel.setUserInfoPage(2, isSinglePageEdit: true);
@ -218,7 +220,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
_buildEditInfoTile(
context: context,
leadingIcon: AppAssets.weightScale,
title: "Weight".needTranslation,
title: LocaleKeys.weight.tr(context: context),
subTitle: weightText,
onTap: () {
viewModel.setUserInfoPage(3, isSinglePageEdit: true);
@ -255,7 +257,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
children: [
Expanded(
child: CustomButton(
text: "No, Edit all".needTranslation,
text: LocaleKeys.noEditAll.tr(context: context),
icon: AppAssets.edit_icon,
iconColor: AppColors.primaryRedColor,
onPressed: () {
@ -271,7 +273,7 @@ class _UserInfoSelectionScreenState extends State<UserInfoSelectionScreen> {
SizedBox(width: 12.w),
Expanded(
child: CustomButton(
text: "Yes, It is".needTranslation,
text: LocaleKeys.yesItIs.tr(context: context),
icon: AppAssets.tickIcon,
iconColor: hasEmptyFields ? AppColors.greyTextColor : AppColors.whiteColor,
onPressed: hasEmptyFields

@ -1,8 +1,10 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/cupertino.dart';
import 'package:hmg_patient_app_new/core/app_export.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/symptoms_checker/symptoms_checker_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/symptoms_checker/user_info_selection/widgets/custom_date_picker.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:provider/provider.dart';
@ -25,7 +27,7 @@ class AgeSelectionPage extends StatelessWidget {
builder: (BuildContext context, symptomsViewModel, Widget? child) {
return Column(
children: [
"What is your Date of Birth?".needTranslation.toText18(weight: FontWeight.w600, color: AppColors.textColor).paddingAll(24.w),
LocaleKeys.dateOfBirthSymptoms.tr(context: context).toText18(weight: FontWeight.w600, color: AppColors.textColor).paddingAll(24.w),
SizedBox(height: 30.h),
ThreeColumnDatePicker(
enableHaptic: true,

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_export.dart';
@ -5,6 +6,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/widget_extensions.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:provider/provider.dart';
@ -48,21 +50,21 @@ class GenderSelectionPage extends StatelessWidget {
builder: (BuildContext context, symptomsViewModel, Widget? child) {
return Column(
children: [
"What is your gender?".needTranslation.toText18(weight: FontWeight.w600, color: AppColors.textColor),
LocaleKeys.genderSymptoms.tr(context: context).toText18(weight: FontWeight.w600, color: AppColors.textColor),
SizedBox(height: 70.h),
Row(
children: [
Expanded(
child: InkWell(
onTap: () => onGenderSelected(genders[0]),
child: _buildGenderOption(AppAssets.maleIcon, "Male".needTranslation, symptomsViewModel.selectedGender == genders[0]),
child: _buildGenderOption(AppAssets.maleIcon, LocaleKeys.malE.tr(context: context), symptomsViewModel.selectedGender == genders[0]),
),
),
SizedBox(width: 16.w),
Expanded(
child: InkWell(
onTap: () => onGenderSelected(genders[1]),
child: _buildGenderOption(AppAssets.femaleIcon, "Female".needTranslation, symptomsViewModel.selectedGender == genders[1]),
child: _buildGenderOption(AppAssets.femaleIcon, LocaleKeys.femaleGender.tr(context: context), symptomsViewModel.selectedGender == genders[1]),
))
],
),

@ -1,10 +1,12 @@
import 'dart:developer';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_export.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/symptoms_checker/symptoms_checker_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/symptoms_checker/user_info_selection/widgets/height_scale.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:provider/provider.dart';
@ -107,7 +109,7 @@ class HeightSelectionPage extends StatelessWidget {
SizedBox(height: 24.h),
Center(
child: Text(
'How tall are you?'.needTranslation,
LocaleKeys.heightSymptoms.tr(context: context),
style: TextStyle(fontSize: 18.f, fontWeight: FontWeight.w600, color: AppColors.textColor),
),
),

@ -1,10 +1,12 @@
import 'dart:developer';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_export.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/symptoms_checker/symptoms_checker_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/symptoms_checker/user_info_selection/widgets/weight_scale.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:provider/provider.dart';
@ -113,7 +115,7 @@ class WeightSelectionPage extends StatelessWidget {
SizedBox(height: 24.h),
Center(
child: Text(
'What is your weight?'.needTranslation,
LocaleKeys.weightSymptoms.tr(context: context),
style: TextStyle(fontSize: 18.f, fontWeight: FontWeight.w600, color: AppColors.textColor),
),
),

@ -1,10 +1,12 @@
import 'dart:developer';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_export.dart';
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/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/presentation/symptoms_checker/user_info_selection/pages/age_selection_page.dart';
import 'package:hmg_patient_app_new/presentation/symptoms_checker/user_info_selection/pages/gender_selection_page.dart';
import 'package:hmg_patient_app_new/presentation/symptoms_checker/user_info_selection/pages/height_selection_page.dart';
@ -184,7 +186,7 @@ class _UserInfoFlowManagerState extends State<UserInfoFlowManager> {
child: isSingleEdit
? // Single page edit mode - show only Save button
CustomButton(
text: "Save".needTranslation,
text: LocaleKeys.save.tr(context: context),
onPressed: _onNext,
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
@ -197,7 +199,7 @@ class _UserInfoFlowManagerState extends State<UserInfoFlowManager> {
if (!isFirstPage) ...[
Expanded(
child: CustomButton(
text: "Previous".needTranslation,
text: LocaleKeys.previous.tr(context: context),
onPressed: _onPrevious,
backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.11),
borderColor: Colors.transparent,
@ -209,7 +211,7 @@ class _UserInfoFlowManagerState extends State<UserInfoFlowManager> {
],
Expanded(
child: CustomButton(
text: isLastPage ? "Submit".needTranslation : "Next".needTranslation,
text: isLastPage ? LocaleKeys.submit.tr(context: context) : LocaleKeys.next.tr(context: context),
onPressed: _onNext,
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
@ -233,7 +235,7 @@ class _UserInfoFlowManagerState extends State<UserInfoFlowManager> {
Expanded(
child: CollapsingListView(
physics: NeverScrollableScrollPhysics(),
title: _pageTitles[_viewModel.userInfoCurrentPage].needTranslation,
title: _pageTitles[_viewModel.userInfoCurrentPage],
isLeading: true,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,

@ -1,9 +1,11 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.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/enums.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/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/symptoms_checker/widgets/custom_progress_bar.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@ -156,12 +158,12 @@ class ConditionCard extends StatelessWidget {
),
_buildSymptomsRow(),
SizedBox(height: 16.h),
Text("Description".needTranslation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14.f, color: AppColors.textColor)),
Text(LocaleKeys.description.tr(context: context), style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14.f, color: AppColors.textColor)),
SizedBox(height: 2.h),
Text(description, style: TextStyle(color: AppColors.greyTextColor, fontWeight: FontWeight.w500, fontSize: 12.f)),
if (possibleConditionsSeverityEnum == PossibleConditionsSeverityEnum.emergency)
CustomButton(
text: appointmentLabel ?? "Book Appointment".needTranslation,
text: appointmentLabel ?? LocaleKeys.bookAppointment.tr(context: context),
onPressed: () {
if (onActionPressed != null) {
onActionPressed!();

@ -1,8 +1,10 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.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/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/features/symptoms_checker/models/organ_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/widgets/chip/app_custom_chip_widget.dart';
@ -52,7 +54,7 @@ class _SelectedOrgansSectionState extends State<SelectedOrgansSection> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'Selected Organs'.needTranslation,
LocaleKeys.selectedOrgans.tr(context: context),
style: TextStyle(
fontSize: 16.f,
fontWeight: FontWeight.w600,
@ -101,7 +103,7 @@ class _SelectedOrgansSectionState extends State<SelectedOrgansSection> {
Padding(
padding: EdgeInsets.symmetric(vertical: 8.h),
child: Text(
'No organs selected yet'.needTranslation,
LocaleKeys.noOrgansSelected.tr(context: context),
style: TextStyle(
color: AppColors.greyTextColor,
fontSize: 14.f,

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

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

@ -1,6 +1,7 @@
import 'dart:async';
import 'dart:developer';
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_state.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/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/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/widgets/ancillary_orders_list.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) {
appState = getIt.get<AppState>();
return CollapsingListView(
title: "Ancillary Orders".needTranslation,
title: LocaleKeys.ancillaryOrdersList.tr(context: context),
isLeading: true,
child: SingleChildScrollView(
child: Column(

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

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -9,6 +10,7 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/hmg_services/hmg_services_view_model.dart';
import 'package:hmg_patient_app_new/features/hmg_services/models/resq_models/vital_sign_respo_model.dart';
import 'package:hmg_patient_app_new/features/hmg_services/models/ui_models/vital_sign_ui_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/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/graph/custom_graph.dart';
@ -62,7 +64,7 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
@override
Widget build(BuildContext context) {
return CollapsingListView(
title: 'Vital Sign Details'.needTranslation,
title: LocaleKeys.vitalSignDetails.tr(context: context),
child: Consumer<HmgServicesViewModel>(
builder: (context, viewModel, child) {
final latest = viewModel.vitalSignList.isNotEmpty ? viewModel.vitalSignList.first : null;
@ -128,8 +130,8 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
),
SizedBox(height: 8.h),
(latestDate != null
? ('Result of ${latestDate.toString().split(' ').first}'.needTranslation)
: ('Result of --'.needTranslation))
? LocaleKeys.resultOf.tr(namedArgs: {'date': latestDate.toString().split(' ').first})
: LocaleKeys.resultOfNoDate.tr(context: context))
.toText11(weight: FontWeight.w500, color: AppColors.greyTextColor),
],
),
@ -185,13 +187,23 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
String _referenceText(BuildContext context) {
if (args.low != null && args.high != null) {
return 'Reference range: ${args.low} ${args.high} ${args.unit}'.needTranslation;
return LocaleKeys.referenceRangeBetween.tr(namedArgs: {
'low': args.low.toString(),
'high': args.high.toString(),
'unit': args.unit ?? ''
});
}
if (args.low != null) {
return 'Reference range: ≥ ${args.low} ${args.unit}'.needTranslation;
return LocaleKeys.referenceRangeMin.tr(namedArgs: {
'low': args.low.toString(),
'unit': args.unit ?? ''
});
}
if (args.high != null) {
return 'Reference range: ≤ ${args.high} ${args.unit}'.needTranslation;
return LocaleKeys.referenceRangeMax.tr(namedArgs: {
'high': args.high.toString(),
'unit': args.unit ?? ''
});
}
return '';
}
@ -208,7 +220,7 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 8.h,
children: [
'What is this result?'.needTranslation.toText16(weight: FontWeight.w600, color: AppColors.textColor),
LocaleKeys.whatIsThisResult.tr(context: context).toText16(weight: FontWeight.w600, color: AppColors.textColor),
_descriptionText(context).toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
],
),
@ -243,7 +255,7 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
_isGraphVisible ? 'History flowchart'.needTranslation : 'History'.needTranslation,
_isGraphVisible ? LocaleKeys.historyFlowchart.tr(context: context) : LocaleKeys.history.tr(context: context),
style: TextStyle(
fontSize: 16,
fontFamily: 'Poppins',
@ -288,7 +300,7 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
).paddingOnly(bottom: _isGraphVisible ? 16.h : 24.h),
if (history.isEmpty)
Utils.getNoDataWidget(context, noDataText: 'No history available'.needTranslation, isSmallWidget: true)
Utils.getNoDataWidget(context, noDataText: LocaleKeys.noHistoryAvailable.tr(context: context), isSmallWidget: true)
else if (_isGraphVisible)
_buildHistoryGraph(history, secondaryHistory: secondaryHistory)
else
@ -649,38 +661,38 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
String _descriptionText(BuildContext context) {
switch (args.metric) {
case VitalSignMetric.bmi:
return 'BMI is a measurement based on height and weight that estimates body fat.'.needTranslation;
return LocaleKeys.bmiDescription.tr(context: context);
case VitalSignMetric.height:
return 'Height is measured in centimeters and is used to calculate BMI and dosage recommendations.'.needTranslation;
return LocaleKeys.heightDescription.tr(context: context);
case VitalSignMetric.weight:
return 'Weight helps track overall health, nutrition, and changes over time.'.needTranslation;
return LocaleKeys.weightDescription.tr(context: context);
case VitalSignMetric.bloodPressure:
return 'Blood pressure reflects the force of blood against artery walls. It is shown as systolic/diastolic.'.needTranslation;
return LocaleKeys.bloodPressureDescription.tr(context: context);
case VitalSignMetric.temperature:
return 'Body temperature reflects how hot your body is and may change with infection or inflammation.'.needTranslation;
return LocaleKeys.temperatureDescription.tr(context: context);
case VitalSignMetric.heartRate:
return 'Heart rate refers to the number of heart beats per minute.'.needTranslation;
return LocaleKeys.heartRateDescriptionVital.tr(context: context);
case VitalSignMetric.respiratoryRate:
return 'Respiratory rate is the number of breaths taken per minute.'.needTranslation;
return LocaleKeys.respiratoryRateDescription.tr(context: context);
}
}
String _nextStepsText(BuildContext context) {
switch (args.metric) {
case VitalSignMetric.bmi:
return 'Maintain a balanced diet and regular activity. If your BMI is high or low, consider consulting your doctor.'.needTranslation;
return LocaleKeys.bmiAdvice.tr(context: context);
case VitalSignMetric.height:
return 'No action is needed unless your measurement looks incorrect. Update it during your next visit.'.needTranslation;
return LocaleKeys.heightAdvice.tr(context: context);
case VitalSignMetric.weight:
return 'Monitor weight changes. Sudden gain or loss may require medical advice.'.needTranslation;
return LocaleKeys.weightAdvice.tr(context: context);
case VitalSignMetric.bloodPressure:
return 'Keep tracking your blood pressure. High or low readings should be discussed with your doctor.'.needTranslation;
return LocaleKeys.bloodPressureAdvice.tr(context: context);
case VitalSignMetric.temperature:
return 'If you have a persistent fever or symptoms, contact your healthcare provider.'.needTranslation;
return LocaleKeys.temperatureAdvice.tr(context: context);
case VitalSignMetric.heartRate:
return 'Track your heart rate trends. If you feel dizziness or chest pain, seek medical care.'.needTranslation;
return LocaleKeys.heartRateAdvice.tr(context: context);
case VitalSignMetric.respiratoryRate:
return 'If you notice shortness of breath or abnormal breathing, seek medical advice.'.needTranslation;
return LocaleKeys.respiratoryRateAdvice.tr(context: context);
}
}
@ -695,7 +707,7 @@ class _VitalSignDetailsPageState extends State<VitalSignDetailsPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
'What should I do next?'.needTranslation.toText16(weight: FontWeight.w600),
LocaleKeys.whatShouldIDoNext.tr(context: context).toText16(weight: FontWeight.w600),
SizedBox(height: 8.h),
_nextStepsText(context).toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500, maxLine: 10),
],

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save