dev_sultan
Sultan khan 2 months ago
commit 7d8537fae6

@ -525,7 +525,7 @@
"payOnline": "الدفع عبر الإنترنت",
"cancelOrder": "إلغاء الطلب",
"confirmAddress": "تأكيد العنوان ",
"confirmLocation": "<EFBFBD><EFBFBD>أكيد الموقع ",
"confirmLocation": "أكيد الموقع ",
"conditionsHMG": "الشروط والأحكام ",
"conditions": "الشروط والأحكام لكوم",
"confirmDeleteMsg": "هل أنت متأكد! تريد الحذف ",
@ -694,11 +694,7 @@
"bikini": "بيكيني",
"totalMinutes": "إجمالي الدقائق",
"feedback": "ملاحظات",
"send": "أرسل",
"status": "الحالة",
"likeToHear": "نود سماع ملاحظاتك، ومخاوفك بشأن خدمات الرعاية الصحية وتجربة الخدمات الإلكترونية. يرجى استخدام النموذج أدناه",
"subject": "الموضوع",
"message": "رسالة",
"emptySubject": "يرجى إدخال الموضوع",
"emptyMessage": "يرجى إدخال الرسالة",
"selectAttachment": "اختر المرفق",
@ -877,5 +873,345 @@
"walkin": "زيارة بدون موعد",
"laserClinic": "عيادة الليزر",
"continueString": "يكمل",
"covid_info": "تجري مستشفيات د. سليمان الحبيب فحص فيروس كورونا المستجد وتصدر شهادات السفر على مدار الساعة، طوال أيام الأسبوع، وبسرعة ودقة عالية. يمكن للراغبين في الاستفادة من هذه الخدمة زيارة أحد فروع مستشفيات د. سليمان الحبيب وإجراء فحص كورونا خلال بضع دقائق والحصول على النتائج خلال عدة ساعات خدمة فحص فيروس كورونا Covid 19 بتقنية PCR للكشف عن الفيروس وفقاً لأعلى المعايير العالمية وبأحدث أجهزة RT-PCR عالية الدقة (GeneXpert الأمريكي وغيره)، وهي طرق معتمدة من قبل هيئة الغذاء والدواء وكذلك من قبل المركز السعودي للوقاية من الأمراض المُعدية"
"covid_info": "تجري مستشفيات د. سليمان الحبيب فحص فيروس كورونا المستجد وتصدر شهادات السفر على مدار الساعة، طوال أيام الأسبوع، وبسرعة ودقة عالية. يمكن للراغبين في الاستفادة من هذه الخدمة زيارة أحد فروع مستشفيات د. سليمان الحبيب وإجراء فحص كورونا خلال بضع دقائق والحصول على النتائج خلال عدة ساعات خدمة فحص فيروس كورونا Covid 19 بتقنية PCR للكشف عن الفيروس وفقاً لأعلى المعايير العالمية وبأحدث أجهزة RT-PCR عالية الدقة (GeneXpert الأمريكي وغيره)، وهي طرق معتمدة من قبل هيئة الغذاء والدواء وكذلك من قبل المركز السعودي للوقاية من الأمراض المُعدية",
"appointmentDetails": "تفاصيل الموعد",
"checkingDoctorAvailability": "جاري التحقق من توفر الطبيب...",
"cancellingAppointmentPleaseWait": "جاري إلغاء الموعد، يرجى الانتظار...",
"appointmentCancelledSuccessfully": "تم إلغاء الموعد بنجاح",
"notConfirmed": "غير مؤكد",
"appointmentStatus": "حالة الموعد",
"doctorWillCallYou": "سيتصل بك الطبيب عندما يقترب موعدك.",
"getDirections": "الحصول على الاتجاهات",
"notifyMeBeforeAppointment": "أبلغني قبل الموعد",
"fetchingLabResults": "جاري جلب نتائج المختبر...",
"fetchingRadiologyResults": "جاري جلب نتائج الأشعة...",
"fetchingAppointmentPrescriptions": "جاري جلب وصفات الموعد...",
"noPrescriptionsForAppointment": "ليس لديك أي وصفات طبية لهذا الموعد.",
"amountBeforeTax": "المبلغ قبل الضريبة",
"rebookAppointment": "إعادة حجز الموعد",
"fetchingDoctorSchedulePleaseWait": "جاري جلب جدول الطبيب، يرجى الانتظار...",
"pickADate": "اختر تاريخاً",
"confirmingAppointmentPleaseWait": "جاري تأكيد الموعد، يرجى الانتظار...",
"appointmentConfirmedSuccessfully": "تم تأكيد الموعد بنجاح",
"appointmentPayment": "دفع الموعد",
"checkingPaymentStatusPleaseWait": "جاري التحقق من حالة الدفع، يرجى الانتظار...",
"paymentFailedPleaseTryAgain": "فشل الدفع! يرجى المحاولة مرة أخرى.",
"appointmentCheckIn": "تسجيل حضور الموعد",
"insuranceExpiredOrInactive": "التأمين منتهي الصلاحية أو غير نشط",
"totalAmountToPay": "المبلغ الإجمالي المستحق",
"vat15": "ضريبة القيمة المضافة 15%",
"general": "عام",
"liveCare": "لايف كير",
"recentVisits": "الزيارات الأخيرة",
"searchByClinic": "البحث حسب العيادة",
"tapToSelectClinic": "انقر لاختيار العيادة",
"searchByDoctor": "البحث حسب الطبيب",
"tapToSelect": "انقر للاختيار",
"searchByRegion": "البحث حسب المنطقة",
"centralRegion": "المنطقة الوسطى",
"immediateConsultation": "استشارة فورية",
"scheduledConsultation": "استشارة مجدولة",
"pharmaLiveCare": "لايف كير الصيدلية",
"notSureHelpMeChooseClinic": "غير متأكد؟ ساعدني في اختيار عيادة!",
"mentionYourSymptomsAndFindDoctors": "اذكر أعراضك واعثر على قائمة الأطباء وفقاً لذلك",
"immediateService": "خدمة فورية",
"noNeedToWaitGetMedicalConsultation": "لا حاجة للانتظار، ستحصل على استشارة طبية فورية عبر مكالمة فيديو",
"noVisitRequired": "لا حاجة للزيارة",
"doctorWillContact": "سيتصل بك الطبيب",
"specialisedDoctorWillContactYou": "سيتصل بك طبيب متخصص وسيكون قادراً على الاطلاع على تاريخك الطبي",
"freeMedicineDelivery": "توصيل مجاني للأدوية",
"offersFreeMedicineDelivery": "يوفر توصيل مجاني للأدوية لموعد لايف كير",
"dentalChiefComplaints": "الشكاوى الرئيسة للأسنان",
"viewAvailableAppointments": "عرض المواعيد المتاحة",
"doctorProfile": "الملف للطبيب",
"waitingAppointment": "موعد الانتظار",
"hospitalInformation": "معلومات المستشفى",
"fetchingAppointmentShare": "جاري جلب تفاصيل الموعد...",
"bookingYourAppointment": "جاري حجز موعدك...",
"selectLiveCareClinic": "اختر عيادة لايف كير",
"checkingForExistingDentalPlan": "جاري التحقق من وجود خطة أسنان حالية، يرجى الانتظار...",
"dentalTreatmentPlan": "خطة علاج الأسنان",
"youHaveExistingTreatmentPlan": "لديك خطة علاج حالية: ",
"mins": "دقيقة",
"totalTimeRequired": "إجمالي الوقت المطلوب",
"wouldYouLikeToContinue": "هل تريد متابعتها؟",
"chooseDoctor": "اختر الطبيب",
"viewNearestAppos": "عرض أقرب المواعيد المتاحة",
"noDoctorFound": "لم يتم العثور على طبيب مطابق للمعايير المحددة...",
"yesPleasImInAHurry": "نعم من فضلك، أنا في عجلة من أمري",
"fetchingFeesPleaseWait": "جاري جلب الرسوم، يرجى الانتظار...",
"noThanksPhysicalVisit": "لا، شكراً. أفضل الزيارة الشخصية",
"offline": "غير متصل",
"videoCall": "مكالمة فيديو",
"liveVideoCallWithHMGDoctors": "مكالمة فيديو مباشرة مع أطباء مجموعة الحبيب الطبية",
"audioCall": "مكالمة صوتية",
"phoneCall": "مكالمة هاتفية",
"livePhoneCallWithHMGDoctors": "مكالمة هاتفية مباشرة مع أطباء مجموعة الحبيب الطبية",
"reviewLiveCareRequest": "مراجعة طلب لايف كير",
"selectedLiveCareType": "نوع لايف كير المحدد",
"selectLiveCareCallType": "اختر نوع مكالمة لايف كير",
"confirmingLiveCareRequest": "جاري تأكيد طلب لايف كير، يرجى الانتظار...",
"unknownErrorOccurred": "حدث خطأ غير معروف...",
"liveCarePermissionsMessage": "يتطلب لايف كير أذونات الكاميرا والميكروفون والموقع والإشعارات لتمكين الاستشارة الافتراضية بين المريض والطبيب، يرجى السماح بهذه الأذونات للمتابعة.",
"liveCarePayment": "دفع لايف كير",
"mada": "مدى",
"visaOrMastercard": "فيزا أو ماستركارد",
"tamara": "تمارا",
"fetchingApplePayDetails": "جاري جلب تفاصيل Apple Pay، يرجى الانتظار...",
"liveCarePendingRequest": "لايف كير حية معلق",
"callLiveCareSupport": "اتصل بدعم لايف كير",
"whatIsWaitingAppointment": "ما هو موعد الانتظار؟",
"waitingAppointmentsFeature": "تتيح لك ميزة مواعيد الانتظار حجز موعد أثناء تواجدك داخل مبنى المستشفى، وفي حال عدم توفر فتحة متاحة في جدول الطبيب.",
"appointmentWithDoctorConfirmed": "الموعد مع الطبيب مؤكد، ولكن وقت الدخول غير محدد.",
"paymentWithinTenMinutes": "ملاحظة: يجب عليك الدفع خلال 10 دقائق من الحجز، وإلا سيتم إلغاء موعدك تلقائياً",
"liveLocation": "الموقع المباشر",
"verifyYourLocationAtHospital": "تحقق من موقعك في المستشفى لتسجيل الحضور",
"error": "خطأ",
"ensureWithinHospitalLocation": "يرجى التأكد من أنك داخل موقع المستشفى لإجراء تسجيل الحضور عبر الإنترنت.",
"nfcNearFieldCommunication": "NFC (الاتصال قريب المدى)",
"scanPhoneViaNFC": "امسح هاتفك عبر لوحة NFC لتسجيل الحضور",
"qrCode": "رمز QR",
"scanQRCodeToCheckIn": "امسح رمز QR بالكاميرا لتسجيل الحضور",
"processingCheckIn": "جاري معالجة تسجيل الحضور...",
"bookingWaitingAppointment": "جاري حجز موعد الانتظار، يرجى الانتظار...",
"enterValidIDorIqama": "يرجى إدخال رقم هوية وطنية أو رقم ملف صالح",
"selectAppointment": "حدد الموعد",
"rebookSameDoctor": "أعد الحجز مع نفس الطبيب",
"queueing": "قائمة الانتظار",
"inQueue": "في قائمة الانتظار",
"yourTurn": "دورك",
"halaFirstName": "هلا {firstName}!!!",
"thankYouForPatience": "شكراً لصبرك، هذا هو رقم قائمة الانتظار الخاص بك.",
"servingNow": "يُخدم الآن",
"callForVitalSigns": "نداء للعلامات الحيوية",
"callForDoctor": "نداء للطبيب",
"thingsToAskDoctor": "أشياء تسأل طبيبك عنها اليوم",
"improveOverallHealth": "ماذا يمكنني أن أفعل لتحسين صحتي العامة؟",
"routineScreenings": "هل هناك أي فحوصات روتينية يجب أن أجريها؟",
"whatIsThisMedicationFor": "لماذا هذا الدواء؟",
"sideEffectsToKnow": "هل هناك أي آثار جانبية يجب أن أعرفها؟",
"whenFollowUp": "متى يجب أن أعود للمتابعة؟",
"goToHomepage": "الذهاب إلى الصفحة الرئيسية",
"appointmentsList": "قائمة المواعيد",
"allAppt": "جميع المواعيد",
"upcoming": "القادمة",
"completed": "المكتملة",
"noAppointmentsYet": "ليس لديك أي مواعيد بعد.",
"viewProfile": "عرض الملف الشخصي",
"choosePreferredHospitalForService": "اختر المستشفى المفضل لديك للخدمة",
"noHospitalsFound": "لم يتم العثور على مستشفيات",
"cancelOrderConfirmation": "هل أنت متأكد أنك تريد إلغاء هذا الطلب؟",
"orderCancelledSuccessfully": "تم إلغاء الطلب بنجاح",
"requestID": "معرف الطلب:",
"noCMCOrdersYet": "ليس لديك أي طلبات فحص شامل بعد.",
"cmcOrders": "طلبات الفحص الشامل",
"summary": "الملخص",
"selectedService": "الخدمة المحددة",
"requestSubmittedSuccessfully": "تم إرسال طلبك بنجاح.",
"hereIsYourRequestNumber": "هذا هو رقم طلبك #: ",
"pleaseSelectHospitalToContinue": "يرجى اختيار مستشفى للمتابعة",
"confirmSubmitRequest": "هل أنت متأكد أنك تريد إرسال هذا الطلب؟",
"pendingOrderWait": "لديك طلب معلق. يرجى الانتظار حتى تتم معالجته.",
"noServicesAvailable": "لا توجد خدمات متاحة",
"selectAService": "اختر خدمة",
"comprehensiveCheckup": "الفحص الشامل",
"viewNearestHMGLocations": "عرض أقرب مواقع مجموعة الحبيب الطبية",
"provideFeedbackOnServices": "قدم ملاحظاتك على خدماتنا",
"liveChatWithHMG": "خيار الدردشة المباشرة مع مجموعة الحبيب الطبية",
"send": "إرسال",
"status": "الحالة",
"sendingFeedback": "جاري إرسال الملاحظات...",
"selectFeedbackType": "اختر نوع الملاحظات",
"loadingAppointmentsList": "جاري تحميل قائمة المواعيد...",
"noAppointmentsForFeedback": "ليس لديك أي مواعيد لتقديم ملاحظات عنها.",
"selectedAppointment": "الموعد المحدد:",
"subject": "الموضوع",
"enterSubjectHere": "أدخل الموضوع هنا",
"message": "الرسالة",
"enterMessageHere": "أدخل الرسالة هنا",
"filesSelected": "تم تحديد {count} ملف(ات)",
"otherDetails": "تفاصيل أخرى",
"medicalReport": "التقرير الطبي",
"medicalReportNumber": "التقرير الطبي {number}",
"patientIsInsured": "المريض مؤمن عليه",
"insuranceDocument": "وثيقة التأمين",
"selectBranch": "اختر الفرع",
"patientInformation": "معلومات المريض",
"patientLocation": "أين يتواجد المريض",
"identificationNumber": "رقم الهوية",
"enterIdentificationNumber": "أدخل رقم الهوية*",
"patientName": "اسم المريض*",
"referralRequesterInformation": "معلومات مقدم طلب الإحالة",
"enterReferralRequesterName": "أدخل اسم مقدم طلب الإحالة*",
"requesterName": "اسم مقدم الطلب",
"relationship": "العلاقة",
"selectRelation": "اختر العلاقة",
"otherName": "اسم آخر",
"otherNameHint": "اسم آخر*",
"requesterNameRequired": "اسم مقدم طلب الإحالة مطلوب",
"selectRelationshipRequired": "يرجى اختيار العلاقة",
"otherRelationshipNameRequired": "اسم العلاقة الأخرى مطلوب",
"identificationNumberRequired": "رقم الهوية مطلوب",
"patientNameRequired": "اسم المريض مطلوب",
"enterPatientPhoneRequired": "يرجى إدخال رقم هاتف المريض",
"selectPatientCityRequired": "يرجى اختيار مدينة المريض",
"medicalReportRequired": "مطلوب تقرير طبي واحد على الأقل",
"selectBranchRequired": "يرجى اختيار الفرع",
"insuranceDocumentRequired": "وثيقة التأمين مطلوبة للمرضى المؤمن عليهم",
"searchResult": "نتيجة البحث",
"referralNo": "رقم الإحالة {number}",
"eReferral": "الإحالة الإلكترونية",
"referralCreatedSuccessfully": "تم إنشاء إحالتك بنجاح.",
"hereIsYourReferralNumber": "هذا هو رقم الإحالة الخاص بك #: ",
"searchEReferral": "البحث عن إحالة إلكترونية",
"enterRequiredInfoToSearch": "يرجى إدخال المعلومات المطلوبة للبحث عن إحالة إلكترونية",
"selectPickupDirection": "اختر اتجاه الاستلام",
"selectDirection": "اختر الاتجاه",
"toHospital": "إلى المستشفى",
"fromHospital": "من المستشفى",
"selectWay": "اختر الطريقة",
"oneWay": "اتجاه واحد",
"twoWay": "اتجاهين",
"selectPickupDetails": "اختر تفاصيل الاستلام",
"pleaseSelectDetailsOfPickup": " يرجى تحديد تفاصيل الاستلام",
"selectDetails": "اختر التفاصيل",
"work": "العمل",
"pick": "استلام",
"insideTheHome": "داخل المنزل",
"haveAnyAppointment": "هل لديك أي موعد",
"amountPaidAtHospital": "سيتم دفع المبلغ في المستشفى",
"submitRequest": "إرسال الطلب",
"enterPickupLocationManually": "أدخل موقع الاستلام يدوياً",
"enterPickupLocation": "أدخل موقع الاستلام",
"trackingDetails": "تفاصيل التتبع",
"cancelRequest": "إلغاء الطلب",
"shareLocationWhatsapp": "مشاركة موقعك المباشر على واتساب",
"pleaseWaitForCall": "يرجى انتظار المكالمة",
"toHospitalLower": "إلى المستشفى",
"contact": "اتصال",
"failed": "فشل",
"confirmationCall": "مكالمة التأكيد",
"pickupFromHome": "الاستلام من المنزل",
"onTheWayToHospital": " في الطريق إلى المستشفى",
"arrivedAtHospital": "وصل إلى المستشفى",
"orderCancel": "إلغاء الطلب",
"emergencyCheckIn": "تسجيل الطوارئ الإلكتروني",
"erOnlineCheckInDescription": "تتيح هذه الخدمة للمرضى تسجيل موعد الطوارئ قبل الوصول.",
"erOnlineCheckInSuccess": "تم تسجيل وصول الطوارئ بنجاح. الرجاء التوجه إلى منطقة الانتظار.",
"erOnlineCheckInError": "حدث خطأ غير متوقع أثناء عملية التسجيل. يرجى التواصل مع الدعم.",
"fetchingHospitalsList": "جاري جلب قائمة المستشفيات...",
"fetchingPaymentInformation": "جاري جلب معلومات الدفع...",
"erVisitDetails": "تفاصيل زيارة الطوارئ",
"erClinic": "عيادة الطوارئ",
"vatWithAmount": "الضريبة 15% ({amount})",
"erAppointmentBookedSuccess": "تم حجز موعدك بنجاح. يرجى إتمام إجراءات تسجيل الوصول عند وصولك إلى المستشفى.",
"underProcessing": "قيد المعالجة",
"canceledByPatient": "ملغى بواسطة المريض",
"rapidResponseTeam": "فريق الاستجابة السريع",
"allFacilities": "جميع المرافق",
"selectLocation": "اختر الموقع",
"pleaseSelectTheLocation": "يرجى اختيار الموقع",
"viewLocationGoogleMaps": "عرض الموقع على خرائط جوجل",
"callAmbulance": "استدعاء سيارة إسعاف",
"requestAmbulanceInEmergency": "طلب سيارة إسعاف في حالة الطوارئ من المنزل أو المستشفى",
"confirmation": "تأكيد",
"areYouSureYouWantToCallAmbulance": "هل أنت متأكد أنك تريد استدعاء سيارة إسعاف؟",
"getDetailsOfNearestBranch": "احصل على تفاصيل أقرب فرع بما في ذلك الاتجاهات",
"areYouSureYouWantToCallRRT": "هل أنت متأكد أنك تريد استدعاء فريق الاستجابة السريعة (RRT)؟",
"priorERCheckInToSkipLine": "تسجيل الوصول المسبق في الطوارئ لتجاوز الطابور والدفع في الاستقبال.",
"areYouSureYouWantToMakeERCheckIn": "هل أنت متأكد أنك تريد إجراء تسجيل وصول الطوارئ؟",
"checkingYourERAppointmentStatus": "جاري التحقق من حالة موعد الطوارئ الخاص بك...",
"transportOptions": "خيارات النقل",
"selectHospitalForAdvancePayment": "يرجى اختيار المستشفى الذي ترغب في دفع مبلغ مقدم له.",
"recharge": "إعادة الشحن",
"activityLevel": "مستوى النشاط",
"selectActivityLevel": "حدد مستوى النشاط",
"caloriesPerDay": "السعرات الحرارية في اليوم الواحد",
"dietType": "نوع النظام الغذائي",
"selectDietType": "حدد نوع النظام الغذائي",
"bodyFrameSize": "حجم إطار الجسم",
"selectBodyFrameSize": "حدد حجم إطار الجسم",
"averageCycleLength": "متوسط طول الدورة الشهرية (عادةً 28 يومًا)",
"averageLutealPhase": "متوسط طول المرحلة الأصفرية (عادةً 14 يومًا)",
"convert": "يتحول",
"calculate": "احسب",
"healthCalculators": "حاسبات الصحة",
"healthConverters": "محولات الصحة",
"generalHealth": "الصحة العامة",
"relatedToBMICalories": "متعلق بمؤشر كتلة الجسم والسعرات الحرارية ودهون الجسم وما إلى ذلك للبقاء على اطلاع دائم بصحتك.",
"selectCalculator": "اختر الآلة الحاسبة",
"womensHealth": "صحة المرأة",
"relatedToPeriodsOvulation": "متعلق بالدورة الشهرية والإباضة والحمل ومواضيع أخرى.",
"bloodSugar": "سكر الدم",
"trackYourGlucoseLevels": "تتبع مستويات الجلوكوز لديك، وفهم الاتجاهات، واحصل على رؤى مخصصة لصحة أفضل.",
"bloodCholesterol": "كوليسترول الدم",
"monitorCholesterolLevels": "راقب مستويات الكوليسترول، وقيّم مخاطر صحة القلب، واتخذ خطوات استباقية للرفاهية.",
"triglyceridesFatBlood": "الدهون الثلاثية في الدم",
"understandTriglyceridesImpact": "افهم تأثير الدهون الثلاثية على صحة القلب مع رؤى مخصصة وتوصيات الخبراء.",
"bmiCalculator": "حاسبة\nمؤشر كتلة الجسم",
"caloriesCalculator": "حاسبة\nالسعرات الحرارية",
"bmrCalculator": "حاسبة\nمعدل الأيض الأساسي",
"idealBodyWeight": "الوزن المثالي\nللجسم",
"bodyFatCalculator": "حاسبة\nدهون الجسم",
"carbsProteinFat": "الكربوهيدرات\nالبروتين والدهون",
"ovulationPeriod": "فترة\nالإباضة",
"deliveryDueDate": "تاريخ الولادة\nالمتوقع",
"low": "منخفض",
"preDiabetic": "ما قبل السكري",
"high": "مرتفع",
"elevated": "مرتفع قليلاً",
"recorded": "مسجل",
"noRecordsYet": "لا توجد سجلات بعد",
"lastRecord": "آخر سجل",
"addBloodSugar": "إضافة سكر الدم",
"addBloodPressure": "إضافة ضغط الدم",
"addWeight": "إضافة الوزن",
"bloodSugarDataSavedSuccessfully": "تم حفظ بيانات سكر الدم بنجاح",
"bloodPressureDataSavedSuccessfully": "تم حفظ بيانات ضغط الدم بنجاح",
"weightDataSavedSuccessfully": "تم حفظ بيانات الوزن بنجاح",
"pleaseWait": "يرجى الانتظار",
"selectUnit": "اختر الوحدة",
"selectMeasureTime": "اختر وقت القياس",
"selectArm": "اختر الذراع",
"enterBloodSugar": "أدخل سكر الدم",
"enterSystolicValue": "أدخل القيمة الانقباضية",
"enterDiastolicValue": "أدخل القيمة الانبساطية",
"enterWeight": "أدخل الوزن",
"selectDuration": "اختر المدة",
"systolic": "الانقباضي",
"diastolic": "الانبساطي",
"sendReportByEmail": "إرسال التقرير عبر البريد الإلكتروني",
"enterYourEmailToReceiveReport": "أدخل عنوان بريدك الإلكتروني لاستلام التقرير",
"addNewRecord": "إضافة سجل جديد",
"healthTrackers": "متتبعات الصحة",
"monitorBloodPressureLevels": "راقب مستويات ضغط الدم لديك، وتتبع القراءات الانقباضية والانبساطية، وحافظ على صحة قلبك.",
"trackWeightProgress": "تتبع تقدم وزنك، وضع الأهداف، وحافظ على كتلة جسم صحية من أجل العافية الشاملة.",
"bookAppointment": "حجز\nموعد",
"completeCheckup": "الفحص الشامل",
"indoorNavigation": "الملاحة الداخلية",
"eReferralServices": "خدمات الإحالة الإلكترونية",
"bloodDonation": "التبرع بالدم",
"dailyWaterMonitor": "مراقب الماء اليومي",
"fetchingYourWaterIntakeDetails": "جاري جلب تفاصيل استهلاك الماء الخاص بك.",
"healthCalculatorsServices": "حاسبات\nالصحة",
"healthConvertersServices": "محولات\nالصحة",
"smartWatchesServices": "الساعات\nالذكية",
"exploreServices": "استكشف الخدمات",
"medicalAndCareServices": "الخدمات الطبية والرعاية",
"hmgServices": "خدمات مجموعة الحبيب الطبية",
"personalServices": "الخدمات الشخصية",
"habibWallet": "محفظة الحبيب",
"loginToViewWalletBalance": "سجل الدخول لعرض رصيد محفظتك",
"recharge": "إعادة الشحن",
"loginToViewMedicalFile": "سجل الدخول لعرض ملفك الطبي",
"addMember": "إضافة عضو",
"addFamilyMember": "إضافة فرد من العائلة",
"pleaseFillBelowFieldToAddNewFamilyMember": "يرجى ملء الحقل أدناه لإضافة فرد جديد من العائلة إلى ملفك الشخصي",
"healthTools": "أدوات الصحة",
"supportServices": "خدمات الدعم",
"virtualTour": "جولة افتراضية",
"carParking": "موقف السيارات",
"latestNews": "آخر الأخبار",
"hmgContact": "اتصل بمجموعة الحبيب الطبية"
}

@ -689,11 +689,7 @@
"bikini": "Bikini",
"totalMinutes": "Total Minutes",
"feedback": "Feedback",
"send": "أرسل",
"status": "الحالة",
"likeToHear": "We would love to hear the feedback, concerns on healthcare services and eServices experience. Please use the below form",
"subject": "الموضوع",
"message": "رسالة",
"emptySubject": "Please enter the subject",
"emptyMessage": "Please enter message",
"selectAttachment": "Select Attachment",
@ -864,7 +860,7 @@
"endDate": "End Date",
"hmgHospitals": "HMG Hospitals",
"hmcMedicalClinic": "HMC Medical Centers",
"applyFilter": "AppLy Filter",
"applyFilter": "Apply Filter",
"facilityAndLocation": "Facility and Location",
"regionAndLocation": "Region And Locations",
"clearAllFilters": "Clear all filters",
@ -873,5 +869,343 @@
"walkin": "Walk In",
"continueString": "Continue",
"laserClinic": "Laser Clinic",
"covid_info" :"Dr. Sulaiman Al Habib hospitals are conducting 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, and obtain the result within several hours. Corona Virus Covid 19 testing service with PCR technology to detect the virus according to the highest international standards and with the latest high-precision RT-PCR devices (American GeneXpert and others), That is approved by the Food and Drug Authority as well as by the Saudi Center for Infectious Diseases Prevention."
"covid_info" :"Dr. Sulaiman Al Habib hospitals are conducting 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, and obtain the result within several hours. Corona Virus Covid 19 testing service with PCR technology to detect the virus according to the highest international standards and with the latest high-precision RT-PCR devices (American GeneXpert and others), That is approved by the Food and Drug Authority as well as by the Saudi Center for Infectious Diseases Prevention.",
"appointmentDetails": "Appointment Details",
"checkingDoctorAvailability": "Checking doctor availability...",
"cancellingAppointmentPleaseWait": "Cancelling Appointment, Please Wait...",
"appointmentCancelledSuccessfully": "Appointment Cancelled Successfully",
"notConfirmed": "Not Confirmed",
"appointmentStatus": "Appointment Status",
"doctorWillCallYou": "The doctor will call you once the appointment time approaches.",
"getDirections": "Get Directions",
"notifyMeBeforeAppointment": "Notify me before the appointment",
"fetchingLabResults": "Fetching Lab Results...",
"fetchingRadiologyResults": "Fetching Radiology Results...",
"fetchingAppointmentPrescriptions": "Fetching Appointment Prescriptions...",
"noPrescriptionsForAppointment": "You don't have any prescriptions for this appointment.",
"amountBeforeTax": "Amount before tax",
"rebookAppointment": "Re-book Appointment",
"fetchingDoctorSchedulePleaseWait": "Fetching Doctor Schedule, Please Wait...",
"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.",
"appointmentCheckIn": "Appointment check in",
"insuranceExpiredOrInactive": "Insurance expired or inactive",
"totalAmountToPay": "Total amount to pay",
"vat15": "VAT 15%",
"general": "General",
"liveCare": "LiveCare",
"recentVisits": "Recent Visits",
"searchByClinic": "Search By Clinic",
"tapToSelectClinic": "Tap to select clinic",
"searchByDoctor": "Search By Doctor",
"tapToSelect": "Tap to select",
"searchByRegion": "Search By Region",
"centralRegion": "Central Region",
"immediateConsultation": "Immediate Consultation",
"scheduledConsultation": "Scheduled Consultation",
"pharmaLiveCare": "Pharma LiveCare",
"notSureHelpMeChooseClinic": "Not sure? help me choose a clinic!",
"mentionYourSymptomsAndFindDoctors": "Mention your symptoms and find the list of doctors accordingly",
"immediateService": "Immediate service",
"noNeedToWaitGetMedicalConsultation": "No need to wait, you will get medical consultation immediately via video call",
"noVisitRequired": "No visit required",
"doctorWillContact": "Doctor will contact",
"specialisedDoctorWillContactYou": "A specialised doctor will contact you and will be able to view your medical history",
"freeMedicineDelivery": "Free medicine delivery",
"offersFreeMedicineDelivery": "Offers free medicine delivery for the LiveCare appointment",
"dentalChiefComplaints": "Dental Chief Complaints",
"viewAvailableAppointments": "View available appointments",
"doctorProfile": "Doctor Profile",
"waitingAppointment": "Waiting Appointment",
"hospitalInformation": "Hospital Information",
"fetchingAppointmentShare": "Fetching Appointment Share...",
"bookingYourAppointment": "Booking your appointment...",
"selectLiveCareClinic": "Select LiveCare Clinic",
"checkingForExistingDentalPlan": "Checking for an existing dental plan, Please wait...",
"dentalTreatmentPlan": "Dental treatment plan",
"youHaveExistingTreatmentPlan": "You have an existing treatment plan: ",
"mins": "Mins",
"totalTimeRequired": "Total time required",
"wouldYouLikeToContinue": "Would you like to continue it?",
"chooseDoctor": "Choose Doctor",
"viewNearestAppos": "View nearest available appointments",
"noDoctorFound": "No Doctor found for selected criteria...",
"yesPleasImInAHurry": "Yes please, I am in a hurry",
"fetchingFeesPleaseWait": "Fetching fees, Please wait...",
"noThanksPhysicalVisit": "No, Thanks. I would like a physical visit",
"offline": "Offline",
"videoCall": "Video Call",
"liveVideoCallWithHMGDoctors": "Live Video Call with HMG Doctors",
"audioCall": "Audio Call",
"phoneCall": "Phone Call",
"livePhoneCallWithHMGDoctors": "Live Phone Call with HMG Doctors",
"reviewLiveCareRequest": "Review LiveCare Request",
"selectedLiveCareType": "Selected LiveCare Type",
"selectLiveCareCallType": "Select LiveCare call type",
"confirmingLiveCareRequest": "Confirming LiveCare request, Please wait...",
"unknownErrorOccurred": "Unknown error occurred...",
"liveCarePermissionsMessage": "LiveCare requires Camera, Microphone, Location & Notifications permissions to enable virtual consultation between patient & doctor, Please allow these to proceed.",
"liveCarePayment": "LiveCare Payment",
"mada": "Mada",
"visaOrMastercard": "Visa or Mastercard",
"tamara": "Tamara",
"fetchingApplePayDetails": "Fetching Apple Pay details, Please wait...",
"liveCarePendingRequest": "LiveCare Pending Request",
"callLiveCareSupport": "Call LiveCare Support",
"whatIsWaitingAppointment": "What is Waiting Appointment?",
"waitingAppointmentsFeature": "The waiting appointments feature allows you to book an appointment while you are inside the hospital building, and in case there is no available slot in the doctor's schedule.",
"appointmentWithDoctorConfirmed": "The appointment with the doctor is confirmed, but the time of entry is uncertain.",
"paymentWithinTenMinutes": "Note: You must have to pay within 10 minutes of booking, otherwise your appointment will be cancelled automatically",
"liveLocation": "Live Location",
"verifyYourLocationAtHospital": "Verify your location to be at hospital to check in",
"error": "Error",
"ensureWithinHospitalLocation": "Please ensure you're within the hospital location to perform online check-in.",
"nfcNearFieldCommunication": "NFC (Near Field Communication)",
"scanPhoneViaNFC": "Scan your phone via NFC board to check in",
"qrCode": "QR Code",
"scanQRCodeToCheckIn": "Scan QR code with your camera to check in",
"processingCheckIn": "Processing Check-In...",
"bookingWaitingAppointment": "Booking Waiting Appointment, Please wait...",
"enterValidIDorIqama": "Please enter a valid national ID or file number",
"selectAppointment": "Select Appointment",
"rebookSameDoctor": "Rebook with same doctor",
"queueing": "Queueing",
"inQueue": "In Queue",
"yourTurn": "Your Turn",
"halaFirstName": "Hala {firstName}!!!",
"thankYouForPatience": "Thank you for your patience, here is your queue number.",
"servingNow": "Serving Now",
"callForVitalSigns": "Call for vital signs",
"callForDoctor": "Call for Doctor",
"thingsToAskDoctor": "Things to ask your doctor today",
"improveOverallHealth": "What can I do to improve my overall health?",
"routineScreenings": "Are there any routine screenings I should get?",
"whatIsThisMedicationFor": "What is this medication for?",
"sideEffectsToKnow": "Are there any side effects I should know about?",
"whenFollowUp": "When should I come back for a follow-up?",
"goToHomepage": "Go to homepage",
"appointmentsList": "Appointments List",
"allAppt": "All Appt.",
"upcoming": "Upcoming",
"completed": "Completed",
"noAppointmentsYet": "You don't have any appointments yet.",
"viewProfile": "View Profile",
"choosePreferredHospitalForService": "Choose your preferred hospital for the service",
"noHospitalsFound": "No hospitals Found",
"cancelOrderConfirmation": "Are you sure you want to cancel this order?",
"orderCancelledSuccessfully": "Order has been cancelled successfully",
"requestID": "Request ID:",
"noCMCOrdersYet": "You don't have any CMC orders yet.",
"cmcOrders": "CMC Orders",
"summary": "Summary",
"selectedService": "Selected Service",
"requestSubmittedSuccessfully": "Your request has been successfully submitted.",
"hereIsYourRequestNumber": "Here is your request #: ",
"pleaseSelectHospitalToContinue": "Please select a hospital to continue",
"confirmSubmitRequest": "Are you sure you want to submit this request?",
"pendingOrderWait": "You have a pending order. Please wait for it to be processed.",
"noServicesAvailable": "No services available",
"selectAService": "Select a Service",
"comprehensiveCheckup": "Comprehensive Checkup",
"viewNearestHMGLocations": "View your nearest HMG locations",
"provideFeedbackOnServices": "Provide your feedback on our services",
"liveChatWithHMG": "Live chat option with HMG",
"send": "Send",
"status": "Status",
"sendingFeedback": "Sending Feedback...",
"selectFeedbackType": "Select Feedback Type",
"loadingAppointmentsList": "Loading appointments list...",
"noAppointmentsForFeedback": "You do not have any appointments to submit a feedback.",
"selectedAppointment": "Selected Appointment:",
"subject": "Subject",
"enterSubjectHere": "Enter subject here",
"message": "Message",
"enterMessageHere": "Enter message here",
"filesSelected": "{count} file(s) selected",
"otherDetails": "Other Details",
"medicalReport": "Medical Report",
"medicalReportNumber": "Medical Report {number}",
"patientIsInsured": "Patient is Insured",
"insuranceDocument": "Insurance Document",
"selectBranch": "Select Branch",
"patientInformation": "Patient information",
"patientLocation": "Where the patient located",
"identificationNumber": "Identification Number",
"enterIdentificationNumber": "Enter Identification Number*",
"patientName": "Patient Name*",
"referralRequesterInformation": "Referral requester information",
"enterReferralRequesterName": "Enter Referral Requester Name*",
"requesterName": "Requester Name",
"relationship": "Relationship",
"selectRelation": "Select Relation",
"otherName": "Other Name",
"otherNameHint": "Other Name*",
"requesterNameRequired": "Referral requester name is required",
"selectRelationshipRequired": "Please select a relationship",
"otherRelationshipNameRequired": "Other relationship name is required",
"identificationNumberRequired": "Identification number is required",
"patientNameRequired": "Patient name is required",
"enterPatientPhoneRequired": "Please Enter patient phone number",
"selectPatientCityRequired": "Please select patient city",
"medicalReportRequired": "At least one medical report is required",
"selectBranchRequired": "Please select a branch",
"insuranceDocumentRequired": "Insurance document is required for insured patients",
"searchResult": "Search Result",
"referralNo": "Referral No {number}",
"eReferral": "E Referral",
"referralCreatedSuccessfully": "Your Referral has been created Successfully.",
"hereIsYourReferralNumber": "Here is your Referral #: ",
"searchEReferral": "Search E-Referral",
"enterRequiredInfoToSearch": "Please enter the required information to search for an e-referral",
"selectPickupDirection": "Select Pickup Direction",
"selectDirection": "Select Direction",
"toHospital": "To Hospital",
"fromHospital": "From Hospital",
"selectWay": "Select Way",
"oneWay": "One Way",
"twoWay": "Two Way",
"selectPickupDetails": "Select Pickup Details",
"pleaseSelectDetailsOfPickup": " Please select the details of pickup",
"selectDetails": "Select Details",
"work": "Work",
"pick": "Pick",
"insideTheHome": "Inside the home",
"haveAnyAppointment": "Have any appointment",
"amountPaidAtHospital": "Amount will be paid at the hospital",
"submitRequest": "Submit Request",
"enterPickupLocationManually": "Enter Pickup Location Manually",
"enterPickupLocation": "Enter Pickup Location",
"trackingDetails": "Tracking Details",
"cancelRequest": "Cancel Request",
"shareLocationWhatsapp": "Share Your Live Location on Whatsapp",
"pleaseWaitForCall": "Please wait for the call",
"toHospitalLower": "to hospital",
"contact": "Contact",
"failed": "Failed",
"confirmationCall": "Confirmation Call",
"pickupFromHome": "Pickup Up from Home",
"onTheWayToHospital": " On The Way To Hospital",
"arrivedAtHospital": "Arrived at Hospital",
"orderCancel": "Order Cancel",
"emergencyCheckIn": "Emergency Check-In",
"erOnlineCheckInDescription": "This service lets patients register their ER appointment prior to arrival.",
"erOnlineCheckInSuccess": "Your ER Online Check-In has been successfully done. Please proceed to the waiting area.",
"erOnlineCheckInError": "Unexpected error occurred during check-in. Please contact support.",
"fetchingHospitalsList": "Fetching hospitals list...",
"fetchingPaymentInformation": "Fetching payment information...",
"erVisitDetails": "ER Visit Details",
"erClinic": "ER Clinic",
"vatWithAmount": "VAT 15% ({amount})",
"erAppointmentBookedSuccess": "Your appointment has been booked successfully. Please perform Check-In once you arrive at the hospital.",
"underProcessing": "Under processing",
"canceledByPatient": "Cancelled by patient",
"rapidResponseTeam": "Rapid Response Team",
"allFacilities": "All Facilities",
"selectLocation": "Select Location",
"pleaseSelectTheLocation": "Please select the location",
"viewLocationGoogleMaps": "View Location on Google Maps",
"callAmbulance": "Call Ambulance",
"requestAmbulanceInEmergency": "Request an ambulance in emergency from home or hospital",
"confirmation": "Confirmation",
"areYouSureYouWantToCallAmbulance": "Are you sure you want to call an ambulance?",
"getDetailsOfNearestBranch": "Get the details of nearest branch including directions",
"areYouSureYouWantToCallRRT": "Are you sure you want to call Rapid Response Team (RRT)?",
"priorERCheckInToSkipLine": "Prior ER Check-In to skip the line & payment at the reception.",
"areYouSureYouWantToMakeERCheckIn": "Are you sure you want to make ER Check-In?",
"checkingYourERAppointmentStatus": "Checking your ER Appointment status...",
"transportOptions": "Transport Options",
"selectHospitalForAdvancePayment": "Please select the hospital you want to make an advance payment for.",
"recharge": "Recharge",
"activityLevel": "Activity Level",
"selectActivityLevel": "Select Activity Level",
"caloriesPerDay": "Calories Per Day",
"dietType": "Diet Type",
"selectDietType": "Select Diet Type",
"bodyFrameSize": "Body Frame Size",
"selectBodyFrameSize": "Select Body Frame Size",
"averageCycleLength": "Average Cycle Length (Usually 28 days)",
"averageLutealPhase": "Average Luteal Phase Length(Usually 14 days)",
"convert": "Convert",
"calculate": "Calculate",
"healthCalculators": "Health Calculators",
"healthConverters": "Health Converters",
"generalHealth": "General Health",
"relatedToBMICalories": "Related To BMI, calories, body fat, etc to stay updated with your health.",
"selectCalculator": "Select Calculator",
"womensHealth": "Women's Health",
"relatedToPeriodsOvulation": "Related To periods, ovulation, pregnancy, and other topics.",
"bloodSugar": "Blood Sugar",
"trackYourGlucoseLevels": "Track your glucose levels, understand trends, and get personalized insights for better health.",
"bloodCholesterol": "Blood Cholesterol",
"monitorCholesterolLevels": "Monitor cholesterol levels, assess heart health risks, and take proactive steps for well-being.",
"triglyceridesFatBlood": "Triglycerides Fat Blood",
"understandTriglyceridesImpact": "Understand triglycerides' impact on heart health with personalized insights and expert recommendations.",
"bmiCalculator": "BMI\nCalculator",
"caloriesCalculator": "Calories\nCalculator",
"bmrCalculator": "BMR\nCalculator",
"idealBodyWeight": "Ideal Body\nWeight",
"bodyFatCalculator": "Body Fat\nCalculator",
"carbsProteinFat": "Carbs\nProtein & Fat",
"ovulationPeriod": "Ovulation\nPeriod",
"deliveryDueDate": "Delivery\nDue Date",
"low": "Low",
"preDiabetic": "Pre-diabetic",
"high": "High",
"elevated": "Elevated",
"recorded": "Recorded",
"noRecordsYet": "No records yet",
"lastRecord": "Last Record",
"addBloodSugar": "Add Blood Sugar",
"addBloodPressure": "Add Blood Pressure",
"addWeight": "Add Weight",
"bloodSugarDataSavedSuccessfully": "Blood Sugar Data saved successfully",
"bloodPressureDataSavedSuccessfully": "Blood Pressure Data saved successfully",
"weightDataSavedSuccessfully": "Weight Data saved successfully",
"pleaseWait": "Please wait",
"selectUnit": "Select Unit",
"selectMeasureTime": "Select Measure Time",
"selectArm": "Select Arm",
"enterBloodSugar": "Enter Blood Sugar",
"enterSystolicValue": "Enter Systolic Value",
"enterDiastolicValue": "Enter Diastolic Value",
"enterWeight": "Enter Weight",
"selectDuration": "Select Duration",
"systolic": "Systolic",
"diastolic": "Diastolic",
"sendReportByEmail": "Send Report by Email",
"enterYourEmailToReceiveReport": "Enter your email address to receive the report",
"addNewRecord": "Add new Record",
"healthTrackers": "Health Trackers",
"monitorBloodPressureLevels": "Monitor your blood pressure levels, track systolic and diastolic readings, and maintain a healthy heart.",
"trackWeightProgress": "Track your weight progress, set goals, and maintain a healthy body mass for overall wellness.",
"bookAppointment": "Book\nAppointment",
"completeCheckup": "Complete Checkup",
"indoorNavigation": "Indoor Navigation",
"eReferralServices": "E-Referral Services",
"dailyWaterMonitor": "Daily Water Monitor",
"fetchingYourWaterIntakeDetails": "Fetching your water intake details.",
"healthCalculatorsServices": "Health\nCalculators",
"healthConvertersServices": "Health\nConverters",
"smartWatchesServices": "Smart\nWatches",
"exploreServices": "Explore Services",
"medicalAndCareServices": "Medical & Care Services",
"hmgServices": "HMG Services",
"personalServices": "Personal Services",
"habibWallet": "Habib Wallet",
"loginToViewWalletBalance": "Login to view your wallet balance",
"loginToViewMedicalFile": "Login to view your medical file",
"addMember": "Add Member",
"addFamilyMember": "Add Family Member",
"pleaseFillBelowFieldToAddNewFamilyMember": "Please fill the below field to add a new family member to your profile",
"healthTools": "Health Tools",
"supportServices": "Support Services",
"virtualTour": "Virtual Tour",
"carParking": "Car Parking",
"latestNews": "Latest News",
"hmgContact": "HMG Contact"
}

@ -19,7 +19,7 @@ abstract class ApiClient {
Future<void> post(
String endPoint, {
required dynamic body,
required Map<String, dynamic> body,
required Function(dynamic response, int statusCode, {int? messageStatus, String? errorMessage}) onSuccess,
required Function(String error, int statusCode, {int? messageStatus, Failure? failureType}) onFailure,
bool isAllowAny,

@ -680,7 +680,7 @@ const DASHBOARD = 'Services/Patients.svc/REST/PatientDashboard';
class ApiConsts {
static const maxSmallScreen = 660;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat;
// static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT

@ -75,6 +75,7 @@ import 'package:local_auth/local_auth.dart';
import 'package:logger/web.dart';
import 'package:shared_preferences/shared_preferences.dart';
import '../features/monthly_reports/monthly_reports_repo.dart';
import '../features/qr_parking/qr_parking_view_model.dart';
import '../presentation/health_calculators_and_converts/health_calculator_view_model.dart';
@ -165,13 +166,6 @@ class AppDependencies {
),);
getIt.registerLazySingleton<MonthlyReportsRepo>(() => MonthlyReportsRepoImp(loggerService: getIt<LoggerService>(), apiClient: getIt()));
getIt.registerLazySingleton<QrParkingRepo>(() => QrParkingRepoImp(loggerService: getIt<LoggerService>(), apiClient: getIt()));
getIt.registerFactory<QrParkingViewModel>(
() => QrParkingViewModel(
qrParkingRepo: getIt<QrParkingRepo>(),
errorHandlerService: getIt<ErrorHandlerService>(),
cacheService: getIt<CacheService>(),
),
);
getIt.registerLazySingleton<NotificationsRepo>(() => NotificationsRepoImp(loggerService: getIt<LoggerService>(), apiClient: getIt()));
// ViewModels
@ -305,5 +299,13 @@ class AppDependencies {
activePrescriptionsRepo: getIt()
),
);
// getIt.registerFactory<QrParkingViewModel>(
// () => QrParkingViewModel(
// qrParkingRepo: getIt<QrParkingRepo>(),
// errorHandlerService: getIt<ErrorHandlerService>(),
// cacheService: getIt<CacheService>(),
// ),
// );
}
}

@ -281,9 +281,9 @@ class MyAppointmentsViewModel extends ChangeNotifier {
}
}
print('Upcoming Appointments: ${patientUpcomingAppointmentsHistoryList.length}');
print('Arrived Appointments: ${patientArrivedAppointmentsHistoryList.length}');
print('All Appointments: ${patientAppointmentsHistoryList.length}');
debugPrint('Upcoming Appointments: ${patientUpcomingAppointmentsHistoryList.length}');
debugPrint('Arrived Appointments: ${patientArrivedAppointmentsHistoryList.length}');
debugPrint('All Appointments: ${patientAppointmentsHistoryList.length}');
getFiltersForSelectedAppointmentList(filteredAppointmentList);
notifyListeners();
}

@ -475,7 +475,7 @@ abstract class LocaleKeys {
static const shareReview = 'shareReview';
static const review = 'review';
static const viewMedicalFile = 'viewMedicalFile';
static String get viewAllServices => 'viewAllServices';
static const viewAllServices = 'viewAllServices';
static const medicalFile = 'medicalFile';
static const verified = 'verified';
static const checkup = 'checkup';
@ -693,11 +693,7 @@ abstract class LocaleKeys {
static const bikini = 'bikini';
static const totalMinutes = 'totalMinutes';
static const feedback = 'feedback';
static const send = 'send';
static const status = 'status';
static const likeToHear = 'likeToHear';
static const subject = 'subject';
static const message = 'message';
static const emptySubject = 'emptySubject';
static const emptyMessage = 'emptyMessage';
static const selectAttachment = 'selectAttachment';
@ -876,5 +872,341 @@ abstract class LocaleKeys {
static const laserClinic = 'laserClinic';
static const continueString = 'continueString';
static const covid_info = 'covid_info';
static const appointmentDetails = 'appointmentDetails';
static const checkingDoctorAvailability = 'checkingDoctorAvailability';
static const cancellingAppointmentPleaseWait = 'cancellingAppointmentPleaseWait';
static const appointmentCancelledSuccessfully = 'appointmentCancelledSuccessfully';
static const notConfirmed = 'notConfirmed';
static const appointmentStatus = 'appointmentStatus';
static const doctorWillCallYou = 'doctorWillCallYou';
static const getDirections = 'getDirections';
static const notifyMeBeforeAppointment = 'notifyMeBeforeAppointment';
static const fetchingLabResults = 'fetchingLabResults';
static const fetchingRadiologyResults = 'fetchingRadiologyResults';
static const fetchingAppointmentPrescriptions = 'fetchingAppointmentPrescriptions';
static const noPrescriptionsForAppointment = 'noPrescriptionsForAppointment';
static const amountBeforeTax = 'amountBeforeTax';
static const rebookAppointment = 'rebookAppointment';
static const fetchingDoctorSchedulePleaseWait = 'fetchingDoctorSchedulePleaseWait';
static const pickADate = 'pickADate';
static const confirmingAppointmentPleaseWait = 'confirmingAppointmentPleaseWait';
static const appointmentConfirmedSuccessfully = 'appointmentConfirmedSuccessfully';
static const appointmentPayment = 'appointmentPayment';
static const checkingPaymentStatusPleaseWait = 'checkingPaymentStatusPleaseWait';
static const paymentFailedPleaseTryAgain = 'paymentFailedPleaseTryAgain';
static const appointmentCheckIn = 'appointmentCheckIn';
static const insuranceExpiredOrInactive = 'insuranceExpiredOrInactive';
static const totalAmountToPay = 'totalAmountToPay';
static const vat15 = 'vat15';
static const liveCare = 'liveCare';
static const recentVisits = 'recentVisits';
static const searchByClinic = 'searchByClinic';
static const tapToSelectClinic = 'tapToSelectClinic';
static const searchByDoctor = 'searchByDoctor';
static const tapToSelect = 'tapToSelect';
static const searchByRegion = 'searchByRegion';
static const centralRegion = 'centralRegion';
static const immediateConsultation = 'immediateConsultation';
static const scheduledConsultation = 'scheduledConsultation';
static const pharmaLiveCare = 'pharmaLiveCare';
static const notSureHelpMeChooseClinic = 'notSureHelpMeChooseClinic';
static const mentionYourSymptomsAndFindDoctors = 'mentionYourSymptomsAndFindDoctors';
static const immediateService = 'immediateService';
static const noNeedToWaitGetMedicalConsultation = 'noNeedToWaitGetMedicalConsultation';
static const noVisitRequired = 'noVisitRequired';
static const doctorWillContact = 'doctorWillContact';
static const specialisedDoctorWillContactYou = 'specialisedDoctorWillContactYou';
static const freeMedicineDelivery = 'freeMedicineDelivery';
static const offersFreeMedicineDelivery = 'offersFreeMedicineDelivery';
static const dentalChiefComplaints = 'dentalChiefComplaints';
static const viewAvailableAppointments = 'viewAvailableAppointments';
static const doctorProfile = 'doctorProfile';
static const waitingAppointment = 'waitingAppointment';
static const hospitalInformation = 'hospitalInformation';
static const fetchingAppointmentShare = 'fetchingAppointmentShare';
static const bookingYourAppointment = 'bookingYourAppointment';
static const selectLiveCareClinic = 'selectLiveCareClinic';
static const checkingForExistingDentalPlan = 'checkingForExistingDentalPlan';
static const dentalTreatmentPlan = 'dentalTreatmentPlan';
static const youHaveExistingTreatmentPlan = 'youHaveExistingTreatmentPlan';
static const mins = 'mins';
static const totalTimeRequired = 'totalTimeRequired';
static const wouldYouLikeToContinue = 'wouldYouLikeToContinue';
static const chooseDoctor = 'chooseDoctor';
static const viewNearestAppos = 'viewNearestAppos';
static const noDoctorFound = 'noDoctorFound';
static const yesPleasImInAHurry = 'yesPleasImInAHurry';
static const fetchingFeesPleaseWait = 'fetchingFeesPleaseWait';
static const noThanksPhysicalVisit = 'noThanksPhysicalVisit';
static const offline = 'offline';
static const videoCall = 'videoCall';
static const liveVideoCallWithHMGDoctors = 'liveVideoCallWithHMGDoctors';
static const audioCall = 'audioCall';
static const phoneCall = 'phoneCall';
static const livePhoneCallWithHMGDoctors = 'livePhoneCallWithHMGDoctors';
static const reviewLiveCareRequest = 'reviewLiveCareRequest';
static const selectedLiveCareType = 'selectedLiveCareType';
static const selectLiveCareCallType = 'selectLiveCareCallType';
static const confirmingLiveCareRequest = 'confirmingLiveCareRequest';
static const unknownErrorOccurred = 'unknownErrorOccurred';
static const liveCarePermissionsMessage = 'liveCarePermissionsMessage';
static const liveCarePayment = 'liveCarePayment';
static const mada = 'mada';
static const visaOrMastercard = 'visaOrMastercard';
static const tamara = 'tamara';
static const fetchingApplePayDetails = 'fetchingApplePayDetails';
static const liveCarePendingRequest = 'liveCarePendingRequest';
static const callLiveCareSupport = 'callLiveCareSupport';
static const whatIsWaitingAppointment = 'whatIsWaitingAppointment';
static const waitingAppointmentsFeature = 'waitingAppointmentsFeature';
static const appointmentWithDoctorConfirmed = 'appointmentWithDoctorConfirmed';
static const paymentWithinTenMinutes = 'paymentWithinTenMinutes';
static const liveLocation = 'liveLocation';
static const verifyYourLocationAtHospital = 'verifyYourLocationAtHospital';
static const error = 'error';
static const ensureWithinHospitalLocation = 'ensureWithinHospitalLocation';
static const nfcNearFieldCommunication = 'nfcNearFieldCommunication';
static const scanPhoneViaNFC = 'scanPhoneViaNFC';
static const qrCode = 'qrCode';
static const scanQRCodeToCheckIn = 'scanQRCodeToCheckIn';
static const processingCheckIn = 'processingCheckIn';
static const bookingWaitingAppointment = 'bookingWaitingAppointment';
static const enterValidIDorIqama = 'enterValidIDorIqama';
static const selectAppointment = 'selectAppointment';
static const rebookSameDoctor = 'rebookSameDoctor';
static const queueing = 'queueing';
static const inQueue = 'inQueue';
static const yourTurn = 'yourTurn';
static const halaFirstName = 'halaFirstName';
static const thankYouForPatience = 'thankYouForPatience';
static const servingNow = 'servingNow';
static const callForVitalSigns = 'callForVitalSigns';
static const callForDoctor = 'callForDoctor';
static const thingsToAskDoctor = 'thingsToAskDoctor';
static const improveOverallHealth = 'improveOverallHealth';
static const routineScreenings = 'routineScreenings';
static const whatIsThisMedicationFor = 'whatIsThisMedicationFor';
static const sideEffectsToKnow = 'sideEffectsToKnow';
static const whenFollowUp = 'whenFollowUp';
static const goToHomepage = 'goToHomepage';
static const appointmentsList = 'appointmentsList';
static const allAppt = 'allAppt';
static const upcoming = 'upcoming';
static const completed = 'completed';
static const noAppointmentsYet = 'noAppointmentsYet';
static const viewProfile = 'viewProfile';
static const choosePreferredHospitalForService = 'choosePreferredHospitalForService';
static const noHospitalsFound = 'noHospitalsFound';
static const cancelOrderConfirmation = 'cancelOrderConfirmation';
static const orderCancelledSuccessfully = 'orderCancelledSuccessfully';
static const requestID = 'requestID';
static const noCMCOrdersYet = 'noCMCOrdersYet';
static const cmcOrders = 'cmcOrders';
static const summary = 'summary';
static const selectedService = 'selectedService';
static const requestSubmittedSuccessfully = 'requestSubmittedSuccessfully';
static const hereIsYourRequestNumber = 'hereIsYourRequestNumber';
static const pleaseSelectHospitalToContinue = 'pleaseSelectHospitalToContinue';
static const confirmSubmitRequest = 'confirmSubmitRequest';
static const pendingOrderWait = 'pendingOrderWait';
static const noServicesAvailable = 'noServicesAvailable';
static const selectAService = 'selectAService';
static const comprehensiveCheckup = 'comprehensiveCheckup';
static const viewNearestHMGLocations = 'viewNearestHMGLocations';
static const provideFeedbackOnServices = 'provideFeedbackOnServices';
static const liveChatWithHMG = 'liveChatWithHMG';
static const send = 'send';
static const status = 'status';
static const sendingFeedback = 'sendingFeedback';
static const selectFeedbackType = 'selectFeedbackType';
static const loadingAppointmentsList = 'loadingAppointmentsList';
static const noAppointmentsForFeedback = 'noAppointmentsForFeedback';
static const selectedAppointment = 'selectedAppointment';
static const subject = 'subject';
static const enterSubjectHere = 'enterSubjectHere';
static const message = 'message';
static const enterMessageHere = 'enterMessageHere';
static const filesSelected = 'filesSelected';
static const otherDetails = 'otherDetails';
static const medicalReport = 'medicalReport';
static const medicalReportNumber = 'medicalReportNumber';
static const patientIsInsured = 'patientIsInsured';
static const insuranceDocument = 'insuranceDocument';
static const selectBranch = 'selectBranch';
static const patientInformation = 'patientInformation';
static const patientLocation = 'patientLocation';
static const identificationNumber = 'identificationNumber';
static const enterIdentificationNumber = 'enterIdentificationNumber';
static const patientName = 'patientName';
static const referralRequesterInformation = 'referralRequesterInformation';
static const enterReferralRequesterName = 'enterReferralRequesterName';
static const requesterName = 'requesterName';
static const relationship = 'relationship';
static const selectRelation = 'selectRelation';
static const otherName = 'otherName';
static const otherNameHint = 'otherNameHint';
static const requesterNameRequired = 'requesterNameRequired';
static const selectRelationshipRequired = 'selectRelationshipRequired';
static const otherRelationshipNameRequired = 'otherRelationshipNameRequired';
static const identificationNumberRequired = 'identificationNumberRequired';
static const patientNameRequired = 'patientNameRequired';
static const enterPatientPhoneRequired = 'enterPatientPhoneRequired';
static const selectPatientCityRequired = 'selectPatientCityRequired';
static const medicalReportRequired = 'medicalReportRequired';
static const selectBranchRequired = 'selectBranchRequired';
static const insuranceDocumentRequired = 'insuranceDocumentRequired';
static const searchResult = 'searchResult';
static const referralNo = 'referralNo';
static const eReferral = 'eReferral';
static const referralCreatedSuccessfully = 'referralCreatedSuccessfully';
static const hereIsYourReferralNumber = 'hereIsYourReferralNumber';
static const searchEReferral = 'searchEReferral';
static const enterRequiredInfoToSearch = 'enterRequiredInfoToSearch';
static const selectPickupDirection = 'selectPickupDirection';
static const selectDirection = 'selectDirection';
static const toHospital = 'toHospital';
static const fromHospital = 'fromHospital';
static const selectWay = 'selectWay';
static const oneWay = 'oneWay';
static const twoWay = 'twoWay';
static const selectPickupDetails = 'selectPickupDetails';
static const pleaseSelectDetailsOfPickup = 'pleaseSelectDetailsOfPickup';
static const selectDetails = 'selectDetails';
static const work = 'work';
static const pick = 'pick';
static const insideTheHome = 'insideTheHome';
static const haveAnyAppointment = 'haveAnyAppointment';
static const amountPaidAtHospital = 'amountPaidAtHospital';
static const submitRequest = 'submitRequest';
static const enterPickupLocationManually = 'enterPickupLocationManually';
static const enterPickupLocation = 'enterPickupLocation';
static const trackingDetails = 'trackingDetails';
static const cancelRequest = 'cancelRequest';
static const shareLocationWhatsapp = 'shareLocationWhatsapp';
static const pleaseWaitForCall = 'pleaseWaitForCall';
static const toHospitalLower = 'toHospitalLower';
static const contact = 'contact';
static const failed = 'failed';
static const confirmationCall = 'confirmationCall';
static const pickupFromHome = 'pickupFromHome';
static const onTheWayToHospital = 'onTheWayToHospital';
static const arrivedAtHospital = 'arrivedAtHospital';
static const orderCancel = 'orderCancel';
static const emergencyCheckIn = 'emergencyCheckIn';
static const erOnlineCheckInDescription = 'erOnlineCheckInDescription';
static const erOnlineCheckInSuccess = 'erOnlineCheckInSuccess';
static const erOnlineCheckInError = 'erOnlineCheckInError';
static const fetchingHospitalsList = 'fetchingHospitalsList';
static const fetchingPaymentInformation = 'fetchingPaymentInformation';
static const erVisitDetails = 'erVisitDetails';
static const erClinic = 'erClinic';
static const vatWithAmount = 'vatWithAmount';
static const erAppointmentBookedSuccess = 'erAppointmentBookedSuccess';
static const underProcessing = 'underProcessing';
static const canceledByPatient = 'canceledByPatient';
static const rapidResponseTeam = 'rapidResponseTeam';
static const allFacilities = 'allFacilities';
static const selectLocation = 'selectLocation';
static const pleaseSelectTheLocation = 'pleaseSelectTheLocation';
static const viewLocationGoogleMaps = 'viewLocationGoogleMaps';
static const callAmbulance = 'callAmbulance';
static const requestAmbulanceInEmergency = 'requestAmbulanceInEmergency';
static const confirmation = 'confirmation';
static const areYouSureYouWantToCallAmbulance = 'areYouSureYouWantToCallAmbulance';
static const getDetailsOfNearestBranch = 'getDetailsOfNearestBranch';
static const areYouSureYouWantToCallRRT = 'areYouSureYouWantToCallRRT';
static const priorERCheckInToSkipLine = 'priorERCheckInToSkipLine';
static const areYouSureYouWantToMakeERCheckIn = 'areYouSureYouWantToMakeERCheckIn';
static const checkingYourERAppointmentStatus = 'checkingYourERAppointmentStatus';
static const transportOptions = 'transportOptions';
static const selectHospitalForAdvancePayment = 'selectHospitalForAdvancePayment';
static const recharge = 'recharge';
static const activityLevel = 'activityLevel';
static const selectActivityLevel = 'selectActivityLevel';
static const caloriesPerDay = 'caloriesPerDay';
static const dietType = 'dietType';
static const selectDietType = 'selectDietType';
static const bodyFrameSize = 'bodyFrameSize';
static const selectBodyFrameSize = 'selectBodyFrameSize';
static const averageCycleLength = 'averageCycleLength';
static const averageLutealPhase = 'averageLutealPhase';
static const convert = 'convert';
static const calculate = 'calculate';
static const healthCalculators = 'healthCalculators';
static const healthConverters = 'healthConverters';
static const generalHealth = 'generalHealth';
static const relatedToBMICalories = 'relatedToBMICalories';
static const selectCalculator = 'selectCalculator';
static const womensHealth = 'womensHealth';
static const relatedToPeriodsOvulation = 'relatedToPeriodsOvulation';
static const bloodSugar = 'bloodSugar';
static const trackYourGlucoseLevels = 'trackYourGlucoseLevels';
static const bloodCholesterol = 'bloodCholesterol';
static const monitorCholesterolLevels = 'monitorCholesterolLevels';
static const triglyceridesFatBlood = 'triglyceridesFatBlood';
static const understandTriglyceridesImpact = 'understandTriglyceridesImpact';
static const bmiCalculator = 'bmiCalculator';
static const caloriesCalculator = 'caloriesCalculator';
static const bmrCalculator = 'bmrCalculator';
static const idealBodyWeight = 'idealBodyWeight';
static const bodyFatCalculator = 'bodyFatCalculator';
static const carbsProteinFat = 'carbsProteinFat';
static const ovulationPeriod = 'ovulationPeriod';
static const deliveryDueDate = 'deliveryDueDate';
static const low = 'low';
static const preDiabetic = 'preDiabetic';
static const high = 'high';
static const elevated = 'elevated';
static const recorded = 'recorded';
static const noRecordsYet = 'noRecordsYet';
static const lastRecord = 'lastRecord';
static const addBloodSugar = 'addBloodSugar';
static const addBloodPressure = 'addBloodPressure';
static const addWeight = 'addWeight';
static const bloodSugarDataSavedSuccessfully = 'bloodSugarDataSavedSuccessfully';
static const bloodPressureDataSavedSuccessfully = 'bloodPressureDataSavedSuccessfully';
static const weightDataSavedSuccessfully = 'weightDataSavedSuccessfully';
static const pleaseWait = 'pleaseWait';
static const selectUnit = 'selectUnit';
static const selectMeasureTime = 'selectMeasureTime';
static const selectArm = 'selectArm';
static const enterBloodSugar = 'enterBloodSugar';
static const enterSystolicValue = 'enterSystolicValue';
static const enterDiastolicValue = 'enterDiastolicValue';
static const enterWeight = 'enterWeight';
static const selectDuration = 'selectDuration';
static const systolic = 'systolic';
static const diastolic = 'diastolic';
static const sendReportByEmail = 'sendReportByEmail';
static const enterYourEmailToReceiveReport = 'enterYourEmailToReceiveReport';
static const addNewRecord = 'addNewRecord';
static const healthTrackers = 'healthTrackers';
static const monitorBloodPressureLevels = 'monitorBloodPressureLevels';
static const trackWeightProgress = 'trackWeightProgress';
static const bookAppointment = 'bookAppointment';
static const completeCheckup = 'completeCheckup';
static const indoorNavigation = 'indoorNavigation';
static const eReferralServices = 'eReferralServices';
static const dailyWaterMonitor = 'dailyWaterMonitor';
static const fetchingYourWaterIntakeDetails = 'fetchingYourWaterIntakeDetails';
static const healthCalculatorsServices = 'healthCalculatorsServices';
static const healthConvertersServices = 'healthConvertersServices';
static const smartWatchesServices = 'smartWatchesServices';
static const exploreServices = 'exploreServices';
static const medicalAndCareServices = 'medicalAndCareServices';
static const hmgServices = 'hmgServices';
static const personalServices = 'personalServices';
static const habibWallet = 'habibWallet';
static const loginToViewWalletBalance = 'loginToViewWalletBalance';
static const loginToViewMedicalFile = 'loginToViewMedicalFile';
static const addMember = 'addMember';
static const addFamilyMember = 'addFamilyMember';
static const pleaseFillBelowFieldToAddNewFamilyMember = 'pleaseFillBelowFieldToAddNewFamilyMember';
static const healthTools = 'healthTools';
static const supportServices = 'supportServices';
static const virtualTour = 'virtualTour';
static const carParking = 'carParking';
static const latestNews = 'latestNews';
static const hmgContact = 'hmgContact';
}

@ -87,7 +87,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
children: [
Expanded(
child: CollapsingListView(
title: "Appointment Details".needTranslation,
title: LocaleKeys.appointmentDetails.tr(),
report: AppointmentType.isArrived(widget.patientAppointmentHistoryResponseModel)
? () {
contactUsViewModel.setPatientFeedbackSelectedAppointment(widget.patientAppointmentHistoryResponseModel);
@ -105,14 +105,13 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
AppointmentDoctorCard(
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
onAskDoctorTap: () async {
LoaderBottomSheet.showLoader(loadingText: "Checking doctor availability...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingDoctorAvailability.tr());
await myAppointmentsViewModel.isDoctorAvailable(
projectID: widget.patientAppointmentHistoryResponseModel.projectID,
doctorId: widget.patientAppointmentHistoryResponseModel.doctorID,
clinicId: widget.patientAppointmentHistoryResponseModel.clinicID,
onSuccess: (value) async {
if (value) {
print("Doctor is available");
await myAppointmentsViewModel.getAskDoctorRequestTypes(onSuccess: (val) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
@ -129,14 +128,14 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
);
});
} else {
print("Doctor is not available");
debugPrint("Doctor is not available");
}
});
},
onCancelTap: () async {
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
LoaderBottomSheet.showLoader(loadingText: "Cancelling Appointment, Please Wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.cancellingAppointmentPleaseWait.tr());
await myAppointmentsViewModel.cancelAppointment(
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
onSuccess: (apiResponse) {
@ -145,7 +144,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
myAppointmentsViewModel.getPatientAppointments(true, false);
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getSuccessWidget(loadingText: "Appointment Cancelled Successfully".needTranslation),
child: Utils.getSuccessWidget(loadingText: LocaleKeys.appointmentCancelledSuccessfully.tr()),
callBackFunc: () {
Navigator.of(context).pop();
},
@ -182,13 +181,13 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
children: [
Row(
children: [
"Appointment Status".needTranslation.toText16(isBold: true),
LocaleKeys.appointmentStatus.tr().toText16(isBold: true),
],
),
SizedBox(height: 4.h),
(!AppointmentType.isConfirmed(widget.patientAppointmentHistoryResponseModel)
? "Not Confirmed".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500)
: "Confirmed".needTranslation.toText12(color: AppColors.successColor, fontWeight: FontWeight.w500)),
? LocaleKeys.notConfirmed.tr().toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500)
: LocaleKeys.confirmed.tr().toText12(color: AppColors.successColor, fontWeight: FontWeight.w500)),
SizedBox(height: 16.h),
//TODO Add countdown timer in case of LiveCare Appointment
widget.patientAppointmentHistoryResponseModel.isLiveCareAppointment ?? false
@ -200,9 +199,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"The doctor will call you once the appointment time approaches."
.needTranslation
.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
LocaleKeys.doctorWillCallYou.tr().toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
],
),
),
@ -224,11 +221,11 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
child: SizedBox(
width: MediaQuery.of(context).size.width * 0.785,
child: CustomButton(
text: "Get Directions".needTranslation,
onPressed: () {
MapsLauncher.launchCoordinates(double.parse(widget.patientAppointmentHistoryResponseModel.latitude!),
double.parse(widget.patientAppointmentHistoryResponseModel.longitude!), widget.patientAppointmentHistoryResponseModel.projectName);
},
text: LocaleKeys.getDirections.tr(),
backgroundColor: AppColors.textColor.withValues(alpha: 0.8),
borderColor: AppointmentType.getNextActionButtonColor(widget.patientAppointmentHistoryResponseModel.nextAction).withValues(alpha: 0.01),
textColor: AppColors.whiteColor,
@ -283,9 +280,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.setReminder.tr(context: context).toText13(isBold: true),
"Notify me before the appointment"
.needTranslation
.toText11(color: AppColors.textColorLight, weight: FontWeight.w500),
LocaleKeys.notifyMeBeforeAppointment.tr().toText11(color: AppColors.textColorLight, weight: FontWeight.w500),
],
),
const Spacer(),
@ -307,8 +302,9 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
"${widget.patientAppointmentHistoryResponseModel.appointmentNo}"??"",
"",
"",
title: "Appointment with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj}".needTranslation,
description:"${widget.patientAppointmentHistoryResponseModel.doctorNameObj} will be having an appointment on ${widget.patientAppointmentHistoryResponseModel.appointmentDate}".needTranslation,
title: "Appointment with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj}",
description:
"${widget.patientAppointmentHistoryResponseModel.doctorNameObj} will be having an appointment on ${widget.patientAppointmentHistoryResponseModel.appointmentDate}",
onSuccess: () {
setState(() {
myAppointmentsViewModel.setAppointmentReminder(newValue, widget.patientAppointmentHistoryResponseModel);
@ -318,10 +314,10 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
onMultiDateSuccess: (int selectedIndex) async {
isEventAddedOrRemoved = await calender.createOrUpdateEvent(
title: "Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} on ${DateUtil.convertStringToDate(widget
.patientAppointmentHistoryResponseModel.appointmentDate)}, Appointment #${widget.patientAppointmentHistoryResponseModel.appointmentNo}".needTranslation,
description: "Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} in ${widget
.patientAppointmentHistoryResponseModel.projectName}",
title:
"Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} on ${DateUtil.convertStringToDate(widget.patientAppointmentHistoryResponseModel.appointmentDate)}, Appointment #${widget.patientAppointmentHistoryResponseModel.appointmentNo}",
description:
"Appointment Reminder with ${widget.patientAppointmentHistoryResponseModel.doctorNameObj} in ${widget.patientAppointmentHistoryResponseModel.projectName}",
scheduleDateTime: DateUtil.convertStringToDate(widget
.patientAppointmentHistoryResponseModel.appointmentDate),
eventId: "${widget.patientAppointmentHistoryResponseModel.appointmentNo}",
@ -369,7 +365,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
isLargeText: true,
iconSize: 36.w,
).onPress(() async {
LoaderBottomSheet.showLoader(loadingText: "Fetching Lab Results...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingLabResults.tr());
await labViewModel.getLabResultsByAppointmentNo(
appointmentNo: widget.patientAppointmentHistoryResponseModel.appointmentNo,
projectID: widget.patientAppointmentHistoryResponseModel.projectID,
@ -402,7 +398,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
isLargeText: true,
iconSize: 36.w,
).onPress(() async {
LoaderBottomSheet.showLoader(loadingText: "Fetching Radiology Results...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingRadiologyResults.tr());
await radiologyViewModel.getPatientRadiologyOrdersByAppointment(
appointmentNo: widget.patientAppointmentHistoryResponseModel.appointmentNo,
projectID: widget.patientAppointmentHistoryResponseModel.projectID,
@ -429,7 +425,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
isLargeText: true,
iconSize: 36.w,
).onPress(() async {
LoaderBottomSheet.showLoader(loadingText: "Fetching Appointment Prescriptions...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingAppointmentPrescriptions.tr());
await prescriptionsViewModel.getPrescriptionDetails(
getPrescriptionRequestModel(),
onSuccess: (val) {
@ -457,8 +453,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
} else {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(
loadingText: "You don't have any prescriptions for this appointment.".needTranslation),
child: Utils.getErrorWidget(loadingText: LocaleKeys.noPrescriptionsForAppointment.tr()),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
@ -713,7 +708,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Amount before tax".needTranslation.toText18(isBold: true),
LocaleKeys.amountBeforeTax.tr().toText18(isBold: true),
Utils.getPaymentAmountWithSymbol(
widget.patientAppointmentHistoryResponseModel.patientShare!.toString().toText16(isBold: true),
AppColors.blackColor,
@ -730,7 +725,6 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
.tr(context: context)
.toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor)),
"VAT 15%(${widget.patientAppointmentHistoryResponseModel.patientTaxAmount})"
.needTranslation
.toText14(isBold: true, color: AppColors.greyTextColor, letterSpacing: -2),
],
),
@ -758,7 +752,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
).paddingOnly(left: 16.h, top: 24.h, right: 16.h, bottom: 0.h),
AppointmentType.isArrived(widget.patientAppointmentHistoryResponseModel)
? CustomButton(
text: "Re-book Appointment".needTranslation,
text: LocaleKeys.rebookAppointment.tr(),
onPressed: () {
openDoctorScheduleCalendar();
},
@ -816,13 +810,13 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
projectName: widget.patientAppointmentHistoryResponseModel.projectName,
);
bookAppointmentsViewModel.setSelectedDoctor(doctor);
LoaderBottomSheet.showLoader(loadingText: "Fetching Doctor Schedule, Please Wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingDoctorSchedulePleaseWait.tr());
await bookAppointmentsViewModel.getDoctorFreeSlots(
isBookingForLiveCare: false,
onSuccess: (dynamic respData) async {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
title: "Pick a Date".needTranslation,
title: LocaleKeys.pickADate.tr(),
context,
child: AppointmentCalendar(),
isFullScreen: false,
@ -847,15 +841,14 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
case 0:
break;
case 10:
LoaderBottomSheet.showLoader(loadingText: "Confirming Appointment, Please Wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.confirmingAppointmentPleaseWait.tr());
await myAppointmentsViewModel.confirmAppointment(
patientAppointmentHistoryResponseModel: widget.patientAppointmentHistoryResponseModel,
onSuccess: (apiResponse) {
LoaderBottomSheet.hideLoader();
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
myAppointmentsViewModel.getPatientAppointments(true, false);
showCommonBottomSheet(context, child: Utils.getSuccessWidget(loadingText: "Appointment Confirmed Successfully".needTranslation),
callBackFunc: (str) {
showCommonBottomSheet(context, child: Utils.getSuccessWidget(loadingText: LocaleKeys.appointmentConfirmedSuccessfully.tr()), callBackFunc: (str) {
Navigator.of(context).pop();
},
title: "",

@ -90,7 +90,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
children: [
Expanded(
child: CollapsingListView(
title: "Appointment Payment".needTranslation,
title: LocaleKeys.appointmentPayment.tr(),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -111,7 +111,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
Image.asset(AppAssets.mada, width: 72.h, height: 25.h)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
SizedBox(height: 16.h),
"Mada".needTranslation.toText16(isBold: true).toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
"Mada".toText16(isBold: true).toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
],
),
SizedBox(width: 8.h),
@ -154,7 +154,6 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
).toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
SizedBox(height: 16.h),
"Visa or Mastercard"
.needTranslation
.toText16(isBold: true)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
],
@ -195,7 +194,6 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
.toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
SizedBox(height: 16.h),
"Tamara"
.needTranslation
.toText16(isBold: true)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentPatientShareLoading),
],
@ -250,8 +248,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Insurance expired or inactive"
.needTranslation
LocaleKeys.insuranceExpiredOrInactive.tr()
.toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500)
.paddingSymmetrical(24.h, 0.h),
CustomButton(
@ -277,12 +274,12 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
)
: const SizedBox(),
SizedBox(height: 24.h),
"Total amount to pay".needTranslation.toText18(isBold: true).paddingSymmetrical(24.h, 0.h),
LocaleKeys.totalAmountToPay.tr().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().toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(
myAppointmentsVM.patientAppointmentShareResponseModel!.patientShare!.toString().toText16(isBold: true),
AppColors.blackColor,
@ -293,7 +290,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"VAT 15%".needTranslation.toText14(isBold: true, color: AppColors.greyTextColor),
"VAT 15%".toText14(isBold: true, color: AppColors.greyTextColor),
Utils.getPaymentAmountWithSymbol(
myAppointmentsVM.patientAppointmentShareResponseModel!.patientTaxAmount!
.toString()
@ -307,7 +304,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"".needTranslation.toText14(isBold: true),
"".toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(
myAppointmentsVM.patientAppointmentShareResponseModel!.patientShareWithTax!.toString().toText24(isBold: true),
AppColors.blackColor,
@ -383,7 +380,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
}
void checkPaymentStatus() async {
LoaderBottomSheet.showLoader(loadingText: "Checking payment status, Please wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr());
if (selectedPaymentMethod == "TAMARA") {
await payfortViewModel.checkTamaraPaymentStatus(
transactionID: transID,
@ -441,7 +438,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Payment Failed! Please try again.".needTranslation),
child: Utils.getErrorWidget(loadingText: LocaleKeys.paymentFailedPleaseTryAgain.tr()),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
@ -522,7 +519,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
} else {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Payment Failed! Please try again.".needTranslation),
child: Utils.getErrorWidget(loadingText: LocaleKeys.paymentFailedPleaseTryAgain.tr()),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: 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_state.dart';
@ -7,6 +8,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/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/home/navigation_screen.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
@ -30,7 +32,7 @@ class AppointmentQueuePage extends StatelessWidget {
children: [
Expanded(
child: CollapsingListView(
title: "Queueing".needTranslation,
title: LocaleKeys.queueing.tr(context: context),
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.all(24.0),
@ -57,7 +59,7 @@ class AppointmentQueuePage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppCustomChipWidget(
labelText: myAppointmentsVM.currentQueueStatus == 0 ? "In Queue".needTranslation : "Your Turn".needTranslation,
labelText: myAppointmentsVM.currentQueueStatus == 0 ? LocaleKeys.inQueue.tr(context: context) : LocaleKeys.yourTurn.tr(context: context),
backgroundColor: Utils.getCardBorderColor(myAppointmentsVM.currentQueueStatus).withValues(alpha: 0.20),
textColor: Utils.getCardBorderColor(myAppointmentsVM.currentQueueStatus),
),
@ -66,12 +68,10 @@ class AppointmentQueuePage extends StatelessWidget {
).toShimmer2(isShow: myAppointmentsVM.isAppointmentQueueDetailsLoading),
SizedBox(height: 10.h),
"Hala ${appState!.getAuthenticatedUser()!.firstName}!!!"
.needTranslation
.toText16(isBold: true)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentQueueDetailsLoading),
SizedBox(height: 8.h),
"Thank you for your patience, here is your queue number."
.needTranslation
LocaleKeys.thankYouForPatience.tr(context: context)
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentQueueDetailsLoading),
SizedBox(height: 8.h),
@ -111,8 +111,7 @@ class AppointmentQueuePage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Serving Now"
.needTranslation
LocaleKeys.servingNow.tr(context: context)
.toText16(isBold: true)
.toShimmer2(isShow: myAppointmentsVM.isAppointmentQueueDetailsLoading),
SizedBox(height: 18.h),
@ -138,8 +137,8 @@ class AppointmentQueuePage extends StatelessWidget {
? AppAssets.call_for_vitals
: AppAssets.call_for_doctor,
labelText: myAppointmentsVM.patientQueueDetailsList[index].callType == 1
? "Call for vital signs".needTranslation
: "Call for Doctor".needTranslation,
? LocaleKeys.callForVitalSigns.tr(context: context)
: LocaleKeys.callForDoctor.tr(context: context),
iconColor: myAppointmentsVM.patientQueueDetailsList[index].callType == 1
? AppColors.primaryRedColor
: AppColors.successColor,
@ -180,35 +179,23 @@ class AppointmentQueuePage extends StatelessWidget {
children: [
Utils.buildSvgWithAssets(icon: AppAssets.bulb_icon, width: 24.w, height: 24.h),
SizedBox(width: 8.w),
"Things to ask your doctor today".needTranslation.toText16(isBold: true),
LocaleKeys.thingsToAskDoctor.tr(context: context).toText16(isBold: true),
],
),
SizedBox(height: 8.h),
// What can I do to improve my overall health?
// Are there any routine screenings I should get?
// What is this medication for?
// Are there any side effects I should know about?
// When should I come back for a follow-up?
"${"What can I do to improve my overall health?"}"
.needTranslation
"${LocaleKeys.improveOverallHealth.tr(context: context)}"
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
SizedBox(height: 4.h),
"${"Are there any routine screenings I should get?"}"
.needTranslation
"${LocaleKeys.routineScreenings.tr(context: context)}"
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
SizedBox(height: 4.h),
"${"What is this medication for?"}"
.needTranslation
"${LocaleKeys.whatIsThisMedicationFor.tr(context: context)}"
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
SizedBox(height: 4.h),
"${"Are there any side effects I should know about?"}"
.needTranslation
"${LocaleKeys.sideEffectsToKnow.tr(context: context)}"
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
SizedBox(height: 4.h),
"${"When should I come back for a follow-up?"}"
.needTranslation
"${LocaleKeys.whenFollowUp.tr(context: context)}"
.toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight),
SizedBox(height: 16.h),
@ -229,7 +216,7 @@ class AppointmentQueuePage extends StatelessWidget {
hasShadow: true,
),
child: CustomButton(
text: "Go to homepage".needTranslation,
text: LocaleKeys.goToHomepage.tr(context: context),
onPressed: () {
Navigator.pushAndRemoveUntil(
context,
@ -249,11 +236,10 @@ class AppointmentQueuePage extends StatelessWidget {
icon: AppAssets.homeBottom,
iconColor: AppColors.whiteColor,
iconSize: 18.h,
).paddingSymmetrical(16.h, 24.h),
)
).paddingSymmetrical(24.h, 24.h),
),
],
);
}),
);
}));
}
}

@ -56,7 +56,7 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
return Scaffold(
backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView(
title: "Appointments List".needTranslation,
title: LocaleKeys.appointmentsList.tr(context: context),
child: SingleChildScrollView(
child: Column(
children: [
@ -65,9 +65,9 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
activeTextColor: Color(0xffED1C2B),
activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1),
tabs: [
CustomTabBarModel(null, "All Appt.".needTranslation),
CustomTabBarModel(null, "Upcoming".needTranslation),
CustomTabBarModel(null, "Completed".needTranslation),
CustomTabBarModel(null, LocaleKeys.allAppt.tr(context: context)),
CustomTabBarModel(null, LocaleKeys.upcoming.tr(context: context)),
CustomTabBarModel(null, LocaleKeys.completed.tr(context: context)),
],
onTabChange: (index) {
setState(() {
@ -248,7 +248,7 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
)
: Utils.getNoDataWidget(
context,
noDataText: "You don't have any appointments yet.".needTranslation,
noDataText: LocaleKeys.noAppointmentsYet.tr(context: context),
callToActionButton: CustomButton(
text: LocaleKeys.bookAppo.tr(context: context),
onPressed: () {
@ -296,7 +296,7 @@ class _MyAppointmentsPageState extends State<MyAppointmentsPage> {
onClicked: () {
if (myAppointmentsVM.availableFilters[index] == AppointmentListingFilters.DATESELECTION) {
showCommonBottomSheetWithoutHeight(
title: "Set The Date Range".needTranslation,
title: LocaleKeys.setTheDateRange.tr(context: context),
context,
child: DateRangeSelector(
onRangeSelected: (start, end) {

@ -211,7 +211,7 @@ class _MyDoctorsPageState extends State<MyDoctorsPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppCustomChipWidget(labelText: "${group.length} ${'doctors'.needTranslation}"),
AppCustomChipWidget(labelText: "${group.length} ${'doctors'}"),
Icon(isExpanded ? Icons.expand_less : Icons.expand_more),
],
),
@ -284,7 +284,7 @@ class _MyDoctorsPageState extends State<MyDoctorsPage> {
icon: AppAssets.view_report_icon,
iconColor: AppColors.primaryRedColor,
iconSize: 16.h,
text: "View Profile".needTranslation.tr(context: context),
text: LocaleKeys.viewProfile.tr(context: context),
onPressed: () async {
bookAppointmentsViewModel.setSelectedDoctor(DoctorsListResponseModel(
clinicID: doctor?.clinicID ?? 0,

@ -96,13 +96,13 @@ class AppointmentCard extends StatelessWidget {
AppCustomChipWidget(
icon: isLoading ? AppAssets.walkin_appointment_icon : (isLiveCare ? AppAssets.small_livecare_icon : AppAssets.walkin_appointment_icon),
iconColor: isLoading ? AppColors.textColor : (isLiveCare ? AppColors.whiteColor : AppColors.textColor),
labelText: isLoading ? 'Walk In'.needTranslation : (isLiveCare ? LocaleKeys.livecare.tr(context: context) : 'Walk In'.needTranslation),
labelText: isLoading ? LocaleKeys.walkin.tr(context: context) : (isLiveCare ? LocaleKeys.livecare.tr(context: context) : LocaleKeys.walkin.tr(context: context)),
backgroundColor: isLoading ? AppColors.greyColor : (isLiveCare ? AppColors.successColor : AppColors.greyColor),
textColor: isLoading ? AppColors.textColor : (isLiveCare ? AppColors.whiteColor : AppColors.textColor),
).toShimmer2(isShow: isLoading),
AppCustomChipWidget(
labelText: isLoading
? 'OutPatient'.needTranslation
? 'OutPatient'
: (appState.isArabic()
? patientAppointmentHistoryResponseModel.isInOutPatientDescriptionN!
: patientAppointmentHistoryResponseModel.isInOutPatientDescription!),
@ -111,7 +111,7 @@ class AppointmentCard extends StatelessWidget {
).toShimmer2(isShow: isLoading),
AppCustomChipWidget(
labelText: isLoading
? 'Booked'.needTranslation
? 'Booked'
: AppointmentType.getAppointmentStatusType(patientAppointmentHistoryResponseModel.patientStatusType!),
backgroundColor: AppColors.successColor.withValues(alpha: 0.1),
textColor: AppColors.successColor,
@ -229,7 +229,7 @@ class AppointmentCard extends StatelessWidget {
return SizedBox.shrink();
} else {
return CustomButton(
text: 'Select appointment'.needTranslation,
text: LocaleKeys.selectAppointment.tr(context: context),
onPressed: () {
if (isForFeedback) {
contactUsViewModel!.setPatientFeedbackSelectedAppointment(patientAppointmentHistoryResponseModel);
@ -310,7 +310,7 @@ class AppointmentCard extends StatelessWidget {
return CustomButton(
text: LocaleKeys.askDoctor.tr(context: context),
onPressed: () async {
LoaderBottomSheet.showLoader(loadingText: "Checking doctor availability...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingDoctorAvailability.tr(context: context));
await myAppointmentsViewModel.isDoctorAvailable(
projectID: patientAppointmentHistoryResponseModel.projectID,
doctorId: patientAppointmentHistoryResponseModel.doctorID,
@ -353,7 +353,7 @@ class AppointmentCard extends StatelessWidget {
}
return CustomButton(
text: 'Rebook with same doctor'.needTranslation,
text: LocaleKeys.rebookSameDoctor.tr(context: context),
onPressed: () => openDoctorScheduleCalendar(context),
backgroundColor: AppColors.greyColor,
borderColor: AppColors.greyColor,
@ -417,7 +417,7 @@ class AppointmentCard extends StatelessWidget {
context,
child: AppointmentCalendar(),
callBackFunc: () {},
title: 'Pick a Date'.needTranslation,
title: LocaleKeys.pickADate.tr(context: context),
isFullScreen: false,
isCloseButtonVisible: true,
);

@ -45,8 +45,8 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
children: [
checkInOptionCard(
AppAssets.checkin_location_icon,
"Live Location".needTranslation,
"Verify your location to be at hospital to check in".needTranslation,
LocaleKeys.liveLocation.tr(context: context),
LocaleKeys.verifyYourLocationAtHospital.tr(context: context),
).onPress(() {
// locationUtils = LocationUtils(
// isShowConfirmDialog: false,
@ -61,8 +61,10 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
sendCheckInRequest(projectDetailListModel.checkInQrCode!, 3, context);
} else {
showCommonBottomSheetWithoutHeight(context,
title: "Error".needTranslation,
child: Utils.getErrorWidget(loadingText: "Please ensure you're within the hospital location to perform online check-in.".needTranslation), callBackFunc: () {
title: LocaleKeys.error.tr(context: context),
child: Utils.getErrorWidget(
loadingText: LocaleKeys.ensureWithinHospitalLocation.tr(context: context),
), callBackFunc: () {
Navigator.of(context).pop();
}, isFullScreen: false);
}
@ -71,8 +73,8 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
SizedBox(height: 16.h),
checkInOptionCard(
AppAssets.checkin_nfc_icon,
"NFC (Near Field Communication)".needTranslation,
"Scan your phone via NFC board to check in".needTranslation,
LocaleKeys.nfcNearFieldCommunication.tr(context: context),
LocaleKeys.scanPhoneViaNFC.tr(context: context),
).onPress(() {
Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) {
@ -85,8 +87,8 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
SizedBox(height: 16.h),
checkInOptionCard(
AppAssets.checkin_qr_icon,
"QR Code".needTranslation,
"Scan QR code with your camera to check in".needTranslation,
LocaleKeys.qrCode.tr(context: context),
LocaleKeys.scanQRCodeToCheckIn.tr(context: context),
).onPress(() async {
String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent));
if (onlineCheckInQRCode != "") {
@ -139,14 +141,16 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
}
void sendCheckInRequest(String scannedCode, int checkInType, BuildContext context) async {
LoaderBottomSheet.showLoader(loadingText: "Processing Check-In...".needTranslation);
LoaderBottomSheet.showLoader(
loadingText: LocaleKeys.processingCheckIn.tr(context: context),
);
await myAppointmentsViewModel.sendCheckInNfcRequest(
patientAppointmentHistoryResponseModel: patientAppointmentHistoryResponseModel,
scannedCode: scannedCode,
checkInType: checkInType,
onSuccess: (apiResponse) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(context, title: "Success".needTranslation, child: Utils.getSuccessWidget(loadingText: LocaleKeys.success.tr()), callBackFunc: () async {
showCommonBottomSheetWithoutHeight(context, title: LocaleKeys.success.tr(context: context), child: Utils.getSuccessWidget(loadingText: LocaleKeys.success.tr()), callBackFunc: () async {
await myAppointmentsViewModel.getPatientAppointmentQueueDetails();
Navigator.of(context).pop();
Navigator.pushAndRemoveUntil(
@ -164,7 +168,7 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
},
onError: (error) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(context, title: "Error".needTranslation, child: Utils.getErrorWidget(loadingText: error), callBackFunc: () {
showCommonBottomSheetWithoutHeight(context, title: LocaleKeys.error.tr(context: context), child: Utils.getErrorWidget(loadingText: error), callBackFunc: () {
Navigator.of(context).pop();
}, isFullScreen: false);
},

@ -114,7 +114,7 @@ class AppointmentDoctorCard extends StatelessWidget {
iconColor: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.textColor : AppColors.whiteColor,
labelText: patientAppointmentHistoryResponseModel.isLiveCareAppointment!
? LocaleKeys.livecare.tr(context: context)
: "Walk In".needTranslation,
: LocaleKeys.walkin.tr(context: context),
backgroundColor:
!patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.greyColor : AppColors.successColor,
textColor: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.textColor : AppColors.whiteColor,
@ -160,7 +160,7 @@ class AppointmentDoctorCard extends StatelessWidget {
iconColor: AppColors.primaryRedColor,
)
: CustomButton(
text: "Rebook with same doctor".needTranslation,
text: LocaleKeys.rebookSameDoctor.tr(),
onPressed: () {
onRescheduleTap();
},

@ -105,7 +105,7 @@ class AskDoctorRequestTypeSelect extends StatelessWidget {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getSuccessWidget(loadingText: "Request has been sent successfully, you will be contacted soon.".needTranslation),
child: Utils.getSuccessWidget(loadingText: "Request has been sent successfully, you will be contacted soon."),
callBackFunc: () {
Navigator.of(context).pop();
},

@ -46,7 +46,7 @@ class FacilityTypeSelectionWidget extends StatelessWidget {
SizedBox(height: 24.h),
FacilitySelectionItem(
svgPath: AppAssets.hmg,
title: "HMG".needTranslation,
title: "HMG",
subTitle: LocaleKeys.hospitalsWithCount.tr(namedArgs: {
'count':
"${bookAppointmentViewModel.hospitalList?.registeredDoctorMap?[selectedRegion]?.hmgSize ?? 0}"
@ -63,7 +63,7 @@ class FacilityTypeSelectionWidget extends StatelessWidget {
SizedBox(height: 16.h),
FacilitySelectionItem(
svgPath: AppAssets.hmc,
title: "HMC".needTranslation,
title: "HMC",
subTitle: LocaleKeys.medicalCentersWithCount.tr(namedArgs: {
'count':
"${bookAppointmentViewModel.hospitalList?.registeredDoctorMap?[selectedRegion]?.hmcSize ?? 0}"

@ -76,7 +76,7 @@ class HospitalListItem extends StatelessWidget {
Visibility(
visible: (hospitalData?.distanceInKMs != "0"),
child: AppCustomChipWidget(
labelText: "${hospitalData?.distanceInKMs ?? ""} km".needTranslation,
labelText: "${hospitalData?.distanceInKMs ?? ""} km",
deleteIcon: AppAssets.location_red,
deleteIconSize: Size(9, 12),
backgroundColor: AppColors.secondaryLightRedColor,
@ -88,7 +88,7 @@ class HospitalListItem extends StatelessWidget {
child: Row(
children: [
AppCustomChipWidget(
labelText: "Distance not available".needTranslation,
labelText: "Distance not available",
textColor: AppColors.blackColor,
),
// SizedBox(
@ -99,7 +99,7 @@ class HospitalListItem extends StatelessWidget {
Visibility(
visible: !isLocationEnabled,
child: AppCustomChipWidget(
labelText: "Location turned off".needTranslation,
labelText: "Location turned off",
deleteIcon: AppAssets.location_unavailable,
deleteIconSize: Size(9.w, 12.h),
textColor: AppColors.blackColor,

@ -23,7 +23,7 @@ class TypeSelectionWidget extends StatelessWidget {
mainAxisSize: MainAxisSize.max,
children: [
AppCustomChipWidget(
labelText: "All Facilities".needTranslation,
labelText: "All Facilities",
shape: RoundedRectangleBorder(
side: BorderSide(
color: data.currentlySelectedFacility == FacilitySelection.ALL
@ -45,7 +45,7 @@ class TypeSelectionWidget extends StatelessWidget {
AppCustomChipWidget(
icon: AppAssets.hmg,
iconHasColor: false,
labelText: "Hospitals".needTranslation,
labelText: "Hospitals",
shape: RoundedRectangleBorder(
side: BorderSide(
color: data.currentlySelectedFacility == FacilitySelection.HMG
@ -67,7 +67,7 @@ class TypeSelectionWidget extends StatelessWidget {
AppCustomChipWidget(
icon: AppAssets.hmc,
iconHasColor: false,
labelText: "Medical Centers".needTranslation,
labelText: "Medical Centers",
shape: RoundedRectangleBorder(
side: BorderSide(
color: data.currentlySelectedFacility == FacilitySelection.HMC

@ -87,7 +87,7 @@ class LoginScreenState extends State<LoginScreen> {
isAllowLeadingIcon: true,
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 10.h),
leadingIcon: AppAssets.student_card,
errorMessage: "Please enter a valid national ID or file number".needTranslation,
errorMessage: LocaleKeys.enterValidIDorIqama.tr(),
hasError: false,
),
SizedBox(height: 16.h),

@ -112,7 +112,7 @@ class _RegisterNew extends State<RegisterNew> {
Divider(height: 1),
TextInputWidget(
labelText: LocaleKeys.dob.tr(),
hintText: "11 July, 1994".needTranslation,
hintText: "11 July, 1994",
controller: authVm.dobController,
focusNode: _dobFocusNode,
isEnable: true,

@ -89,8 +89,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1),
initialIndex: bookAppointmentsVM.selectedTabIndex,
tabs: [
CustomTabBarModel(null, "General".needTranslation),
CustomTabBarModel(null, "LiveCare".needTranslation),
CustomTabBarModel(null, LocaleKeys.general.tr()),
CustomTabBarModel(null, LocaleKeys.liveCare.tr()),
],
onTabChange: (index) {
bookAppointmentsVM.onTabChanged(index);
@ -121,7 +121,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (appState.isAuthenticated) ...[],
"Recent Visits".needTranslation.toText18(isBold: true).paddingSymmetrical(24.w, 0.h),
LocaleKeys.recentVisits.tr().toText18(isBold: true).paddingSymmetrical(24.w, 0.h),
SizedBox(height: 16.h),
SizedBox(
height: 110.h,
@ -232,8 +232,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Search By Clinic".needTranslation.toText14(color: AppColors.textColor, weight: FontWeight.w500),
"Tap to select clinic".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
LocaleKeys.searchByClinic.tr().toText14(color: AppColors.textColor, weight: FontWeight.w500),
LocaleKeys.tapToSelectClinic.tr().toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
],
),
],
@ -264,8 +264,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Search By Doctor".needTranslation.toText14(color: AppColors.textColor, weight: FontWeight.w500),
"Tap to select".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
LocaleKeys.searchByDoctor.tr().toText14(color: AppColors.textColor, weight: FontWeight.w500),
LocaleKeys.tapToSelect.tr().toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
],
),
],
@ -294,8 +294,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Search By Region".needTranslation.toText14(color: AppColors.textColor, weight: FontWeight.w500),
"Central Region".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
LocaleKeys.searchByRegion.tr().toText14(color: AppColors.textColor, weight: FontWeight.w500),
LocaleKeys.centralRegion.tr().toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
],
),
],
@ -340,8 +340,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Immediate Consultation".needTranslation.toText14(color: AppColors.textColor, weight: FontWeight.w500),
"Tap to select clinic".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
LocaleKeys.immediateConsultation.tr().toText14(color: AppColors.textColor, weight: FontWeight.w500),
LocaleKeys.tapToSelectClinic.tr().toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
],
),
],
@ -382,8 +382,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Scheduled Consultation".needTranslation.toText14(color: AppColors.textColor, weight: FontWeight.w500),
"Tap to select clinic".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
LocaleKeys.scheduledConsultation.tr().toText14(color: AppColors.textColor, weight: FontWeight.w500),
LocaleKeys.tapToSelectClinic.tr().toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
],
),
],
@ -412,8 +412,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Pharma LiveCare".needTranslation.toText14(color: AppColors.textColor, weight: FontWeight.w500),
"".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
LocaleKeys.pharmaLiveCare.tr().toText14(color: AppColors.textColor, weight: FontWeight.w500),
"".toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
],
),
],
@ -447,9 +447,9 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Not sure? help me choose a clinic!".needTranslation.toText16(weight: FontWeight.w600, color: AppColors.textColor),
SizedBox(height: 4.h),
"Mention your symptoms and find the list of doctors accordingly".needTranslation.toText12(
LocaleKeys.notSureHelpMeChooseClinic.tr().toText16(weight: FontWeight.w600, color: AppColors.textColor),
SizedBox(height: 8.h),
LocaleKeys.mentionYourSymptomsAndFindDoctors.tr().toText12(
fontWeight: FontWeight.w500,
color: AppColors.greyTextColor,
),
@ -558,8 +558,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Immediate service".needTranslation.toText18(color: AppColors.textColor, isBold: true),
"No need to wait, you will get medical consultation immediately via video call".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
LocaleKeys.immediateService.tr().toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.noNeedToWaitGetMedicalConsultation.tr().toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
],
),
),
@ -574,7 +574,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"No visit required".needTranslation.toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.noVisitRequired.tr().toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.livecarePoint5.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
],
),
@ -590,8 +590,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Doctor will contact".needTranslation.toText18(color: AppColors.textColor, isBold: true),
"A specialised doctor will contact you and will be able to view your medical history".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
LocaleKeys.doctorWillContact.tr().toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.specialisedDoctorWillContactYou.tr().toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
],
),
),
@ -606,8 +606,8 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Free medicine delivery".needTranslation.toText18(color: AppColors.textColor, isBold: true),
"Offers free medicine delivery for the LiveCare appointment".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
LocaleKeys.freeMedicineDelivery.tr().toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.offersFreeMedicineDelivery.tr().toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
],
),
),
@ -615,7 +615,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
),
SizedBox(height: 36.h),
CustomButton(
text: "Login to use this service".needTranslation,
text: "Login to use this service",
onPressed: () async {
await authVM.onLoginPressed();
},

@ -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_state.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/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/dental_chief_complaints_response_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/select_doctor_page.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/chief_complaint_card.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
@ -40,7 +42,7 @@ class _DentalChiefComplaintsPageState extends State<DentalChiefComplaintsPage> {
bookAppointmentsViewModel = Provider.of<BookAppointmentsViewModel>(context, listen: false);
appState = getIt.get<AppState>();
return CollapsingListView(
title: "Dental Chief Complaints".needTranslation,
title: LocaleKeys.dentalChiefComplaints.tr(),
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24.h),

@ -128,7 +128,7 @@ class DoctorsFilters extends StatelessWidget{
TextInputWidget(
controller: TextEditingController()..text =context.watch<DoctorFilterViewModel>().selectedClinicForFilters ??'',
labelText: LocaleKeys.clinicName.tr(context: context),
hintText: LocaleKeys.searchClinic.tr().needTranslation,
hintText: LocaleKeys.searchClinic.tr(),
isEnable: false,
prefix: null,
autoFocus: false,

@ -1,4 +1,5 @@
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/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/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/appointment_calendar.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
@ -33,7 +35,7 @@ class DoctorProfilePage extends StatelessWidget {
children: [
Expanded(
child: CollapsingListView(
title: "Doctor Profile".needTranslation,
title: LocaleKeys.doctorProfile.tr(),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -84,11 +86,11 @@ class DoctorProfilePage extends StatelessWidget {
children: [
AppCustomChipWidget(
iconColor: AppColors.ratingColorYellow,
labelText: "Branch: ${bookAppointmentsViewModel.doctorsProfileResponseModel.projectName}".needTranslation,
labelText: "${bookAppointmentsViewModel.doctorsProfileResponseModel.projectName}",
),
AppCustomChipWidget(
iconColor: AppColors.ratingColorYellow,
labelText: "Clinic: ${bookAppointmentsViewModel.doctorsProfileResponseModel.clinicDescription}".needTranslation,
labelText: "${bookAppointmentsViewModel.doctorsProfileResponseModel.clinicDescription}",
),
],
),
@ -142,7 +144,7 @@ class DoctorProfilePage extends StatelessWidget {
hasShadow: true,
),
child: CustomButton(
text: "View available appointments".needTranslation,
text: LocaleKeys.viewAvailableAppointments.tr(),
onPressed: () async {
LoaderBottomSheet.showLoader();
bookAppointmentsViewModel.isLiveCareSchedule
@ -151,7 +153,7 @@ class DoctorProfilePage extends StatelessWidget {
onSuccess: (dynamic respData) async {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
title: "Pick a Date".needTranslation,
title: LocaleKeys.pickADate.tr(),
context,
child: AppointmentCalendar(),
isFullScreen: false,
@ -174,7 +176,7 @@ class DoctorProfilePage extends StatelessWidget {
onSuccess: (dynamic respData) async {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
title: "Pick a Date".needTranslation,
title: LocaleKeys.pickADate.tr(),
context,
child: AppointmentCalendar(),
isFullScreen: false,

@ -83,8 +83,8 @@ class LaserAppointment extends StatelessWidget {
activeTextColor: Color(0xffED1C2B),
activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1),
tabs: [
CustomTabBarModel(null,LocaleKeys.malE.tr()),
CustomTabBarModel(null, "Female".needTranslation),
CustomTabBarModel(null, LocaleKeys.malE.tr()),
CustomTabBarModel(null, "Female"),
],
onTabChange: (index) {
var viewmodel = context.read<BookAppointmentsViewModel>();

@ -45,7 +45,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
children: [
Expanded(
child: CollapsingListView(
title: "Review LiveCare Request".needTranslation,
title: LocaleKeys.reviewLiveCareRequest.tr(context: context),
child: SingleChildScrollView(
padding: EdgeInsets.symmetric(horizontal: 24.h),
child: Column(
@ -80,7 +80,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
spacing: 3.h,
runSpacing: 4.h,
children: [
AppCustomChipWidget(labelText: "${appState.getAuthenticatedUser()!.age} Years Old".needTranslation),
AppCustomChipWidget(labelText: "${appState.getAuthenticatedUser()!.age} ${LocaleKeys.yearsOld.tr(context: context)}"),
AppCustomChipWidget(
labelText:
"${LocaleKeys.clinic.tr()}: ${(appState.isArabic() ? immediateLiveCareViewModel.immediateLiveCareSelectedClinic.serviceNameN : immediateLiveCareViewModel.immediateLiveCareSelectedClinic.serviceName)!}"),
@ -93,7 +93,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
),
),
SizedBox(height: 24.h),
"Selected LiveCare Type".needTranslation.toText16(isBold: true),
LocaleKeys.selectedLiveCareType.tr(context: context).toText16(isBold: true),
SizedBox(height: 16.h),
Consumer<BookAppointmentsViewModel>(builder: (context, bookAppointmentsVM, child) {
return Container(
@ -111,7 +111,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
children: [
Utils.buildSvgWithAssets(icon: AppAssets.livecare_clinic_icon, width: 32.h, height: 32.h, fit: BoxFit.contain),
SizedBox(width: 8.h),
getLiveCareType(immediateLiveCareViewModel.liveCareSelectedCallType).toText16(isBold: true),
getLiveCareType(context, immediateLiveCareViewModel.liveCareSelectedCallType).toText16(isBold: true),
],
),
Utils.buildSvgWithAssets(icon: AppAssets.edit_icon, width: 24.h, height: 24.h, fit: BoxFit.contain),
@ -121,7 +121,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
).onPress(() {
showCommonBottomSheetWithoutHeight(context, child: SelectLiveCareCallType(immediateLiveCareViewModel: immediateLiveCareViewModel), callBackFunc: () async {
debugPrint("Selected Call Type: ${immediateLiveCareViewModel.liveCareSelectedCallType}");
}, title: "Select LiveCare call type".needTranslation, isCloseButtonVisible: true, isFullScreen: false);
}, title: LocaleKeys.selectLiveCareCallType.tr(context: context), isCloseButtonVisible: true, isFullScreen: false);
});
}),
SizedBox(height: 24.h)
@ -152,7 +152,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Insurance expired or inactive".needTranslation.toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500).paddingSymmetrical(24.h, 0.h),
LocaleKeys.insuranceExpiredOrInactive.tr(context: context).toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500).paddingSymmetrical(24.h, 0.h),
CustomButton(
text: LocaleKeys.updateInsurance.tr(context: context),
onPressed: () {
@ -176,12 +176,12 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
)
: const SizedBox(),
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),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Amount before tax".needTranslation.toText14(isBold: true),
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.amount!.toText16(isBold: true), AppColors.blackColor, 13,
isSaudiCurrency: immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar"),
],
@ -189,7 +189,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
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(
immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.tax!.toText14(isBold: true, color: AppColors.greyTextColor), AppColors.greyTextColor, 13,
isSaudiCurrency: immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar"),
@ -210,7 +210,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
onPressed: () async {
await askVideoCallPermission().then((val) async {
if (val) {
LoaderBottomSheet.showLoader(loadingText: "Confirming LiveCare request, Please wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.confirmingLiveCareRequest.tr(context: context));
await immediateLiveCareViewModel.addNewCallRequestForImmediateLiveCare("${appState.getAuthenticatedUser()!.patientId}${DateTime.now().millisecondsSinceEpoch}");
await immediateLiveCareViewModel.getPatientLiveCareHistory();
@ -230,7 +230,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
} else {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Unknown error occurred...".needTranslation),
child: Utils.getErrorWidget(loadingText: LocaleKeys.unknownErrorOccurred.tr(context: context)),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
@ -241,9 +241,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
title: LocaleKeys.notice.tr(context: context),
context,
child: Utils.getWarningWidget(
loadingText:
"LiveCare requires Camera, Microphone, Location & Notifications permissions to enable virtual consultation between patient & doctor, Please allow these to proceed."
.needTranslation,
loadingText: LocaleKeys.liveCarePermissionsMessage.tr(context: context),
isShowActionButtons: true,
onCancelTap: () {
Navigator.pop(context);
@ -285,9 +283,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
title: LocaleKeys.notice.tr(context: context),
context,
child: Utils.getWarningWidget(
loadingText:
"LiveCare requires Camera, Microphone, Location & Notifications permissions to enable virtual consultation between patient & doctor, Please allow these to proceed."
.needTranslation,
loadingText: LocaleKeys.liveCarePermissionsMessage.tr(context: context),
isShowActionButtons: true,
onCancelTap: () {
Navigator.pop(context);
@ -351,16 +347,16 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
// }
}
String getLiveCareType(int callType) {
String getLiveCareType(BuildContext context, int callType) {
switch (callType) {
case 1:
return "Video Call".needTranslation;
return LocaleKeys.videoCall.tr(context: context);
case 2:
return "Audio Call".needTranslation;
return LocaleKeys.audioCall.tr(context: context);
case 3:
return "Phone Call".needTranslation;
return LocaleKeys.phoneCall.tr(context: context);
default:
return "Video Call".needTranslation;
return LocaleKeys.videoCall.tr(context: context);
}
}
}

@ -84,7 +84,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
children: [
Expanded(
child: CollapsingListView(
title: "LiveCare Payment".needTranslation,
title: LocaleKeys.liveCarePayment.tr(context: context),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -104,7 +104,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
children: [
Image.asset(AppAssets.mada, width: 72.h, height: 25.h),
SizedBox(height: 16.h),
"Mada".needTranslation.toText16(isBold: true),
LocaleKeys.mada.tr(context: context).toText16(isBold: true),
],
),
SizedBox(width: 8.h),
@ -146,7 +146,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
],
),
SizedBox(height: 16.h),
"Visa or Mastercard".needTranslation.toText16(isBold: true),
LocaleKeys.visaOrMastercard.tr(context: context).toText16(isBold: true),
],
),
SizedBox(width: 8.h),
@ -183,7 +183,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
children: [
Image.asset(AppAssets.tamaraEng, width: 72.h, height: 25.h),
SizedBox(height: 16.h),
"Tamara".needTranslation.toText16(isBold: true),
LocaleKeys.tamara.tr(context: context).toText16(isBold: true),
],
),
SizedBox(width: 8.h),
@ -234,7 +234,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Insurance expired or inactive".needTranslation.toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500).paddingSymmetrical(24.h, 0.h),
LocaleKeys.insuranceExpiredOrInactive.tr().toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500).paddingSymmetrical(24.h, 0.h),
CustomButton(
text: LocaleKeys.updateInsurance.tr(context: context),
onPressed: () {
@ -258,12 +258,12 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
)
: const SizedBox(),
SizedBox(height: 24.h),
"Total amount to pay".needTranslation.toText18(isBold: true).paddingSymmetrical(24.h, 0.h),
LocaleKeys.totalAmountToPay.tr().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().toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.amount!.toString().toText16(isBold: true), AppColors.blackColor, 13,
isSaudiCurrency: true),
],
@ -271,7 +271,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"VAT 15%".needTranslation.toText14(isBold: true, color: AppColors.greyTextColor),
LocaleKeys.vat15.tr().toText14(isBold: true, color: AppColors.greyTextColor),
Utils.getPaymentAmountWithSymbol(
immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.tax!.toString().toText14(isBold: true, color: AppColors.greyTextColor), AppColors.greyTextColor, 13,
isSaudiCurrency: true),
@ -281,7 +281,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"".needTranslation.toText14(isBold: true),
"".toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(immediateLiveCareViewModel.liveCareImmediateAppointmentFeesList.total!.toString().toText24(isBold: true), AppColors.blackColor, 17,
isSaudiCurrency: true),
],
@ -355,7 +355,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
}
void checkPaymentStatus() async {
LoaderBottomSheet.showLoader(loadingText: "Checking payment status, Please wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr());
if (selectedPaymentMethod == "TAMARA") {
await payfortViewModel.checkTamaraPaymentStatus(
@ -382,7 +382,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
} else {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Unknown error occurred...".needTranslation),
child: Utils.getErrorWidget(loadingText: "Unknown error occurred..."),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
@ -393,7 +393,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Payment Failed! Please try again.".needTranslation),
child: Utils.getErrorWidget(loadingText: LocaleKeys.paymentFailedPleaseTryAgain.tr()),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
@ -434,7 +434,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
} else {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Unknown error occurred...".needTranslation),
child: Utils.getErrorWidget(loadingText: "Unknown error occurred..."),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
@ -443,7 +443,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
} else {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Payment Failed! Please try again.".needTranslation),
child: Utils.getErrorWidget(loadingText: LocaleKeys.paymentFailedPleaseTryAgain.tr()),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
@ -482,7 +482,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
}
startApplePay() async {
LoaderBottomSheet.showLoader(loadingText: "Fetching Apple Pay details, Please wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingApplePayDetails.tr());
transID = Utils.getAppointmentTransID(
immediateLiveCareViewModel.immediateLiveCareSelectedClinic.serviceID!,
ApiConsts.appEnvironmentType == AppEnvironmentTypeEnum.uat ? 15 : 12,

@ -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/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/immediate_livecare/immediate_livecare_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@ -62,7 +64,7 @@ class _ImmediateLiveCarePendingRequestPageState extends State<ImmediateLiveCareP
children: [
Expanded(
child: CollapsingListView(
title: "LiveCare Pending Request".needTranslation,
title: LocaleKeys.liveCarePendingRequest.tr(),
child: Padding(
padding: EdgeInsets.all(24.0),
child: Column(
@ -124,7 +126,7 @@ class _ImmediateLiveCarePendingRequestPageState extends State<ImmediateLiveCareP
],
),
SizedBox(height: 8.h),
"Hala ${appState.getAuthenticatedUser()!.firstName}!!!".needTranslation.toText16(isBold: true),
"Hala ${appState.getAuthenticatedUser()!.firstName}!!!".toText16(isBold: true),
SizedBox(height: 8.h),
AppCustomChipWidget(
icon: AppAssets.appointment_calendar_icon,
@ -148,7 +150,7 @@ class _ImmediateLiveCarePendingRequestPageState extends State<ImmediateLiveCareP
hasShadow: true,
),
child: CustomButton(
text: "Call LiveCare Support".needTranslation,
text: LocaleKeys.callLiveCareSupport.tr(),
onPressed: () async {
launchUrl(Uri.parse("tel://" + "011 525 9553"));
},

@ -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_state.dart';
@ -13,6 +14,7 @@ import 'package:hmg_patient_app_new/features/book_appointments/models/resp_model
import 'package:hmg_patient_app_new/features/book_appointments/models/resp_models/get_livecare_clinics_response_model.dart';
import 'package:hmg_patient_app_new/features/immediate_livecare/models/resp_models/get_livecare_immediate_clinics_response_model.dart';
import 'package:hmg_patient_app_new/features/immediate_livecare/immediate_livecare_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/livecare/immediate_livecare_payment_details.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/livecare/widgets/select_livecare_call_type.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/widgets/clinic_card.dart';
@ -59,7 +61,7 @@ class _SelectImmediateLiveCareClinicPageState extends State<SelectImmediateLiveC
return Scaffold(
backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView(
title: "Select LiveCare Clinic".needTranslation,
title: LocaleKeys.selectLiveCareClinic.tr(),
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.all(24.h),
@ -118,7 +120,7 @@ class _SelectImmediateLiveCareClinicPageState extends State<SelectImmediateLiveC
showCommonBottomSheetWithoutHeight(context, child: SelectLiveCareCallType(immediateLiveCareViewModel: immediateLiveCareViewModel), callBackFunc: () async {
if (immediateLiveCareViewModel.liveCareSelectedCallType != 0) {
immediateLiveCareViewModel.setImmediateLiveCareSelectedClinic(liveCareClinic);
LoaderBottomSheet.showLoader(loadingText: "Fetching fees, Please wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingFeesPleaseWait.tr());
await immediateLiveCareViewModel.getLiveCareImmediateAppointmentFees(onSuccess: (val) {
LoaderBottomSheet.hideLoader();
Navigator.of(context).push(
@ -130,11 +132,11 @@ class _SelectImmediateLiveCareClinicPageState extends State<SelectImmediateLiveC
LoaderBottomSheet.hideLoader();
});
}
}, title: "Select LiveCare call type".needTranslation, isCloseButtonVisible: true, isFullScreen: false);
}, title: LocaleKeys.selectLiveCareCallType.tr(), isCloseButtonVisible: true, isFullScreen: false);
} else {
showCommonBottomSheetWithoutHeight(context,
child: Utils.getErrorWidget(
loadingText: "The selected clinic is only available between ${liveCareClinic.shiftTimings!.first.startTime} & ${liveCareClinic.shiftTimings!.first.endTime} hours.".needTranslation),
loadingText: "The selected clinic is only available between ${liveCareClinic.shiftTimings!.first.startTime} & ${liveCareClinic.shiftTimings!.first.endTime} hours."),
callBackFunc: () {},
title: "",
isCloseButtonVisible: true,

@ -37,7 +37,7 @@ class LiveCareClinicCard extends StatelessWidget {
AppCustomChipWidget(
icon: AppAssets.livecare_online_icon,
iconColor: AppColors.whiteColor,
richText: (liveCareClinicListResponseModel.isOnline == 1 ? LocaleKeys.online.tr(context: context) : "Offline".needTranslation).toText10(isBold: true, color: AppColors.whiteColor),
richText: (liveCareClinicListResponseModel.isOnline == 1 ? LocaleKeys.online.tr(context: context) : LocaleKeys.offline.tr()).toText10(isBold: true, color: AppColors.whiteColor),
backgroundColor: liveCareClinicListResponseModel.isOnline == 1 ? AppColors.successColor : AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
),

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/cupertino.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
@ -7,6 +8,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/immediate_livecare/immediate_livecare_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
class SelectLiveCareCallType extends StatelessWidget {
@ -21,8 +23,8 @@ class SelectLiveCareCallType extends StatelessWidget {
children: [
checkInOptionCard(
AppAssets.checkin_location_icon,
"Video Call".needTranslation,
"View your nearest HMG locations".needTranslation,
LocaleKeys.videoCall.tr(context: context),
LocaleKeys.liveVideoCallWithHMGDoctors.tr(context: context),
).onPress(() {
Navigator.of(context).pop();
immediateLiveCareViewModel.setLiveCareSelectedCallType(1);
@ -30,8 +32,8 @@ class SelectLiveCareCallType extends StatelessWidget {
SizedBox(height: 16.h),
checkInOptionCard(
AppAssets.checkin_location_icon,
"Audio Call".needTranslation,
"Provide your feedback on our services".needTranslation,
LocaleKeys.audioCall.tr(context: context),
LocaleKeys.liveVideoCallWithHMGDoctors.tr(context: context),
).onPress(() {
Navigator.of(context).pop();
immediateLiveCareViewModel.setLiveCareSelectedCallType(2);
@ -39,8 +41,8 @@ class SelectLiveCareCallType extends StatelessWidget {
SizedBox(height: 16.h),
checkInOptionCard(
AppAssets.checkin_location_icon,
"Phone Call".needTranslation,
"Live chat option with HMG".needTranslation,
LocaleKeys.phoneCall.tr(context: context),
LocaleKeys.livePhoneCallWithHMGDoctors.tr(context: context),
).onPress(() {
Navigator.of(context).pop();
immediateLiveCareViewModel.setLiveCareSelectedCallType(3);

@ -113,20 +113,18 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
runSpacing: 8.h,
children: [
AppCustomChipWidget(
labelText: "${LocaleKeys.clinic.tr(context: context)}: ${bookAppointmentsViewModel.selectedDoctor.clinicName}".needTranslation,
labelText: "${LocaleKeys.clinic.tr(context: context)}: ${bookAppointmentsViewModel.selectedDoctor.clinicName}",
),
AppCustomChipWidget(
labelText: "${LocaleKeys.branch.tr(context: context)} ${bookAppointmentsViewModel.selectedDoctor.projectName}".needTranslation,
labelText: "${LocaleKeys.branch.tr(context: context)} ${bookAppointmentsViewModel.selectedDoctor.projectName}",
),
AppCustomChipWidget(
labelText:
"${LocaleKeys.date.tr(context: context)}: ${bookAppointmentsViewModel.isWaitingAppointmentSelected ? DateUtil.formatDateToDate(DateTime.now(), false) : bookAppointmentsViewModel.selectedAppointmentDate}"
.needTranslation,
"${LocaleKeys.date.tr(context: context)}: ${bookAppointmentsViewModel.isWaitingAppointmentSelected ? DateUtil.formatDateToDate(DateTime.now(), false) : bookAppointmentsViewModel.selectedAppointmentDate}",
),
AppCustomChipWidget(
labelText:
"${LocaleKeys.time.tr(context: context)}: ${bookAppointmentsViewModel.isWaitingAppointmentSelected ? "Waiting Appointment".needTranslation : bookAppointmentsViewModel.selectedAppointmentTime}"
.needTranslation,
"${LocaleKeys.time.tr(context: context)}: ${bookAppointmentsViewModel.isWaitingAppointmentSelected ? LocaleKeys.waitingAppointment.tr(context: context) : bookAppointmentsViewModel.selectedAppointmentTime}",
),
],
),
@ -166,7 +164,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
),
),
SizedBox(height: 24.h),
"Hospital Information".needTranslation.toText16(isBold: true),
LocaleKeys.hospitalInformation.tr(context: context).toText16(isBold: true),
SizedBox(height: 16.h),
Container(
width: double.infinity,
@ -241,7 +239,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
}
void getWalkInAppointmentPatientShare() async {
LoaderBottomSheet.showLoader(loadingText: "Fetching Appointment Share...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingAppointmentShare.tr(context: context));
await bookAppointmentsViewModel.getWalkInPatientShareAppointment(onSuccess: (val) {
LoaderBottomSheet.hideLoader();
Navigator.of(context).push(
@ -262,7 +260,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
}
void initiateBookAppointment() async {
LoadingUtils.showFullScreenLoader(barrierDismissible: true, isSuccessDialog: false, loadingText: "Booking your appointment...".needTranslation);
LoadingUtils.showFullScreenLoader(barrierDismissible: true, isSuccessDialog: false, loadingText: LocaleKeys.bookingYourAppointment.tr(context: context));
myAppointmentsViewModel.setIsAppointmentDataToBeLoaded(true);
if (bookAppointmentsViewModel.isLiveCareSchedule) {

@ -52,7 +52,7 @@ class _SearchDoctorByNameState extends State<SearchDoctorByName> {
children: [
Expanded(
child: CollapsingListView(
title: "Choose Doctor".needTranslation,
title: LocaleKeys.chooseDoctor.tr(),
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24.h),
@ -228,7 +228,7 @@ class _SearchDoctorByNameState extends State<SearchDoctorByName> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
CustomButton(
text: "${groupedDoctors[index].length} ${'doctors'.needTranslation}",
text: "${groupedDoctors[index].length} ${'doctors'}",
onPressed: () {},
backgroundColor: AppColors.greyColor,
borderColor: AppColors.greyColor,

@ -103,7 +103,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
return Scaffold(
backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView(
title: bookAppointmentsViewModel.isLiveCareSchedule ? "Select LiveCare Clinic".needTranslation : LocaleKeys.selectClinic.tr(context: context),
title: bookAppointmentsViewModel.isLiveCareSchedule ? LocaleKeys.selectLiveCareClinic.tr(context: context) : LocaleKeys.selectClinic.tr(context: context),
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 24.h),
@ -1114,18 +1114,18 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
void initDentalAppointmentBookingFlow(int projectID) async {
bookAppointmentsViewModel.setProjectID(projectID.toString());
LoaderBottomSheet.showLoader(loadingText: "Checking for an existing dental plan, Please wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingForExistingDentalPlan.tr(context: context));
await bookAppointmentsViewModel.getPatientDentalEstimation(projectID: projectID).then((value) {
LoaderBottomSheet.hideLoader();
if (bookAppointmentsViewModel.patientDentalPlanEstimationList.isNotEmpty) {
showCommonBottomSheetWithoutHeight(
// title: LocaleKeys.notice.tr(context: context),
title: "Dental treatment plan".needTranslation,
title: LocaleKeys.dentalTreatmentPlan.tr(context: context),
context,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"You have an existing treatment plan: ".needTranslation.toText14(weight: FontWeight.w500),
LocaleKeys.youHaveExistingTreatmentPlan.tr(context: context).toText14(weight: FontWeight.w500),
SizedBox(height: 8.h),
Container(
width: double.infinity,
@ -1156,7 +1156,7 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
bookAppointmentsViewModel.patientDentalPlanEstimationList[index].procedureName!.toText12(isBold: true),
AppCustomChipWidget(icon: AppAssets.appointment_time_icon, labelText: "${bookAppointmentsViewModel.totalTimeNeededForDentalProcedure} Mins".needTranslation),
AppCustomChipWidget(icon: AppAssets.appointment_time_icon, labelText: "${bookAppointmentsViewModel.totalTimeNeededForDentalProcedure} ${LocaleKeys.mins.tr(context: context)}"),
],
);
},
@ -1171,15 +1171,15 @@ class _SelectClinicPageState extends State<SelectClinicPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Total time required".needTranslation.toText14(isBold: true),
AppCustomChipWidget(icon: AppAssets.appointment_time_icon, labelText: "30 Mins".needTranslation),
LocaleKeys.totalTimeRequired.tr(context: context).toText14(isBold: true),
AppCustomChipWidget(icon: AppAssets.appointment_time_icon, labelText: "30 ${LocaleKeys.mins.tr(context: context)}"),
],
)
],
),
),
SizedBox(height: 16.h),
"Would you like to continue it?".needTranslation.toText14(weight: FontWeight.w500),
LocaleKeys.wouldYouLikeToContinue.tr(context: context).toText14(weight: FontWeight.w500),
SizedBox(height: 16.h),
Row(
children: [

@ -75,7 +75,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
return Scaffold(
backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView(
title: "Choose Doctor".needTranslation,
title: LocaleKeys.chooseDoctor.tr(),
// bottomChild: Container(
// decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, customBorder: BorderRadius.only(topLeft: Radius.circular(24.r), topRight: Radius.circular(24.r))),
// padding: EdgeInsets.symmetric(vertical: 20.h, horizontal: 20.h),
@ -178,7 +178,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
children: [
LocaleKeys.nearestAppo.tr(context: context).toText13(isBold: true),
SizedBox(height: 4.h),
"View nearest available appointments".needTranslation.toText11(color: AppColors.textColorLight, weight: FontWeight.w500),
LocaleKeys.viewNearestAppos.toText11(color: AppColors.textColorLight, weight: FontWeight.w500),
],
),
const Spacer(),
@ -207,7 +207,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
bookAppointmentsViewModel: bookAppointmentsViewModel,
)
: bookAppointmentsVM.doctorsListGrouped.isEmpty
? Utils.getNoDataWidget(context, noDataText: "No Doctor found for selected criteria...".needTranslation)
? Utils.getNoDataWidget(context, noDataText: LocaleKeys.noDoctorFound.tr())
: AnimationConfiguration.staggeredList(
position: index,
duration: const Duration(milliseconds: 500),
@ -245,7 +245,7 @@ class _SelectDoctorPageState extends State<SelectDoctorPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
CustomButton(
text: "${bookAppointmentsVM.doctorsListGrouped[index].length} ${'doctors'.needTranslation}",
text: "${bookAppointmentsVM.doctorsListGrouped[index].length} ${'doctors'}",
onPressed: () {},
backgroundColor: AppColors.greyColor,
borderColor: AppColors.greyColor,

@ -54,8 +54,8 @@ class SelectLivecareClinicPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Immediate service".needTranslation.toText18(color: AppColors.textColor, isBold: true),
"No need to wait, you will get medical consultation immediately via video call".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
LocaleKeys.immediateService.tr(context: context).toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.noNeedToWaitGetMedicalConsultation.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
],
),
),
@ -70,7 +70,7 @@ class SelectLivecareClinicPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"No visit required".needTranslation.toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.noVisitRequired.tr(context: context).toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.livecarePoint5.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
],
),
@ -86,8 +86,8 @@ class SelectLivecareClinicPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Doctor will contact".needTranslation.toText18(color: AppColors.textColor, isBold: true),
"A specialised doctor will contact you and will be able to view your medical history".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
LocaleKeys.doctorWillContact.tr(context: context).toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.specialisedDoctorWillContactYou.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
],
),
),
@ -102,8 +102,8 @@ class SelectLivecareClinicPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Free medicine delivery".needTranslation.toText18(color: AppColors.textColor, isBold: true),
"Offers free medicine delivery for the LiveCare appointment".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
LocaleKeys.freeMedicineDelivery.tr(context: context).toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.offersFreeMedicineDelivery.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
],
),
),
@ -117,7 +117,7 @@ class SelectLivecareClinicPage extends StatelessWidget {
Column(
children: [
CustomButton(
text: "Yes please, I am in a hurry".needTranslation,
text: LocaleKeys.yesPleasImInAHurry.tr(context: context),
onPressed: () async {
Navigator.pop(context);
GetLiveCareClinicListResponseModel liveCareClinic = GetLiveCareClinicListResponseModel(
@ -129,7 +129,7 @@ class SelectLivecareClinicPage extends StatelessWidget {
immediateLiveCareViewModel.setLiveCareSelectedCallType(1);
immediateLiveCareViewModel.setImmediateLiveCareSelectedClinic(liveCareClinic);
LoaderBottomSheet.showLoader(loadingText: "Fetching fees, Please wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingFeesPleaseWait.tr(context: context));
await immediateLiveCareViewModel.getLiveCareImmediateAppointmentFees(onSuccess: (val) {
LoaderBottomSheet.hideLoader();
Navigator.of(getIt.get<NavigationService>().navigatorKey.currentContext!).push(
@ -162,7 +162,7 @@ class SelectLivecareClinicPage extends StatelessWidget {
).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 16.h),
CustomButton(
text: "No, Thanks. I would like a physical visit".needTranslation,
text: LocaleKeys.noThanksPhysicalVisit.tr(context: context),
onPressed: () {
Navigator.of(context).pop();
onNegativeClicked?.call();

@ -28,7 +28,7 @@ class WaitingAppointmentInfo extends StatelessWidget {
children: [
Expanded(
child: CollapsingListView(
title: "Waiting Appointment".needTranslation,
title: LocaleKeys.waitingAppointment.tr(),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -47,13 +47,11 @@ class WaitingAppointmentInfo extends StatelessWidget {
children: [
Utils.buildSvgWithAssets(icon: AppAssets.waiting_appointment_icon, width: 48.h, height: 48.h, fit: BoxFit.contain),
SizedBox(height: 16.h),
"What is Waiting Appointment?".needTranslation.toText16(isBold: true),
LocaleKeys.whatIsWaitingAppointment.tr(context: context).toText16(isBold: true),
SizedBox(height: 16.h),
"The waiting appointments feature allows you to book an appointment while you are inside the hospital building, and in case there is no available slot in the doctors schedule."
.needTranslation
.toText14(isBold: false),
LocaleKeys.waitingAppointmentsFeature.tr(context: context).toText14(isBold: false),
SizedBox(height: 16.h),
"The appointment with the doctor is confirmed, but the time of entry is uncertain.".needTranslation.toText14(isBold: false),
LocaleKeys.appointmentWithDoctorConfirmed.tr(context: context).toText14(isBold: false),
SizedBox(height: 24.h),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
@ -66,9 +64,7 @@ class WaitingAppointmentInfo extends StatelessWidget {
SizedBox(width: 10.w),
SizedBox(
width: MediaQuery.of(context).size.width * 0.7,
child: "Note: You must have to pay within 10 minutes of booking, otherwise your appointment will be cancelled automatically"
.needTranslation
.toText14(isBold: true, color: AppColors.warningColorYellow),
child: LocaleKeys.paymentWithinTenMinutes.tr(context: context).toText14(isBold: true, color: AppColors.warningColorYellow),
),
],
),
@ -88,7 +84,7 @@ class WaitingAppointmentInfo extends StatelessWidget {
hasShadow: true,
),
child: CustomButton(
text: "Continue".needTranslation,
text: LocaleKeys.continueString.tr(),
onPressed: () async {
showCommonBottomSheetWithoutHeight(context,
title: LocaleKeys.onlineCheckIn.tr(),

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_nfc_kit/flutter_nfc_kit.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -10,6 +11,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/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/book_appointment/review_appointment_page.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:barcode_scan2/barcode_scan2.dart';
@ -42,14 +44,9 @@ class WaitingAppointmentOnlineCheckinSheet extends StatelessWidget {
children: [
checkInOptionCard(
AppAssets.checkin_location_icon,
"Live Location".needTranslation,
"Verify your location to be at hospital to check in".needTranslation,
LocaleKeys.liveLocation.tr(),
LocaleKeys.verifyYourLocationAtHospital.tr(),
).onPress(() {
// locationUtils = LocationUtils(
// isShowConfirmDialog: false,
// navigationService: myAppointmentsViewModel.navigationService,
// appState: myAppointmentsViewModel.appState,
// );
locationUtils.getCurrentLocation(onSuccess: (value) {
projectDetailListModel = Utils.getProjectDetailObj(appState, bookAppointmentsViewModel.waitingAppointmentProjectID);
double dist = Utils.distance(value.latitude, value.longitude, double.parse(projectDetailListModel.latitude!), double.parse(projectDetailListModel.longitude!)).ceilToDouble() * 1000;
@ -58,8 +55,8 @@ class WaitingAppointmentOnlineCheckinSheet extends StatelessWidget {
checkScannedNFCAndQRCode(projectDetailListModel.checkInQrCode!, context);
} else {
showCommonBottomSheetWithoutHeight(context,
title: "Error".needTranslation,
child: Utils.getErrorWidget(loadingText: "Please ensure you're within the hospital location to perform online check-in.".needTranslation), callBackFunc: () {
title: LocaleKeys.error.tr(),
child: Utils.getErrorWidget(loadingText: LocaleKeys.ensureWithinHospitalLocation.tr()), callBackFunc: () {
Navigator.of(context).pop();
}, isFullScreen: false);
}
@ -68,8 +65,8 @@ class WaitingAppointmentOnlineCheckinSheet extends StatelessWidget {
SizedBox(height: 16.h),
checkInOptionCard(
AppAssets.checkin_nfc_icon,
"NFC (Near Field Communication)".needTranslation,
"Scan your phone via NFC board to check in".needTranslation,
LocaleKeys.nfcNearFieldCommunication.tr(),
LocaleKeys.scanPhoneViaNFC.tr(),
).onPress(() {
Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) {
@ -82,8 +79,8 @@ class WaitingAppointmentOnlineCheckinSheet extends StatelessWidget {
SizedBox(height: 16.h),
checkInOptionCard(
AppAssets.checkin_qr_icon,
"QR Code".needTranslation,
"Scan QR code with your camera to check in".needTranslation,
LocaleKeys.qrCode.tr(),
LocaleKeys.scanQRCodeToCheckIn.tr()
).onPress(() async {
String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent));
if (onlineCheckInQRCode != "") {
@ -136,7 +133,7 @@ class WaitingAppointmentOnlineCheckinSheet extends StatelessWidget {
}
void checkScannedNFCAndQRCode(String scannedCode, BuildContext context) async {
LoaderBottomSheet.showLoader(loadingText: "Processing Check-In...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.processingCheckIn.tr());
bookAppointmentsViewModel.checkScannedNFCAndQRCode(
scannedCode,
bookAppointmentsViewModel.waitingAppointmentProjectID,
@ -152,7 +149,7 @@ class WaitingAppointmentOnlineCheckinSheet extends StatelessWidget {
},
onError: (err) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(context, title: "Error".needTranslation, child: Utils.getErrorWidget(loadingText: err), callBackFunc: () {
showCommonBottomSheetWithoutHeight(context, title: LocaleKeys.error.tr(), child: Utils.getErrorWidget(loadingText: err), callBackFunc: () {
// Navigator.of(context).pop();
}, isFullScreen: false);
},

@ -94,7 +94,7 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
children: [
Expanded(
child: CollapsingListView(
title: "Appointment Payment".needTranslation,
title: LocaleKeys.appointmentPayment.tr(context: context),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -114,7 +114,7 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
children: [
Image.asset(AppAssets.mada, width: 72.h, height: 25.h),
SizedBox(height: 16.h),
"Mada".needTranslation.toText16(isBold: true),
LocaleKeys.mada.tr(context: context).toText16(isBold: true),
],
),
SizedBox(width: 8.h),
@ -156,7 +156,7 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
],
),
SizedBox(height: 16.h),
"Visa or Mastercard".needTranslation.toText16(isBold: true),
LocaleKeys.visaOrMastercard.tr(context: context).toText16(isBold: true),
],
),
SizedBox(width: 8.h),
@ -193,7 +193,7 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
children: [
Image.asset(AppAssets.tamaraEng, width: 72.h, height: 25.h),
SizedBox(height: 16.h),
"Tamara".needTranslation.toText16(isBold: true),
LocaleKeys.tamara.tr(context: context).toText16(isBold: true),
],
),
SizedBox(width: 8.h),
@ -244,9 +244,7 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Insurance expired or inactive"
.needTranslation
.toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500)
LocaleKeys.insuranceExpiredOrInactive.tr(context: context).toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500)
.paddingSymmetrical(24.h, 0.h),
CustomButton(
text: LocaleKeys.updateInsurance.tr(context: context),
@ -271,12 +269,12 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
)
: const SizedBox(),
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),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Amount before tax".needTranslation.toText14(isBold: true),
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(
bookAppointmentsVM.patientWalkInAppointmentShareResponseModel!.patientShare!.toString().toText16(isBold: true),
AppColors.blackColor,
@ -287,7 +285,7 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
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(
bookAppointmentsVM.patientWalkInAppointmentShareResponseModel!.patientTaxAmount!
.toString()
@ -301,7 +299,7 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"".needTranslation.toText14(isBold: true),
"".toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(
bookAppointmentsVM.patientWalkInAppointmentShareResponseModel!.patientShareWithTax!.toString().toText24(isBold: true),
AppColors.blackColor,
@ -377,7 +375,7 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
}
void checkPaymentStatus() async {
LoaderBottomSheet.showLoader(loadingText: "Checking payment status, Please wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr(context: context));
if (selectedPaymentMethod == "TAMARA") {
await payfortViewModel.checkTamaraPaymentStatus(
transactionID: transID,
@ -435,7 +433,7 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Payment Failed! Please try again.".needTranslation),
child: Utils.getErrorWidget(loadingText: LocaleKeys.paymentFailedPleaseTryAgain.tr(context: context)),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
@ -459,7 +457,7 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
print(apiResponse.data);
if (payfortViewModel.payfortCheckPaymentStatusResponseModel!.responseMessage!.toLowerCase() == "success") {
LoaderBottomSheet.hideLoader();
LoaderBottomSheet.showLoader(loadingText: "Booking Waiting Appointment, Please wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.bookingWaitingAppointment.tr(context: context));
await bookAppointmentsViewModel.insertSpecificAppointmentForWalkIn(onSuccess: (val) async {
String appointmentNo = val.data['AppointmentNo'].toString();
await myAppointmentsViewModel.createAdvancePayment(
@ -488,7 +486,7 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
} else {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Payment Failed! Please try again.".needTranslation),
child: Utils.getErrorWidget(loadingText: LocaleKeys.paymentFailedPleaseTryAgain.tr(context: context)),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
@ -630,7 +628,7 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
}
void sendCheckInRequest(String scannedCode, String appointmentNo, BuildContext context) async {
LoaderBottomSheet.showLoader(loadingText: "Processing Check-In...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.processingCheckIn.tr(context: context));
PatientAppointmentHistoryResponseModel patientAppointmentHistoryResponseModel = PatientAppointmentHistoryResponseModel(
appointmentNo: appointmentNo,
clinicID: bookAppointmentsViewModel.selectedDoctor.clinicID,
@ -642,8 +640,7 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
checkInType: 2,
onSuccess: (apiResponse) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(context,
title: "Success".needTranslation, child: Utils.getSuccessWidget(loadingText: apiResponse.data["SuccessMsg"]), callBackFunc: () {
showCommonBottomSheetWithoutHeight(context, title: LocaleKeys.success.tr(context: context), child: Utils.getSuccessWidget(loadingText: apiResponse.data["SuccessMsg"]), callBackFunc: () {
Navigator.of(context).pop();
Navigator.pushAndRemoveUntil(
context,
@ -655,8 +652,7 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
},
onError: (error) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(context, title: "Error".needTranslation, child: Utils.getErrorWidget(loadingText: error),
callBackFunc: () {
showCommonBottomSheetWithoutHeight(context, title: LocaleKeys.error.tr(context: context), child: Utils.getErrorWidget(loadingText: error), callBackFunc: () {
Navigator.of(context).pop();
}, isFullScreen: false);
},

@ -171,10 +171,10 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
),
SizedBox(height: 16.h),
CustomButton(
text: "Select".needTranslation,
text: LocaleKeys.select.tr(context: context),
onPressed: () async {
if (appState.isAuthenticated) {
if(selectedTime == "Waiting Appointment".needTranslation){
if(selectedTime == LocaleKeys.waitingAppointment.tr(context: context)){
bookAppointmentsViewModel.setWaitingAppointmentProjectID(bookAppointmentsViewModel.selectedDoctor.projectID!);
bookAppointmentsViewModel.setWaitingAppointmentDoctor(bookAppointmentsViewModel.selectedDoctor);
@ -293,7 +293,7 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
dayEvents.clear();
DateTime dateStartObj = new DateTime(dateStart.year, dateStart.month, dateStart.day, 0, 0, 0, 0, 0);
if (bookAppointmentsViewModel.isWaitingAppointmentAvailable && DateUtils.isSameDay(dateStart, DateTime.now())) {
dayEvents.add(TimeSlot(isoTime: "Waiting Appointment".needTranslation, start: DateTime.now(), end: DateTime.now(), vidaDate: ""));
dayEvents.add(TimeSlot(isoTime: LocaleKeys.waitingAppointment.tr(context: context), start: DateTime.now(), end: DateTime.now(), vidaDate: ""));
}
freeSlots.forEach((v) {
if (v.start == dateStartObj) dayEvents.add(v);
@ -332,7 +332,7 @@ class TimeSlotChip extends StatelessWidget {
Widget build(BuildContext context) {
return GestureDetector(
onTap: onTap,
child: label == "Waiting Appointment".needTranslation
child: label == LocaleKeys.waitingAppointment.tr(context: context)
? Container(
padding: EdgeInsets.symmetric(horizontal: 14.h, vertical: 8.h),
decoration: ShapeDecoration(

@ -137,15 +137,15 @@ class DoctorCard extends StatelessWidget {
runSpacing: 4.h,
children: [
AppCustomChipWidget(
labelText: "${isLoading ? "Cardiologist" : doctorsListResponseModel.clinicName}".needTranslation,
labelText: "${isLoading ? "Cardiologist" : doctorsListResponseModel.clinicName}",
).toShimmer2(isShow: isLoading),
AppCustomChipWidget(
labelText: "${isLoading ? "Olaya Hospital" : doctorsListResponseModel.projectName}".needTranslation,
labelText: "${isLoading ? "Olaya Hospital" : doctorsListResponseModel.projectName}",
).toShimmer2(isShow: isLoading),
bookAppointmentsViewModel.isNearestAppointmentSelected
? doctorsListResponseModel.nearestFreeSlot != null
? AppCustomChipWidget(
labelText: (isLoading ? "Cardiologist" : DateUtil.getDateStringForNearestSlot(doctorsListResponseModel.nearestFreeSlot)).needTranslation,
labelText: (isLoading ? "Cardiologist" : DateUtil.getDateStringForNearestSlot(doctorsListResponseModel.nearestFreeSlot)),
backgroundColor: AppColors.successColor,
textColor: AppColors.whiteColor,
).toShimmer2(isShow: isLoading)
@ -165,7 +165,7 @@ class DoctorCard extends StatelessWidget {
onSuccess: (dynamic respData) async {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
title: "Pick a Date".needTranslation,
title: LocaleKeys.pickADate.tr(context: context),
context,
child: AppointmentCalendar(),
isFullScreen: false,
@ -188,7 +188,7 @@ class DoctorCard extends StatelessWidget {
onSuccess: (dynamic respData) async {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
title: "Pick a Date".needTranslation,
title: LocaleKeys.pickADate.tr(context: context),
context,
child: AppointmentCalendar(),
isFullScreen: false,

@ -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/presentation/comprehensive_checkup/widgets/cmc_ui_selection_helper.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
@ -124,7 +125,7 @@ class _CmcOrderDetailPageState extends State<CmcOrderDetailPage> {
Row(
children: [
if (!isLoading) ...[
"Request ID:".needTranslation.toText14(
LocaleKeys.requestID.tr(context: context).toText14(
color: AppColors.textColorLight,
weight: FontWeight.w500,
),
@ -164,7 +165,7 @@ class _CmcOrderDetailPageState extends State<CmcOrderDetailPage> {
children: [
Expanded(
child: CustomButton(
text: "Cancel Order".needTranslation,
text: LocaleKeys.cancelOrder.tr(context: context),
onPressed: isLoading ? () {} : () => CmcUiSelectionHelper.showCancelConfirmationDialog(context: context, order: order),
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
@ -196,7 +197,7 @@ class _CmcOrderDetailPageState extends State<CmcOrderDetailPage> {
),
child: Utils.getNoDataWidget(
context,
noDataText: "You don't have any CMC orders yet.".needTranslation,
noDataText: LocaleKeys.noCMCOrdersYet.tr(context: context),
isSmallWidget: true,
width: 62.w,
height: 62.h,
@ -209,7 +210,7 @@ class _CmcOrderDetailPageState extends State<CmcOrderDetailPage> {
@override
Widget build(BuildContext context) {
return CollapsingListView(
title: "CMC Orders".needTranslation,
title: LocaleKeys.cmcOrders.tr(context: context),
isLeading: true,
child: SingleChildScrollView(
child: Column(

@ -55,7 +55,7 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
final isArabic = appState.isArabic();
return CollapsingListView(
title: "Summary".needTranslation,
title: LocaleKeys.summary.tr(context: context),
bottomChild: _buildBottomButton(),
child: SingleChildScrollView(
padding: EdgeInsets.all(16.w),
@ -89,7 +89,7 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Select Hospital".needTranslation,
LocaleKeys.selectHospital.tr(context: context),
style: TextStyle(
fontSize: 16.f,
fontWeight: FontWeight.w700,
@ -132,7 +132,7 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
Text(
isLocationSelected && selectedHospital != null
? (isArabic ? (selectedHospital.nameN ?? selectedHospital.name ?? '') : (selectedHospital.name ?? ''))
: "Select Hospital".needTranslation,
: LocaleKeys.selectHospital.tr(context: context),
style: TextStyle(
fontSize: 14.f,
fontWeight: isLocationSelected ? FontWeight.w600 : FontWeight.w400,
@ -189,7 +189,7 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Selected Service".needTranslation.toText14(
LocaleKeys.selectedService.tr(context: context).toText14(
weight: FontWeight.w600,
color: AppColors.greyTextColor,
letterSpacing: -0.4,
@ -226,14 +226,14 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
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.toString().toText16(isBold: true),
AppColors.blackColor,
@ -247,7 +247,7 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
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.toString().toText14(isBold: true, color: AppColors.greyTextColor),
AppColors.greyTextColor,
@ -261,7 +261,7 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"".needTranslation.toText14(isBold: true),
"".toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(
totalAmount.toString().toText24(isBold: true),
AppColors.blackColor,
@ -298,7 +298,7 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
],
),
child: CustomButton(
text: "Confirm".needTranslation,
text: LocaleKeys.confirm.tr(context: context),
onPressed: () {
isLocationSelected ? _handleConfirm() : null;
},
@ -339,10 +339,10 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
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,
),
@ -383,7 +383,7 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
if (selectedHospital == null) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text("Please select a hospital to continue".needTranslation),
content: Text(LocaleKeys.pleaseSelectHospitalToContinue.tr(context: context)),
backgroundColor: AppColors.errorColor,
),
);
@ -395,7 +395,7 @@ class _CmcSelectionReviewPageState extends State<CmcSelectionReviewPage> {
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);

@ -12,6 +12,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/comprehensive_checkup/cmc_order_detail_page.dart';
import 'package:hmg_patient_app_new/presentation/comprehensive_checkup/cmc_selection_review_page.dart';
import 'package:hmg_patient_app_new/presentation/comprehensive_checkup/widgets/cmc_ui_selection_helper.dart';
@ -128,7 +129,7 @@ class _ComprehensiveCheckupPageState extends State<ComprehensiveCheckupPage> {
// Request ID
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),
],
@ -179,7 +180,7 @@ class _ComprehensiveCheckupPageState extends State<ComprehensiveCheckupPage> {
),
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,
),
@ -193,7 +194,7 @@ class _ComprehensiveCheckupPageState extends State<ComprehensiveCheckupPage> {
children: [
Expanded(
child: CustomButton(
text: "Cancel Order".needTranslation,
text: LocaleKeys.cancelOrder.tr(context: context),
onPressed: () => CmcUiSelectionHelper.showCancelConfirmationDialog(context: context, order: order),
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
@ -219,7 +220,7 @@ class _ComprehensiveCheckupPageState extends State<ComprehensiveCheckupPage> {
child: Padding(
padding: EdgeInsets.all(24.h),
child: Text(
'No services available'.needTranslation,
LocaleKeys.noServicesAvailable.tr(context: context),
style: TextStyle(
fontSize: 16.h,
color: AppColors.greyTextColor,
@ -234,7 +235,7 @@ class _ComprehensiveCheckupPageState extends State<ComprehensiveCheckupPage> {
children: [
SizedBox(height: 16.h),
Text(
'Select a Service'.needTranslation,
LocaleKeys.selectAService.tr(context: context),
style: TextStyle(
fontSize: 20.h,
fontWeight: FontWeight.w700,
@ -357,7 +358,7 @@ class _ComprehensiveCheckupPageState extends State<ComprehensiveCheckupPage> {
@override
Widget build(BuildContext context) {
return CollapsingListView(
title: "Comprehensive Checkup".needTranslation,
title: LocaleKeys.comprehensiveCheckup.tr(context: context),
history: () => Navigator.of(context).push(CustomPageRoute(page: CmcOrderDetailPage(), direction: AxisDirection.up)),
bottomChild: Consumer<HmgServicesViewModel>(
builder: (context, hmgServicesViewModel, child) {
@ -375,7 +376,7 @@ class _ComprehensiveCheckupPageState extends State<ComprehensiveCheckupPage> {
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 12.h),
child: CustomButton(
borderWidth: 0,
text: "Next".needTranslation,
text: LocaleKeys.next.tr(context: context),
onPressed: _proceedWithSelectedService,
textColor: AppColors.whiteColor,
borderRadius: 12.r,

@ -55,7 +55,7 @@ class CmcHospitalBottomSheetBody extends StatelessWidget {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Choose your preferred hospital for the service".needTranslation.toText14(
LocaleKeys.choosePreferredHospitalForService.tr(context: context).toText14(
weight: FontWeight.w400,
color: AppColors.greyTextColor,
letterSpacing: -0.4,
@ -85,7 +85,7 @@ class CmcHospitalBottomSheetBody extends StatelessWidget {
? _buildLoadingShimmer()
: hmgServicesViewModel.filteredHospitalsList.isEmpty
? Center(
child: "No hospitals Found".needTranslation.toText16(weight: FontWeight.w500, color: AppColors.greyTextColor),
child: LocaleKeys.noHospitalsFound.tr(context: context).toText16(weight: FontWeight.w500, color: AppColors.greyTextColor),
)
: ListView.separated(
itemCount: hmgServicesViewModel.filteredHospitalsList.length,

@ -97,7 +97,7 @@ class CmcHospitalListItem extends StatelessWidget {
Visibility(
visible: (hospital.distanceInKilometers != null && hospital.distanceInKilometers! > 0),
child: AppCustomChipWidget(
labelText: "$distanceText km".needTranslation,
labelText: "$distanceText km",
icon: AppAssets.location_red,
iconColor: AppColors.errorColor,
backgroundColor: AppColors.secondaryLightRedColor,
@ -107,7 +107,7 @@ class CmcHospitalListItem extends StatelessWidget {
Visibility(
visible: (hospital.distanceInKilometers == null || hospital.distanceInKilometers == 0),
child: AppCustomChipWidget(
labelText: " Distance not available".needTranslation,
labelText: " Distance not available",
textColor: AppColors.blackColor,
),
),

@ -24,7 +24,7 @@ class CmcUiSelectionHelper {
showCommonBottomSheetWithoutHeight(
context,
title: "Select Hospital".needTranslation,
title: LocaleKeys.selectHospital.tr(context: context),
child: CmcHospitalBottomSheetBody(
onHospitalSelected: (hospital) {
hmgServicesViewModel.setSelectedHospitalForOrder(hospital);
@ -44,7 +44,7 @@ class CmcUiSelectionHelper {
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);
@ -70,7 +70,7 @@ class CmcUiSelectionHelper {
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: [

@ -36,7 +36,7 @@ class ContactUs extends StatelessWidget {
checkInOptionCard(
AppAssets.checkin_location_icon,
LocaleKeys.findUs.tr(),
"View your nearest HMG locations".needTranslation,
LocaleKeys.viewNearestHMGLocations.tr(),
).onPress(() {
locationUtils.getCurrentLocation(onSuccess: (value) {
contactUsViewModel.initContactUsViewModel();
@ -52,7 +52,7 @@ class ContactUs extends StatelessWidget {
checkInOptionCard(
AppAssets.checkin_location_icon,
LocaleKeys.feedback.tr(),
"Provide your feedback on our services".needTranslation,
LocaleKeys.provideFeedbackOnServices.tr(),
).onPress(() {
contactUsViewModel.setSelectedFeedbackType(
FeedbackType(id: 5, nameEN: "Not classified", nameAR: 'غير محدد'),
@ -68,7 +68,7 @@ class ContactUs extends StatelessWidget {
checkInOptionCard(
AppAssets.checkin_location_icon,
LocaleKeys.liveChat.tr(),
"Live chat option with HMG".needTranslation,
LocaleKeys.liveChatWithHMG.tr(),
).onPress(() {
locationUtils.getCurrentLocation(onSuccess: (value) {
contactUsViewModel.getLiveChatProjectsList();

@ -55,8 +55,8 @@ class FeedbackPage extends StatelessWidget {
activeTextColor: AppColors.primaryRedColor,
activeBackgroundColor: AppColors.primaryRedColor.withValues(alpha: .1),
tabs: [
CustomTabBarModel(null, "Send".needTranslation),
CustomTabBarModel(null, "Status".needTranslation),
CustomTabBarModel(null, LocaleKeys.send.tr(context: context)),
CustomTabBarModel(null, LocaleKeys.status.tr(context: context)),
],
onTabChange: (index) {
contactUsViewModel.setIsSendFeedbackTabSelected(index == 0);
@ -93,7 +93,7 @@ class FeedbackPage extends StatelessWidget {
);
return;
}
LoaderBottomSheet.showLoader(loadingText: "Sending Feedback...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.sendingFeedback.tr(context: context));
contactUsViewModel.insertCOCItem(
subject: subjectTextController.text,
message: messageTextController.text,
@ -172,7 +172,7 @@ class FeedbackPage extends StatelessWidget {
],
).onPress(() {
showCommonBottomSheetWithoutHeight(context,
title: "Select Feedback Type".needTranslation,
title: LocaleKeys.selectFeedbackType.tr(context: context),
child: Container(
width: double.infinity,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24),
@ -207,7 +207,7 @@ class FeedbackPage extends StatelessWidget {
Navigator.pop(context);
contactUsViewModel.setSelectedFeedbackType(newValue!);
if (contactUsViewModel.selectedFeedbackType.id == 1) {
LoaderBottomSheet.showLoader(loadingText: "Loading appointments list...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.loadingAppointmentsList.tr(context: context));
await medicalFileViewModel.getPatientMedicalReportAppointmentsList(onSuccess: (val) async {
LoaderBottomSheet.hideLoader();
bool? value = await Navigator.of(context).push(
@ -224,7 +224,7 @@ class FeedbackPage extends StatelessWidget {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "You do not have any appointments to submit a feedback.".needTranslation),
child: Utils.getErrorWidget(loadingText: LocaleKeys.noAppointmentsForFeedback.tr(context: context)),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
@ -248,7 +248,7 @@ class FeedbackPage extends StatelessWidget {
),
if (contactUsViewModel.patientFeedbackSelectedAppointment != null) ...[
SizedBox(height: 16.h),
"Selected Appointment:".needTranslation.toText16(isBold: true),
LocaleKeys.selectedAppointment.tr(context: context).toText16(isBold: true),
SizedBox(height: 8.h),
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
@ -295,8 +295,8 @@ class FeedbackPage extends StatelessWidget {
],
SizedBox(height: 16.h),
TextInputWidget(
labelText: "Subject".needTranslation,
hintText: "Enter subject here".needTranslation,
labelText: LocaleKeys.subject.tr(context: context),
hintText: LocaleKeys.enterSubjectHere.tr(context: context),
controller: subjectTextController,
isEnable: true,
prefix: null,
@ -310,8 +310,8 @@ class FeedbackPage extends StatelessWidget {
),
SizedBox(height: 16.h),
TextInputWidget(
labelText: "Message".needTranslation,
hintText: "Enter message here".needTranslation,
labelText: LocaleKeys.message.tr(context: context),
hintText: LocaleKeys.enterMessageHere.tr(context: context),
controller: messageTextController,
isEnable: true,
prefix: null,

@ -114,7 +114,6 @@ class LiveChatPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
("${appState.isArabic() ? contactUsVM.liveChatProjectsList[index].projectNameN! : contactUsVM.liveChatProjectsList[index].projectName!}\n${contactUsVM.liveChatProjectsList[index].distanceInKilometers!} KM")
.needTranslation
.toText14(isBold: true, color: contactUsVM.selectedLiveChatProjectIndex == index ? AppColors.whiteColor : AppColors.textColor),
Transform.flip(
flipX: getIt.get<AppState>().isArabic(),

@ -68,7 +68,7 @@ class FindUsItemCard extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppCustomChipWidget(
labelText: "${getHMGLocationsModel.distanceInKilometers ?? ""} km".needTranslation,
labelText: "${getHMGLocationsModel.distanceInKilometers ?? ""} km",
icon: AppAssets.location_red,
iconColor: AppColors.primaryRedColor,
backgroundColor: AppColors.secondaryLightRedColor,
@ -77,7 +77,7 @@ class FindUsItemCard extends StatelessWidget {
Row(
children: [
AppCustomChipWidget(
labelText: "Get Directions".needTranslation,
labelText: LocaleKeys.getDirections.tr(),
icon: AppAssets.directions_icon,
iconColor: AppColors.whiteColor,
backgroundColor: AppColors.textColor.withValues(alpha: 0.8),

@ -94,7 +94,7 @@ class _Covid19LandingPageState extends State<Covid19LandingPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
CustomButton(
text: "SelectLocation".needTranslation,
text: "Select Location",
onPressed: () {
_showBranchBottomSheet(context);
},
@ -124,7 +124,7 @@ class _Covid19LandingPageState extends State<Covid19LandingPage> {
showCommonBottomSheet(
context,
title: "Select Branch".needTranslation,
title: "Select Branch",
height: ResponsiveExtension.screenHeight * 0.651,
child: StatefulBuilder(
builder: (context, setBottomSheetState) {
@ -240,7 +240,7 @@ class _Covid19LandingPageState extends State<Covid19LandingPage> {
child: SafeArea(
top: false,
child: CustomButton(
text: "Next".needTranslation,
text: LocaleKeys.next.tr(context: context),
onPressed: (){
Navigator.of(context)

@ -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/utils/size_utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
@ -7,6 +8,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/ui_models/covid_questionnare_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/hospital_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/covid19test/covid_review_screen.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
@ -61,7 +63,7 @@ class _Covid19QuestionnaireState extends State<Covid19Questionnaire> {
topRight: Radius.circular(24.r),
),
),child: CustomButton(
text: "Next".needTranslation,
text: LocaleKeys.next.tr(context: context),
onPressed: () {
moveToNextPage(context);
},

@ -89,7 +89,7 @@ class _CovidPaymentScreenState extends State<CovidPaymentScreen> {
return Scaffold(
backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView(
title: widget.title.needTranslation,
title: widget.title,
bottomChild: Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
@ -100,19 +100,19 @@ class _CovidPaymentScreenState extends State<CovidPaymentScreen> {
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),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Amount before tax".needTranslation.toText14(isBold: true),
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(( (widget.amount - widget.taxAmount).toString()).toText16(isBold: true), AppColors.blackColor, 13, isSaudiCurrency: true),
],
).paddingSymmetrical(24.h, 0.h),
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),
// Show VAT amount passed from review screen
Utils.getPaymentAmountWithSymbol((widget.taxAmount.toString()).toText14(isBold: true, color: AppColors.greyTextColor), AppColors.greyTextColor, 13, isSaudiCurrency: true),
],
@ -121,7 +121,7 @@ class _CovidPaymentScreenState extends State<CovidPaymentScreen> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"".needTranslation.toText14(isBold: true),
"".toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(widget.amount.toString().toText24(isBold: true), AppColors.blackColor, 17, isSaudiCurrency: true),
],
).paddingSymmetrical(24.h, 0.h),
@ -212,7 +212,7 @@ class _CovidPaymentScreenState extends State<CovidPaymentScreen> {
children: [
Image.asset(AppAssets.mada, width: 72.h, height: 25.h),
SizedBox(height: 16.h),
"Mada".needTranslation.toText16(isBold: true),
LocaleKeys.mada.tr(context: context).toText16(isBold: true),
],
),
SizedBox(width: 8.h),
@ -257,7 +257,7 @@ class _CovidPaymentScreenState extends State<CovidPaymentScreen> {
],
),
SizedBox(height: 16.h),
"Visa or Mastercard".needTranslation.toText16(isBold: true),
LocaleKeys.visaOrMastercard.tr(context: context).toText16(isBold: true),
],
),
SizedBox(width: 8.h),
@ -312,7 +312,7 @@ class _CovidPaymentScreenState extends State<CovidPaymentScreen> {
},
),
SizedBox(height: 16.h),
"Tamara".needTranslation.toText16(isBold: true),
LocaleKeys.tamara.tr(context: context).toText16(isBold: true),
],
),
SizedBox(width: 8.h),
@ -387,7 +387,7 @@ class _CovidPaymentScreenState extends State<CovidPaymentScreen> {
}
Future<void> checkPaymentStatus() async {
LoaderBottomSheet.showLoader(loadingText: "Checking payment status, Please wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr(context: context));
try {
await payfortViewModel.checkPaymentStatus(transactionID: transID, onSuccess: (apiResponse) async {
// treat any successful responseMessage as success; otherwise show generic error
@ -396,7 +396,7 @@ class _CovidPaymentScreenState extends State<CovidPaymentScreen> {
if (success) {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getSuccessWidget(loadingText: "Payment successful".needTranslation),
child: Utils.getSuccessWidget(loadingText: "Payment successful"),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
@ -404,7 +404,7 @@ class _CovidPaymentScreenState extends State<CovidPaymentScreen> {
} else {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Payment Failed! Please try again.".needTranslation),
child: Utils.getErrorWidget(loadingText: LocaleKeys.paymentFailedPleaseTryAgain.tr(context: context)),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,

@ -75,7 +75,7 @@ class _CovidReviewScreenState extends State<CovidReviewScreen> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Amount before tax".needTranslation.toText18(isBold: true),
LocaleKeys.amountBeforeTax.tr(context: context).toText18(isBold: true),
Utils.getPaymentAmountWithSymbol(
(info.patientShareField ?? 0).toString().toText16(isBold: true),
AppColors.blackColor,
@ -87,7 +87,7 @@ class _CovidReviewScreenState extends State<CovidReviewScreen> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Tax Amount".needTranslation.toText14(isBold: true),
LocaleKeys.vat15.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(
(info.patientTaxAmountField ?? 0).toString().toText16(isBold: true),
AppColors.blackColor,
@ -208,13 +208,13 @@ class _CovidReviewScreenState extends State<CovidReviewScreen> {
Expanded(
child: CustomButton(
height: 56.h,
text: "Next".needTranslation,
text: LocaleKeys.next.tr(context: context),
onPressed: () async {
// Validate selection and payment info
if (_selectedProcedure == null) {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Please select a procedure".needTranslation),
child: Utils.getErrorWidget(loadingText: "Please select a procedure"),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
@ -236,7 +236,7 @@ class _CovidReviewScreenState extends State<CovidReviewScreen> {
if (hmgServicesViewModel.covidPaymentInfo == null) {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Payment information not available".needTranslation),
child: Utils.getErrorWidget(loadingText: "Payment information not available"),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,

@ -1,64 +1,65 @@
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/hmg_services/models/ui_models/e_referral_form_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
class ReferralValidator {
static FormValidationErrors validateStep1(ReferralFormData formData) {
static FormValidationErrors validateStep1(ReferralFormData formData, BuildContext context) {
final errors = FormValidationErrors();
if (formData.requesterName.trim().isEmpty) {
errors.requesterName = 'Referral requester name is required'.needTranslation;
errors.requesterName = LocaleKeys.requesterNameRequired.tr(context: context);
}
if (formData.relationship == null) {
errors.relationship = 'Please select a relationship'.needTranslation;
errors.relationship = LocaleKeys.selectRelationshipRequired.tr(context: context);
}
if (formData.relationship != null &&
formData.relationship?.iD == 5 &&
formData.otherRelationshipName.trim().isEmpty) {
errors.otherRelationshipName = 'Other relationship name is required'.needTranslation;
errors.otherRelationshipName = LocaleKeys.otherRelationshipNameRequired.tr(context: context);
}
return errors;
}
static FormValidationErrors validateStep2(ReferralFormData formData) {
static FormValidationErrors validateStep2(ReferralFormData formData, BuildContext context) {
final errors = FormValidationErrors();
if (formData.patientIdentification.trim().isEmpty) {
errors.patientIdentification = 'Identification number is required'.needTranslation;
errors.patientIdentification = LocaleKeys.identificationNumberRequired.tr(context: context);
}
if (formData.patientName.trim().isEmpty) {
errors.patientName = 'Patient name is required'.needTranslation;
errors.patientName = LocaleKeys.patientNameRequired.tr(context: context);
}
if (formData.patientPhone == null) {
errors.patientPhone = 'Please Enter patient phone number'.needTranslation;
errors.patientPhone = LocaleKeys.enterPatientPhoneRequired.tr(context: context);
}
if (formData.patientCity == null) {
errors.patientCity = 'Please select patient city'.needTranslation;
errors.patientCity = LocaleKeys.selectPatientCityRequired.tr(context: context);
}
return errors;
}
static FormValidationErrors validateStep3(ReferralFormData formData) {
static FormValidationErrors validateStep3(ReferralFormData formData, BuildContext context) {
final errors = FormValidationErrors();
if (formData.medicalReportImages.isEmpty) {
errors.medicalReport = 'At least one medical report is required'.needTranslation;
errors.medicalReport = LocaleKeys.medicalReportRequired.tr(context: context);
}
if (formData.branch == null) {
errors.branch = 'Please select a branch'.needTranslation;
errors.branch = LocaleKeys.selectBranchRequired.tr(context: context);
}
if (formData.isPatientInsured && formData.insuredPatientImages.isEmpty) {
errors.insuredDocument = 'Insurance document is required for insured patients'.needTranslation;
errors.insuredDocument = LocaleKeys.insuranceDocumentRequired.tr(context: context);
}
return errors;

@ -1,3 +1,4 @@
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/core/utils/date_util.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/features/hmg_services/hmg_services_view_model.dart';
import 'package:hmg_patient_app_new/features/hmg_services/models/resq_models/search_e_referral_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:provider/provider.dart';
@ -31,7 +33,7 @@ class _SearchResultPageState extends State<SearchResultPage> {
@override
Widget build(BuildContext context) {
return CollapsingListView(
title: "Search Result".needTranslation,
title: LocaleKeys.searchResult.tr(context: context),
child: Column(
children: [
// List of referrals
@ -61,10 +63,7 @@ class _SearchResultPageState extends State<SearchResultPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
'Referral No ${referral.referralNumber}'.needTranslation.toText18(isBold: true, color: AppColors.textColor),
LocaleKeys.referralNo.tr(context: context, namedArgs: {'number': '${referral.referralNumber}'}).toText18(isBold: true, color: AppColors.textColor),
Container(
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 6),
decoration: BoxDecoration(

@ -81,13 +81,13 @@ class _NewReferralPageState extends State<NewReferralPage> {
switch (_currentStep) {
case 0:
stepErrors = ReferralValidator.validateStep1(_formManager.formData);
stepErrors = ReferralValidator.validateStep1(_formManager.formData, context);
break;
case 1:
stepErrors = ReferralValidator.validateStep2(_formManager.formData);
stepErrors = ReferralValidator.validateStep2(_formManager.formData, context);
break;
case 2:
stepErrors = ReferralValidator.validateStep3(_formManager.formData);
stepErrors = ReferralValidator.validateStep3(_formManager.formData, context);
break;
default:
stepErrors = FormValidationErrors();
@ -159,7 +159,7 @@ class _NewReferralPageState extends State<NewReferralPage> {
return Scaffold(
backgroundColor: AppColors.bgScaffoldColor,
body: CollapsingListView(
title: "E Referral".needTranslation,
title: LocaleKeys.eReferral.tr(context: context),
isClose: false,
search: () async {
await Navigator.of(context).push(
@ -222,10 +222,10 @@ class _NewReferralPageState extends State<NewReferralPage> {
padding: EdgeInsets.all(16.w),
child: Column(
children: [
Utils.getSuccessWidget(loadingText: "Your Referral has been created Successfully.".needTranslation),
Utils.getSuccessWidget(loadingText: LocaleKeys.referralCreatedSuccessfully.tr(context: context)),
Row(
children: [
"Here is your Referral #: ".needTranslation.toText14(
LocaleKeys.hereIsYourReferralNumber.tr(context: context).toText14(
color: AppColors.textColorLight,
weight: FontWeight.w500,
),

@ -80,7 +80,7 @@ class _SearchEReferralPageState extends State<SearchEReferralPage> {
@override
Widget build(BuildContext context) {
return CollapsingListView(
title: "Search E-Referral".needTranslation,
title: LocaleKeys.searchEReferral.tr(context: context),
isClose: true,
bottomChild: Container(
color: Colors.white,
@ -111,7 +111,7 @@ class _SearchEReferralPageState extends State<SearchEReferralPage> {
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [SizedBox(height: 8), 'Please enter the required information to search for an e-referral'.needTranslation.toText12()],
children: [SizedBox(height: 8), LocaleKeys.enterRequiredInfoToSearch.tr(context: context).toText12()],
),
);
}

@ -1,10 +1,12 @@
import 'dart:io';
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/core/utils/validation_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/hmg_services/models/req_models/create_e_referral_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/e_referral/e_referral_form_manager.dart';
import 'package:provider/provider.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -46,14 +48,14 @@ class _OtherDetailsStepState extends State<OtherDetailsStep> {
void _updateMedicalReportText() {
final hasMedicalReports = _formManager.formData.medicalReportImages.isNotEmpty;
_medicalReportController.text = hasMedicalReports
? '${_formManager.formData.medicalReportImages.length} file(s) selected'.needTranslation
? '${_formManager.formData.medicalReportImages.length} file(s) selected'
: '';
}
void _updateInsuranceText() {
final hasInsuranceDocs = _formManager.formData.insuredPatientImages.isNotEmpty;
_insuranceController.text = hasInsuranceDocs
? '${_formManager.formData.insuredPatientImages.length} file(s) selected'.needTranslation
? '${_formManager.formData.insuredPatientImages.length} file(s) selected'
: '';
}
@ -68,7 +70,7 @@ class _OtherDetailsStepState extends State<OtherDetailsStep> {
physics: const BouncingScrollPhysics(),
children: [
const SizedBox(height: 12),
_buildSectionTitle('Other Details'.needTranslation),
_buildSectionTitle(LocaleKeys.otherDetails.tr(context: context)),
const SizedBox(height: 12),
_buildMedicalReportField(formManager),
_buildBranchField(context, formManager),
@ -96,8 +98,8 @@ class _OtherDetailsStepState extends State<OtherDetailsStep> {
child: TextInputWidget(
controller: _medicalReportController,
padding: const EdgeInsets.symmetric(horizontal: 16.0),
hintText: 'Medical Report'.needTranslation,
labelText: 'Select Attachment'.needTranslation,
hintText: LocaleKeys.medicalReport.tr(context: context),
labelText: LocaleKeys.selectAttachment.tr(context: context),
suffix: const Icon(Icons.attachment),
isReadOnly: true,
errorMessage: formManager.errors.medicalReport,
@ -121,7 +123,7 @@ class _OtherDetailsStepState extends State<OtherDetailsStep> {
children: formManager.formData.medicalReportImages.asMap().entries.map((entry) {
final index = entry.key;
return Chip(
label: Text('Medical Report ${index + 1}'.needTranslation),
label: Text(LocaleKeys.medicalReportNumber.tr(context: context, namedArgs: {'number': '${index + 1}'})),
deleteIcon: const Icon(Icons.close, size: 16),
onDeleted: () {
_removeMedicalReport(index, formManager);
@ -172,7 +174,7 @@ class _OtherDetailsStepState extends State<OtherDetailsStep> {
Padding(
padding: EdgeInsets.all(5.0),
child:
"Patient is Insured".needTranslation.toText14(
LocaleKeys.patientIsInsured.tr(context: context).toText14(
color: Colors.black,
weight: FontWeight.w600,
),
@ -193,8 +195,8 @@ class _OtherDetailsStepState extends State<OtherDetailsStep> {
child: TextInputWidget(
controller: _insuranceController,
padding: const EdgeInsets.symmetric(horizontal: 16.0),
hintText: 'Insurance Document'.needTranslation,
labelText: 'Select Attachment'.needTranslation,
hintText: LocaleKeys.insuranceDocument.tr(context: context),
labelText: LocaleKeys.selectAttachment.tr(context: context),
suffix: const Icon(Icons.attachment),
isReadOnly: true,
errorMessage: formManager.errors.insuredDocument,
@ -235,7 +237,7 @@ class _OtherDetailsStepState extends State<OtherDetailsStep> {
showCommonBottomSheetWithoutHeight(
context,
title: "Select Branch".needTranslation,
title: LocaleKeys.selectBranch.tr(context: context),
child: Consumer<HabibWalletViewModel>(
builder: (context, habibWalletVM, child) {
final hospitals = habibWalletVM.advancePaymentHospitals;

@ -1,8 +1,10 @@
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/core/utils/validation_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/e_referral/e_referral_form_manager.dart';
import 'package:provider/provider.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -65,14 +67,14 @@ class PatientInformationStepState extends State<PatientInformationStep> {
physics: const BouncingScrollPhysics(),
children: [
const SizedBox(height: 12),
_buildSectionTitle('Patient information'.needTranslation),
_buildSectionTitle(LocaleKeys.patientInfo.tr(context: context)),
const SizedBox(height: 12),
_buildIdentificationField(formManager),
_buildPatientNameField(formManager),
// _buildPatientCountryField(context, formManager),
_buildPatientPhoneField(formManager),
const SizedBox(height: 20),
_buildSectionTitle('Where the patient located'.needTranslation),
_buildSectionTitle(LocaleKeys.patientLocation.tr(context: context)),
_buildPatientCityField(context, formManager),
],
),
@ -94,8 +96,8 @@ class PatientInformationStepState extends State<PatientInformationStep> {
child: TextInputWidget(
controller: _identificationController,
padding: const EdgeInsets.symmetric(horizontal: 16.0),
hintText: 'Enter Identification Number*'.needTranslation,
labelText: 'Identification Number'.needTranslation,
hintText: LocaleKeys.enterIdentificationNumber.tr(context: context),
labelText: LocaleKeys.identificationNumber.tr(context: context),
errorMessage: formManager.errors.patientIdentification,
hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.patientIdentification),
onChange: (value) {
@ -114,8 +116,8 @@ class PatientInformationStepState extends State<PatientInformationStep> {
child: TextInputWidget(
controller: _nameController,
padding: const EdgeInsets.symmetric(horizontal: 16.0),
hintText: 'Patient Name*'.needTranslation,
labelText: 'Name'.needTranslation,
hintText: LocaleKeys.patientName.tr(context: context),
labelText: LocaleKeys.name.tr(context: context),
keyboardType: TextInputType.text,
errorMessage: formManager.errors.patientName,
hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.patientName),
@ -133,7 +135,7 @@ class PatientInformationStepState extends State<PatientInformationStep> {
return Focus(
focusNode: _phoneFocusNode,
child: TextInputWidget(
labelText: 'Phone Number'.needTranslation,
labelText: LocaleKeys.phoneNumber.tr(context: context),
hintText: "5xxxxxxxx",
controller: _phoneController,
padding: const EdgeInsets.all(8),
@ -159,7 +161,7 @@ class PatientInformationStepState extends State<PatientInformationStep> {
Widget _buildPatientCityField(BuildContext context, ReferralFormManager formManager) {
return DropdownWidget(
labelText: 'City',
hintText: formManager.formData.patientCity?.description ?? "Select City".needTranslation,
hintText: formManager.formData.patientCity?.description ?? LocaleKeys.selectCity.tr(context: context),
isEnable: false,
hasSelectionCustomIcon: true,
labelColor: Colors.black,
@ -179,7 +181,7 @@ class PatientInformationStepState extends State<PatientInformationStep> {
showCommonBottomSheetWithoutHeight(
context,
title: "Select City".needTranslation,
title: LocaleKeys.selectCity.tr(context: context),
child: Consumer<HmgServicesViewModel>(
builder: (context, hmgServicesVM, child) {
final cities = hmgServicesVM.getAllCitiesList;

@ -1,8 +1,10 @@
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/core/utils/validation_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/e_referral/e_referral_form_manager.dart';
import 'package:provider/provider.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -67,8 +69,8 @@ class RequesterFormStepState extends State<RequesterFormStep> {
physics: const BouncingScrollPhysics(),
children: [
// const SizedBox(height: 12),
_buildSectionTitle('Referral requester information'.needTranslation),
const SizedBox(height: 12),
_buildSectionTitle(LocaleKeys.referralRequesterInformation.tr(context: context)),
const SizedBox(height: 12),
_buildNameField(formManager),
// _buildPhoneField(formManager),
_buildRelationshipField(context, formManager),
@ -93,8 +95,8 @@ class RequesterFormStepState extends State<RequesterFormStep> {
child: TextInputWidget(
controller: _nameController,
padding: const EdgeInsets.symmetric(horizontal: 16.0),
hintText: 'Enter Referral Requester Name*'.needTranslation,
labelText: 'Requester Name'.needTranslation,
hintText: LocaleKeys.enterReferralRequesterName.tr(context: context),
labelText: LocaleKeys.requesterName.tr(context: context),
keyboardType: TextInputType.text,
errorMessage: formManager.errors.requesterName,
isAllowLeadingIcon: true,
@ -109,10 +111,10 @@ class RequesterFormStepState extends State<RequesterFormStep> {
}
Widget _buildRelationshipField(BuildContext context, ReferralFormManager formManager) {
return DropdownWidget(
labelText: "Relationship".needTranslation,
hintText: formManager.formData.relationship?.textEn ?? "Select Relation".needTranslation,
labelText: LocaleKeys.relationship.tr(context: context),
hintText: formManager.formData.relationship?.textEn ?? LocaleKeys.selectRelation.tr(context: context),
isEnable: false,
selectedValue: formManager.formData.relationship?.textEn ?? "Select Relation".needTranslation,
selectedValue: formManager.formData.relationship?.textEn ?? LocaleKeys.selectRelation.tr(context: context),
errorMessage: formManager.errors.relationship,
hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.relationship),
hasSelectionCustomIcon: false,
@ -132,8 +134,8 @@ class RequesterFormStepState extends State<RequesterFormStep> {
controller: _otherNameController,
keyboardType: TextInputType.text,
padding: const EdgeInsets.symmetric(horizontal: 16.0),
hintText: 'Other Name*'.needTranslation,
labelText: 'Other Name'.needTranslation,
hintText: LocaleKeys.otherNameHint.tr(context: context),
labelText: LocaleKeys.otherName.tr(context: context),
errorMessage: formManager.errors.otherRelationshipName,
onChange: (value) {
formManager.updateOtherRelationshipName(value ?? '');
@ -152,7 +154,7 @@ class RequesterFormStepState extends State<RequesterFormStep> {
showCommonBottomSheetWithoutHeight(
context,
title: "Select Relation".needTranslation,
title: LocaleKeys.selectRelation.tr(context: context),
child: Consumer<HmgServicesViewModel>(
builder: (context, hmgServicesVM, child) {
if (hmgServicesVM.relationTypes.isEmpty) {
@ -164,8 +166,8 @@ class RequesterFormStepState extends State<RequesterFormStep> {
);
}
return DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
return DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: Colors.white,
customBorder: BorderRadius.all(Radius.circular(24.h)) ,

@ -1,4 +1,3 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -135,19 +134,19 @@ class RrtMapScreen extends StatelessWidget {
Column(
spacing: 4.h,
children: [
"Select Location".needTranslation.toText21(
LocaleKeys.selectLocation.tr().toText21(
weight: FontWeight.w600,
color: AppColors.textColor,
),
"Please select the location".needTranslation.toText12(
LocaleKeys.pleaseSelectTheLocation.tr().toText12(
fontWeight: FontWeight.w500,
color: AppColors.greyTextColor,
)
],
),
CustomButton(
text: "Submit Request".needTranslation,
onPressed: () {
text: LocaleKeys.submitRequest.tr(),
onPressed: () {
LocationViewModel locationViewModel = context.read<LocationViewModel>();
GeocodeResponse? response = locationViewModel.geocodeResponse;
PlaceDetails? placeDetails = locationViewModel.placeDetails;
@ -235,7 +234,7 @@ class RrtMapScreen extends StatelessWidget {
height: 40.h,
backgroundColor: AppColors.lightRedButtonColor,
borderColor: Colors.transparent,
text: "Add new address".needTranslation,
text: LocaleKeys.addNewAddress.tr(),
textColor: AppColors.primaryRedColor,
iconColor: AppColors.primaryRedColor,
onPressed: () {},
@ -245,9 +244,7 @@ class RrtMapScreen extends StatelessWidget {
isSelected: index == 0,
address:
"Flat No 301, Building No 12, Palm Spring Apartment, Sector 45, Gurugram, Haryana 122003",
title: index == 0
? "Home".needTranslation
: "Work".needTranslation,
title: index == 0 ? LocaleKeys.home.tr() : LocaleKeys.work.tr(),
onTap: () {},
);
}
@ -291,8 +288,8 @@ class RrtMapScreen extends StatelessWidget {
Row(
children: [
hospitalAndPickUpItemContent(
title: "Pick".needTranslation,
subTitle: "Inside the home".needTranslation,
title: LocaleKeys.pick.tr(),
subTitle: LocaleKeys.insideTheHome.tr(),
leadingIcon: AppAssets.pickup_bed,
),
CustomSwitch(
@ -312,7 +309,7 @@ class RrtMapScreen extends StatelessWidget {
children: [
hospitalAndPickUpItemContent(
title: '',
subTitle: "Have any appointment".needTranslation,
subTitle: LocaleKeys.haveAnyAppointment.tr(),
leadingIcon: AppAssets.appointment_checkin_icon,
),
CustomSwitch(
@ -416,8 +413,8 @@ class RrtMapScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 4.h,
children: [
"Total amount to pay".needTranslation.toText18(
weight: FontWeight.w600,
LocaleKeys.totalAmountToPay.tr().toText18(
weight: FontWeight.w600,
color: AppColors.textColor,
),
Row(
@ -425,9 +422,7 @@ class RrtMapScreen extends StatelessWidget {
Utils.buildSvgWithAssets(icon: AppAssets.warning,
height: 18.h, width: 18.h),
SizedBox(width: 4.h,),
"Amount will be paid at the hospital"
.needTranslation
.toText12(
LocaleKeys.amountPaidAtHospital.tr().toText12(
fontWeight: FontWeight.w500,
color: AppColors.greyTextColor,
),
@ -452,7 +447,7 @@ class RrtMapScreen extends StatelessWidget {
],
),
CustomButton(
text: "Submit Request".needTranslation,
text: LocaleKeys.submitRequest.tr(),
onPressed: () {
LocationViewModel locationViewModel = context.read<LocationViewModel>();
GeocodeResponse? response = locationViewModel.geocodeResponse;
@ -530,8 +525,8 @@ class RrtMapScreen extends StatelessWidget {
return SizedBox(
width: MediaQuery.sizeOf(context).width,
child: TextInputWidget(
labelText: "Enter Pickup Location Manually".needTranslation,
hintText: "Enter Pickup Location".needTranslation,
labelText: LocaleKeys.enterPickupLocationManually.tr(),
hintText: LocaleKeys.enterPickupLocation.tr(),
controller: TextEditingController(
text: vm.geocodeResponse?.results.first.formattedAddress ??
vm.selectedPrediction?.description,
@ -562,7 +557,7 @@ class RrtMapScreen extends StatelessWidget {
openLocationInputBottomSheet(BuildContext context) {
context.read<LocationViewModel>().flushSearchPredictions();
showCommonBottomSheetWithoutHeight(
title: "".needTranslation,
title: "",
context,
child: SizedBox(
height: MediaQuery.sizeOf(context).height * .8,
@ -583,11 +578,10 @@ class RrtMapScreen extends StatelessWidget {
child: Row(
children: [
hospitalAndPickUpItemContent(
title: "Select Hospital".needTranslation,
title: "Select Hospital".tr(),
subTitle: context
.read<EmergencyServicesViewModel>()
.getSelectedHospitalName() ??
"Select Hospital".needTranslation,
.getSelectedHospitalName() ?? "Select Hospital".tr(),
leadingIcon: AppAssets.hospital,
),
Utils.buildSvgWithAssets(
@ -606,7 +600,7 @@ class RrtMapScreen extends StatelessWidget {
void openAppointmentList(BuildContext context) {
showCommonBottomSheetWithoutHeight(
title: "Select Appointment".needTranslation,
title: LocaleKeys.selectAppointment.tr(),
context,
child: SizedBox(
height: MediaQuery.sizeOf(context).height * .5,

@ -18,12 +18,11 @@ class RrtRequestTypeSelect extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Consumer<EmergencyServicesViewModel>(builder: (context, emergencyServicesVM, child) {
print("the checkbox is ${emergencyServicesVM.agreedToTermsAndCondition}");
return Column(
children: [
Column(
children: [
"Rapid Response Team (RRT) options".needTranslation.toText20(color: AppColors.textColor, isBold: true),
LocaleKeys.rapidResponseTeam.tr(context: context).toText20(color: AppColors.textColor, isBold: true),
SizedBox(
height: 16.h,
),
@ -74,7 +73,7 @@ class RrtRequestTypeSelect extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Total amount to pay".needTranslation.toText18(
LocaleKeys.totalAmountToPay.tr(context: context).toText18(
weight: FontWeight.w600,
color: AppColors.textColor,
),
@ -94,19 +93,19 @@ class RrtRequestTypeSelect extends StatelessWidget {
SizedBox(
width: 4.h,
),
"Amount will be paid at the hospital".needTranslation.toText11(
LocaleKeys.amountPaidAtHospital.tr(context: context).toText11(
color: AppColors.greyTextColor,
),
],
),
Row(
children: [
"+ VAT 15%(".needTranslation.toText12(
LocaleKeys.vat15.tr(context: context).toText12(
fontWeight: FontWeight.w500,
color: AppColors.greyTextColor,
),
"${emergencyServicesVM.selectedRRTProcedure?.patientTaxAmount})".needTranslation.toText14(
weight: FontWeight.w600,
"${emergencyServicesVM.selectedRRTProcedure?.patientTaxAmount})".toText14(
weight: FontWeight.w600,
color: AppColors.greyTextColor,
),
],

@ -1,8 +1,10 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_widget_from_html/flutter_widget_from_html.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';
import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
@ -18,7 +20,7 @@ class TermsAndCondition extends StatelessWidget {
Expanded(
child: CollapsingListView(
title: "Terms And Condition".needTranslation,
title: LocaleKeys.termsConditoins.tr(context: context),
child:DecoratedBox(decoration:RoundedRectangleBorder().toSmoothCornerDecoration(
color: AppColors.whiteColor,
borderRadius: 20.h,

@ -156,18 +156,18 @@ class CallAmbulancePage extends StatelessWidget {
Column(
spacing: 4.h,
children: [
"Select Pickup Details".needTranslation.toText21(
LocaleKeys.selectPickupDetails.tr(context: context).toText21(
weight: FontWeight.w600,
color: AppColors.textColor,
),
" Please select the details of pickup".needTranslation.toText12(
LocaleKeys.pleaseSelectDetailsOfPickup.tr(context: context).toText12(
fontWeight: FontWeight.w500,
color: AppColors.greyTextColor,
)
],
),
CustomButton(
text: "Select Details".needTranslation,
text: LocaleKeys.selectDetails.tr(context: context),
onPressed: () {
context.read<EmergencyServicesViewModel>().updateBottomSheetState(BottomSheetType.EXPANDED);
})
@ -256,7 +256,7 @@ class CallAmbulancePage extends StatelessWidget {
height: 40.h,
backgroundColor: AppColors.lightRedButtonColor,
borderColor: Colors.transparent,
text: "Add new address".needTranslation,
text: LocaleKeys.addNewAddress.tr(context: context),
textColor: AppColors.primaryRedColor,
iconColor: AppColors.primaryRedColor,
onPressed: () {},
@ -265,7 +265,7 @@ class CallAmbulancePage extends StatelessWidget {
return AddressItem(
isSelected: index == 0,
address: "Flat No 301, Building No 12, Palm Spring Apartment, Sector 45, Gurugram, Haryana 122003",
title: index == 0 ? "Home".needTranslation : "Work".needTranslation,
title: index == 0 ? LocaleKeys.home.tr(context: context) : LocaleKeys.work.tr(context: context),
onTap: () {},
);
}
@ -309,8 +309,8 @@ class CallAmbulancePage extends StatelessWidget {
Row(
children: [
hospitalAndPickUpItemContent(
title: "Pick".needTranslation,
subTitle: "Inside the home".needTranslation,
title: LocaleKeys.pick.tr(context: context),
subTitle: LocaleKeys.insideTheHome.tr(context: context),
leadingIcon: AppAssets.pickup_bed,
),
CustomSwitch(
@ -325,8 +325,8 @@ class CallAmbulancePage extends StatelessWidget {
Row(
children: [
hospitalAndPickUpItemContent(
title: 'Appointment',
subTitle: "Have any appointment".needTranslation,
title: LocaleKeys.appointment.tr(context: context),
subTitle: LocaleKeys.haveAnyAppointment.tr(context: context),
leadingIcon: AppAssets.appointment_calendar_icon,
),
CustomSwitch(
@ -426,7 +426,7 @@ class CallAmbulancePage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 4.h,
children: [
"Total amount to pay".needTranslation.toText18(
LocaleKeys.totalAmountToPay.tr(context: context).toText18(
weight: FontWeight.w600,
color: AppColors.textColor,
),
@ -436,7 +436,7 @@ class CallAmbulancePage extends StatelessWidget {
SizedBox(
width: 4.h,
),
"Amount will be paid at the hospital".needTranslation.toText12(
LocaleKeys.amountPaidAtHospital.tr(context: context).toText12(
fontWeight: FontWeight.w500,
color: AppColors.greyTextColor,
),
@ -455,7 +455,7 @@ class CallAmbulancePage extends StatelessWidget {
],
),
CustomButton(
text: "Submit Request".needTranslation,
text: LocaleKeys.submitRequest.tr(context: context),
onPressed: () {
LocationViewModel locationViewModel = context.read<LocationViewModel>();
GeocodeResponse? response = locationViewModel.geocodeResponse;
@ -530,8 +530,8 @@ class CallAmbulancePage extends StatelessWidget {
return SizedBox(
width: MediaQuery.sizeOf(context).width,
child: TextInputWidget(
labelText: "Enter Pickup Location Manually".needTranslation,
hintText: "Enter Pickup Location".needTranslation,
labelText: LocaleKeys.enterPickupLocationManually.tr(context: context),
hintText: LocaleKeys.enterPickupLocation.tr(context: context),
controller: TextEditingController(
text: vm.geocodeResponse?.results.first.formattedAddress ?? vm.selectedPrediction?.description,
),
@ -563,7 +563,7 @@ class CallAmbulancePage extends StatelessWidget {
openLocationInputBottomSheet(BuildContext context) {
context.read<LocationViewModel>().flushSearchPredictions();
showCommonBottomSheetWithoutHeight(
title: "".needTranslation,
title: "",
context,
child: SizedBox(
height: MediaQuery.sizeOf(context).height * .8,
@ -583,25 +583,22 @@ class CallAmbulancePage extends StatelessWidget {
child: Row(
children: [
hospitalAndPickUpItemContent(
title: "Select Hospital".needTranslation,
subTitle: context.read<EmergencyServicesViewModel>().getSelectedHospitalName() ?? "Select Hospital".needTranslation,
title: LocaleKeys.selectHospital.tr(context: context),
subTitle: context.read<EmergencyServicesViewModel>().getSelectedHospitalName() ?? LocaleKeys.selectHospital.tr(context: context),
leadingIcon: AppAssets.hospital,
),
Utils.buildSvgWithAssets(icon: AppAssets.down_cheveron, width: 24.h, height: 24.h).paddingAll(16.h)
],
).onPress(() {
print("the item is clicked");
showHospitalBottomSheet(context);
}).paddingSymmetrical(
10.w,
12.h,
),
10.w, 12.h),
);
}
void openAppointmentList(BuildContext context) {
showCommonBottomSheetWithoutHeight(
title: "Select Appointment".needTranslation,
title: LocaleKeys.selectAppointment.tr(context: context),
context,
child: SizedBox(
height: MediaQuery.sizeOf(context).height * .5,

@ -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/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';
import 'package:lottie/lottie.dart';
@ -27,8 +29,7 @@ class RequestingServicesPage extends StatelessWidget {
.center,
Positioned(
bottom: 1,
child: "Submitting your request. \nPlease wait for a moment"
.needTranslation
child: LocaleKeys.submitRequest.tr(context: context)
.toText16(color: AppColors.textColor, weight: FontWeight.w500)
.paddingOnly(bottom: 100.h, left: 100.h, right: 100.h))
],

@ -1,5 +1,6 @@
import 'dart:io';
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';
@ -9,6 +10,7 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/emergency_services/emergency_services_view_model.dart';
import 'package:hmg_patient_app_new/features/emergency_services/models/resp_model/AmbulanceRequestOrdersModel.dart';
import 'package:hmg_patient_app_new/features/emergency_services/models/resp_model/RRTServiceData.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';
@ -60,14 +62,14 @@ class TrackingScreen extends StatelessWidget {
iconSize: 18.w,
backgroundColor: AppColors.bgGreenColor,
borderColor: Colors.transparent,
text: "Close".needTranslation,
text: LocaleKeys.close.tr(context: context),
textColor: AppColors.whiteColor,
onPressed: () {},
).paddingOnly(left: 16.h, right: 16.h),
),
),
body: CollapsingListView(
title: "Tracking Details".needTranslation,
title: LocaleKeys.trackingDetails.tr(context: context),
child: SingleChildScrollView(
child: Column(
children: [
@ -136,7 +138,7 @@ class TrackingScreen extends StatelessWidget {
height: 16,
),
CustomButton(
text: "Cancel Request".needTranslation,
text: LocaleKeys.cancelRequest.tr(context: context),
onPressed: () async {
openCancelOrderBottomSheet(context);
},
@ -162,7 +164,7 @@ class TrackingScreen extends StatelessWidget {
iconSize: 18.w,
backgroundColor: AppColors.lightRedButtonColor,
borderColor: Colors.transparent,
text: "Share Your Live Location on Whatsapp".needTranslation,
text: LocaleKeys.shareLocationWhatsapp.tr(context: context),
fontSize: 12.f,
textColor: AppColors.primaryRedColor,
iconColor: AppColors.primaryRedColor,
@ -280,7 +282,7 @@ class TrackingScreen extends StatelessWidget {
return RichText(
text: TextSpan(children: <TextSpan>[
TextSpan(
text: "Please wait for the call".needTranslation,
text: LocaleKeys.pleaseWaitForCall.tr(),
style: TextStyle(
fontSize: 21.f,
fontWeight: FontWeight.w600,
@ -288,7 +290,7 @@ class TrackingScreen extends StatelessWidget {
),
),
TextSpan(
text: "...".needTranslation,
text: "...",
style: TextStyle(
fontSize: 21.f,
fontWeight: FontWeight.w600,
@ -301,7 +303,7 @@ class TrackingScreen extends StatelessWidget {
return RichText(
text: TextSpan(children: <TextSpan>[
TextSpan(
text: "15:30".needTranslation,
text: "15:30",
style: TextStyle(
fontSize: 21.f,
fontWeight: FontWeight.w600,
@ -309,7 +311,7 @@ class TrackingScreen extends StatelessWidget {
),
),
TextSpan(
text: " mins ".needTranslation,
text: LocaleKeys.mins.tr(),
style: TextStyle(
fontSize: 21.f,
fontWeight: FontWeight.w600,
@ -317,7 +319,7 @@ class TrackingScreen extends StatelessWidget {
),
),
TextSpan(
text: "to hospital".needTranslation,
text: LocaleKeys.toHospitalLower.tr(),
style: TextStyle(
fontSize: 21.f,
fontWeight: FontWeight.w600,
@ -328,7 +330,7 @@ class TrackingScreen extends StatelessWidget {
);
case OrderTrackingState.ended:
return "Arrived".needTranslation.toText21(color: AppColors.textColor, weight: FontWeight.w600);
return LocaleKeys.arrived.tr().toText21(color: AppColors.textColor, weight: FontWeight.w600);
case OrderTrackingState.failed:
case OrderTrackingState.cancel:
return SizedBox.shrink();
@ -386,8 +388,8 @@ class TrackingScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
spacing: 4.h,
children: [
"Contact".needTranslation.toText14(color: AppColors.textColor, weight: FontWeight.w600),
"0115259555".needTranslation.toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500).onPress((){
LocaleKeys.contact.tr().toText14(color: AppColors.textColor, weight: FontWeight.w600),
"0115259555".toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500).onPress((){
launchUrl(
Uri.parse("tel://0115259555"),
);
@ -429,23 +431,24 @@ class TrackingScreen extends StatelessWidget {
// }
getTitle(OrderTrackingState? state) {
if(state == null)
return "Failed".needTranslation.toText16(color: AppColors.textColor, weight: FontWeight.w600);
if(state == null) {
return LocaleKeys.failed.tr().toText16(color: AppColors.textColor, weight: FontWeight.w600);
}
switch (state) {
case OrderTrackingState.waitingForCall:
return "Confirmation Call".needTranslation.toText16(color: AppColors.textColor, weight: FontWeight.w600);
return LocaleKeys.confirmationCall.tr().toText16(color: AppColors.textColor, weight: FontWeight.w600);
case OrderTrackingState.dispactched:
return "Pickup Up from Home".needTranslation.toText16(color: AppColors.textColor, weight: FontWeight.w600);
return LocaleKeys.pickupFromHome.tr().toText16(color: AppColors.textColor, weight: FontWeight.w600);
case OrderTrackingState.returning:
return " On The Way To Hospital".needTranslation.toText16(color: AppColors.textColor, weight: FontWeight.w600);
return LocaleKeys.onTheWayToHospital.tr().toText16(color: AppColors.textColor, weight: FontWeight.w600);
case OrderTrackingState.ended:
return "Arrived at Hospital".needTranslation.toText16(color: AppColors.textColor, weight: FontWeight.w600);
return LocaleKeys.arrivedAtHospital.tr().toText16(color: AppColors.textColor, weight: FontWeight.w600);
case OrderTrackingState.failed:
return "Failed".needTranslation.toText16(color: AppColors.textColor, weight: FontWeight.w600);
return LocaleKeys.failed.tr().toText16(color: AppColors.textColor, weight: FontWeight.w600);
case OrderTrackingState.cancel:
return "Order Cancel".needTranslation.toText16(color: AppColors.textColor, weight: FontWeight.w600);
return LocaleKeys.orderCancel.tr().toText16(color: AppColors.textColor, weight: FontWeight.w600);
}
}

@ -21,14 +21,12 @@ class PickupLocation extends StatelessWidget {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Select Pickup Direction"
.needTranslation
LocaleKeys.selectPickupDirection.tr(context: context)
.toText24(color: AppColors.textColor, isBold: true),
SizedBox(
height: 16.h,
),
"Select Direction"
.needTranslation
LocaleKeys.selectDirection.tr(context: context)
.toText16(color: AppColors.textColor, weight: FontWeight.w600),
SizedBox(
height: 12.h,
@ -58,8 +56,7 @@ class PickupLocation extends StatelessWidget {
activeColor: AppColors.primaryRedColor,
fillColor: MaterialStateProperty.all(AppColors.primaryRedColor),
),
"To Hospital"
.needTranslation
LocaleKeys.toHospital.tr(context: context)
.toText14(color: AppColors.textColor, weight: FontWeight.w500)
],
).onPress(() {
@ -84,8 +81,7 @@ class PickupLocation extends StatelessWidget {
activeColor: AppColors.primaryRedColor,
fillColor: MaterialStateProperty.all(AppColors.primaryRedColor),
),
"From Hospital"
.needTranslation
LocaleKeys.fromHospital.tr(context: context)
.toText14(color: AppColors.textColor, weight: FontWeight.w500)
],
).onPress(() {
@ -105,8 +101,7 @@ class PickupLocation extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(height: 16.h),
"Select Way"
.needTranslation
LocaleKeys.selectWay.tr(context: context)
.toText16(color: AppColors.textColor, weight: FontWeight.w600),
SizedBox(height: 12.h),
Row(
@ -128,8 +123,7 @@ class PickupLocation extends StatelessWidget {
activeColor: AppColors.primaryRedColor,
fillColor: MaterialStateProperty.all(AppColors.primaryRedColor),
),
"One Way"
.needTranslation
LocaleKeys.oneWay.tr(context: context)
.toText12(color: AppColors.textColor, fontWeight: FontWeight.w500)
],
).onPress(() {
@ -154,8 +148,7 @@ class PickupLocation extends StatelessWidget {
activeColor: AppColors.primaryRedColor,
fillColor: MaterialStateProperty.all(AppColors.primaryRedColor),
),
"Two Way"
.needTranslation
LocaleKeys.twoWay.tr(context: context)
.toText14(color: AppColors.textColor, weight: FontWeight.w500)
],
).onPress(() {

@ -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/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/facility_selection.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';
@ -27,7 +29,7 @@ class TypeSelectionWidget extends StatelessWidget {
mainAxisSize: MainAxisSize.max,
children: [
AppCustomChipWidget(
labelText: "All Facilities".needTranslation,
labelText: LocaleKeys.all.tr(context: context),
shape: RoundedRectangleBorder(
side: BorderSide(
color: selectedFacility == FacilitySelection.ALL
@ -50,7 +52,7 @@ class TypeSelectionWidget extends StatelessWidget {
child: AppCustomChipWidget(
icon: AppAssets.hmg,
iconHasColor: false,
labelText: "Hospitals".needTranslation,
labelText: LocaleKeys.hmgHospitals.tr(context: context),
shape: RoundedRectangleBorder(
side: BorderSide(
color: selectedFacility == FacilitySelection.HMG
@ -74,7 +76,7 @@ class TypeSelectionWidget extends StatelessWidget {
child: AppCustomChipWidget(
icon: AppAssets.hmc,
iconHasColor: false,
labelText: "Medical Centers".needTranslation,
labelText: LocaleKeys.hmcMedicalClinic.tr(context: context),
shape: RoundedRectangleBorder(
side: BorderSide(
color: selectedFacility == FacilitySelection.HMC

@ -59,9 +59,8 @@ class EmergencyServicesPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Call Ambulance".needTranslation.toText16(isBold: true, color: AppColors.blackColor),
"Request an ambulance in emergency from home or hospital"
.needTranslation
LocaleKeys.callAmbulance.tr().toText16(isBold: true, color: AppColors.blackColor),
LocaleKeys.requestAmbulanceInEmergency.tr()
.toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
],
),
@ -100,10 +99,9 @@ class EmergencyServicesPage extends StatelessWidget {
Lottie.asset(AppAnimations.ambulanceAlert,
repeat: false, reverse: false, frameRate: FrameRate(60), width: 120.h, height: 120.h, fit: BoxFit.contain),
SizedBox(height: 8.h),
"Confirmation".needTranslation.toText28(color: AppColors.whiteColor, isBold: true),
LocaleKeys.confirmation.tr().toText28(color: AppColors.whiteColor, isBold: true),
SizedBox(height: 8.h),
"Are you sure you want to call an ambulance?"
.needTranslation
LocaleKeys.areYouSureYouWantToCallAmbulance.tr()
.toText14(color: AppColors.whiteColor, weight: FontWeight.w500),
SizedBox(height: 24.h),
CustomButton(
@ -148,9 +146,8 @@ class EmergencyServicesPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Nearest ER Location".needTranslation.toText16(isBold: true, color: AppColors.blackColor),
"Get the details of nearest branch including directions"
.needTranslation
LocaleKeys.nearester.tr(context: context).toText16(isBold: true, color: AppColors.blackColor),
LocaleKeys.getDetailsOfNearestBranch.tr()
.toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
],
),
@ -178,7 +175,7 @@ class EmergencyServicesPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Rapid Response Team (RRT)".toText16(isBold: true, color: AppColors.blackColor),
LocaleKeys.rapidResponseTeam.tr(context: context).toText16(isBold: true, color: AppColors.blackColor),
"Comprehensive medical service for all sorts of urgent and stable cases"
.toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
],
@ -204,8 +201,7 @@ class EmergencyServicesPage extends StatelessWidget {
SizedBox(height: 8.h),
LocaleKeys.confirm.tr().toText28(color: AppColors.whiteColor, isBold: true),
SizedBox(height: 8.h),
"Are you sure you want to call Rapid Response Team (RRT)?"
.needTranslation
LocaleKeys.areYouSureYouWantToCallRRT.tr()
.toText14(color: AppColors.whiteColor, weight: FontWeight.w500),
SizedBox(height: 24.h),
CustomButton(
@ -278,9 +274,8 @@ class EmergencyServicesPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Emergency Check-In".needTranslation.toText16(isBold: true, color: AppColors.blackColor),
"Prior ER Check-In to skip the line & payment at the reception."
.needTranslation
LocaleKeys.emergencyCheckIn.tr(context: context).toText16(isBold: true, color: AppColors.blackColor),
LocaleKeys.priorERCheckInToSkipLine.tr()
.toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
],
),
@ -318,13 +313,13 @@ class EmergencyServicesPage extends StatelessWidget {
SizedBox(height: 8.h),
LocaleKeys.confirm.tr().toText28(color: AppColors.whiteColor, isBold: true),
SizedBox(height: 8.h),
"Are you sure you want to make ER Check-In?".needTranslation.toText14(color: AppColors.whiteColor, weight: FontWeight.w500),
LocaleKeys.areYouSureYouWantToMakeERCheckIn.tr().toText14(color: AppColors.whiteColor, weight: FontWeight.w500),
SizedBox(height: 24.h),
CustomButton(
text: LocaleKeys.confirm.tr(context: context),
onPressed: () async {
Navigator.of(context).pop();
LoaderBottomSheet.showLoader(loadingText: "Checking your ER Appointment status...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingYourERAppointmentStatus.tr());
await context.read<EmergencyServicesViewModel>().checkPatientERAdvanceBalance(onSuccess: (dynamic response) {
LoaderBottomSheet.hideLoader();
context.read<EmergencyServicesViewModel>().navigateToEROnlineCheckIn();
@ -389,7 +384,7 @@ class EmergencyServicesPage extends StatelessWidget {
void openTranportationSelectionBottomSheet(BuildContext context) {
if (emergencyServicesViewModel.transportationOptions.isNotEmpty) {
showCommonBottomSheetWithoutHeight(
title: "Transport Options".needTranslation,
title: LocaleKeys.transportOptions.tr(),
context,
child: SizedBox(
height: 400.h,

@ -38,7 +38,7 @@ class ErOnlineCheckinHome extends StatelessWidget {
children: [
Expanded(
child: CollapsingListView(
title: "Emergency Check-In".needTranslation,
title: LocaleKeys.emergencyCheckIn.tr(context: context),
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.all(24.h),
@ -53,8 +53,8 @@ class ErOnlineCheckinHome extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Online Check-In".needTranslation.toText18(color: AppColors.textColor, isBold: true),
"This service lets patients to register their ER appointment prior to arrival.".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
LocaleKeys.onlineCheckIn.tr().toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.erOnlineCheckInDescription.tr().toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
],
),
),
@ -74,7 +74,7 @@ class ErOnlineCheckinHome extends StatelessWidget {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () async {
print(nfcId);
LoaderBottomSheet.showLoader(loadingText: "Processing check-in...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.processingCheckIn.tr());
await emergencyServicesViewModel.getProjectIDFromNFC(
nfcCode: nfcId,
onSuccess: (value) async {
@ -84,7 +84,7 @@ class ErOnlineCheckinHome extends StatelessWidget {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(context,
title: LocaleKeys.onlineCheckIn.tr(),
child: Utils.getSuccessWidget(loadingText: "Your ER Online Check-In has been successfully done. Please proceed to the waiting area.".needTranslation),
child: Utils.getSuccessWidget(loadingText: LocaleKeys.erOnlineCheckInSuccess.tr()),
callBackFunc: () {
Navigator.pushAndRemoveUntil(
context,
@ -98,7 +98,7 @@ class ErOnlineCheckinHome extends StatelessWidget {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Unexpected error occurred during check-in. Please contact support.".needTranslation),
child: Utils.getErrorWidget(loadingText: LocaleKeys.erOnlineCheckInError.tr()),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
@ -117,7 +117,7 @@ class ErOnlineCheckinHome extends StatelessWidget {
// callBackFunc: () {},
// isFullScreen: false);
} else {
LoaderBottomSheet.showLoader(loadingText: "Fetching hospitals list...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingHospitalsList.tr());
await context.read<EmergencyServicesViewModel>().getProjects();
LoaderBottomSheet.hideLoader();
//Project Selection Dropdown
@ -155,7 +155,7 @@ class ErOnlineCheckinHome extends StatelessWidget {
onHospitalClicked: (hospital) async {
Navigator.pop(context);
vm.setSelectedHospital(hospital);
LoaderBottomSheet.showLoader(loadingText: "Fetching payment information...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.fetchingPaymentInformation.tr(context: context));
await vm.getPatientERPaymentInformation(onSuccess: (response) {
LoaderBottomSheet.hideLoader();
vm.navigateToEROnlineCheckInPaymentPage();

@ -34,7 +34,7 @@ class ErOnlineCheckinPaymentDetailsPage extends StatelessWidget {
children: [
Expanded(
child: CollapsingListView(
title: "Emergency Check-In".needTranslation,
title: LocaleKeys.emergencyCheckIn.tr(context: context),
child: SingleChildScrollView(
child: Padding(
padding: EdgeInsets.all(24.h),
@ -52,7 +52,7 @@ class ErOnlineCheckinPaymentDetailsPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"ER Visit Details".needTranslation.toText18(color: AppColors.textColor, isBold: true),
LocaleKeys.erVisitDetails.tr().toText18(color: AppColors.textColor, isBold: true),
SizedBox(height: 24.h),
Row(
children: [
@ -70,7 +70,7 @@ class ErOnlineCheckinPaymentDetailsPage extends StatelessWidget {
labelPadding: EdgeInsetsDirectional.only(start: 4.w, end: 4.w),
),
AppCustomChipWidget(
labelText: "ER Clinic".needTranslation,
labelText: LocaleKeys.erClinic.tr(),
labelPadding: EdgeInsetsDirectional.only(start: 4.w, end: 4.w),
),
AppCustomChipWidget(
@ -111,7 +111,7 @@ class ErOnlineCheckinPaymentDetailsPage extends StatelessWidget {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Amount before tax".needTranslation.toText18(isBold: true),
LocaleKeys.amountBeforeTax.tr().toText18(isBold: true),
Utils.getPaymentAmountWithSymbol(emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShare.toString().toText16(isBold: true), AppColors.blackColor, 13,
isSaudiCurrency: true),
],
@ -121,8 +121,8 @@ class ErOnlineCheckinPaymentDetailsPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(child: "".toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor)),
"VAT 15% (${emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientTaxAmount})"
.needTranslation
LocaleKeys.vatWithAmount
.tr(namedArgs: {"amount": emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientTaxAmount.toString()})
.toText14(isBold: true, color: AppColors.greyTextColor, letterSpacing: -1),
],
),

@ -80,7 +80,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
children: [
Expanded(
child: CollapsingListView(
title: "Emergency Check-In".needTranslation,
title: LocaleKeys.emergencyCheckIn.tr(context: context),
child: SingleChildScrollView(
child: Column(
children: [
@ -99,7 +99,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
children: [
Image.asset(AppAssets.mada, width: 72.h, height: 25.h),
SizedBox(height: 16.h),
"Mada".needTranslation.toText16(isBold: true),
LocaleKeys.mada.tr(context: context).toText16(isBold: true),
],
),
SizedBox(width: 8.h),
@ -141,7 +141,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
],
),
SizedBox(height: 16.h),
"Visa or Mastercard".needTranslation.toText16(isBold: true),
LocaleKeys.visaOrMastercard.tr(context: context).toText16(isBold: true),
],
),
SizedBox(width: 8.h),
@ -178,7 +178,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
children: [
Image.asset(AppAssets.tamaraEng, width: 72.h, height: 25.h),
SizedBox(height: 16.h),
"Tamara".needTranslation.toText16(isBold: true),
LocaleKeys.tamara.tr(context: context).toText16(isBold: true),
],
),
SizedBox(width: 8.h),
@ -229,8 +229,8 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Insurance expired or inactive".needTranslation.toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500).paddingSymmetrical(24.h, 0.h),
CustomButton(
LocaleKeys.insuranceExpiredOrInactive.tr(context: context).toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500).paddingSymmetrical(24.h, 0.h),
CustomButton(
text: LocaleKeys.updateInsurance.tr(context: context),
onPressed: () {
Navigator.of(context).push(
@ -253,12 +253,12 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
)
: const SizedBox(),
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),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Amount before tax".needTranslation.toText14(isBold: true),
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShare.toString().toText16(isBold: true), AppColors.blackColor, 13,
isSaudiCurrency: true),
],
@ -266,7 +266,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
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(
emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientTaxAmount.toString().toText14(isBold: true, color: AppColors.greyTextColor), AppColors.greyTextColor, 13,
isSaudiCurrency: true),
@ -276,7 +276,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"".needTranslation.toText14(isBold: true),
"".toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax.toString().toText24(isBold: true), AppColors.blackColor, 17,
isSaudiCurrency: true),
],
@ -425,7 +425,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
}
void checkPaymentStatus() async {
LoaderBottomSheet.showLoader(loadingText: "Checking payment status, Please wait...".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.checkingPaymentStatusPleaseWait.tr(context: context));
await payfortViewModel.checkPaymentStatus(
transactionID: transID,
onSuccess: (apiResponse) async {
@ -445,7 +445,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
if (emergencyServicesViewModel.isERBookAppointment) {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getSuccessWidget(loadingText: "Your appointment has been booked successfully. Please perform Check-In once you arrive at the hospital.".needTranslation),
child: Utils.getSuccessWidget(loadingText: LocaleKeys.erAppointmentBookedSuccess.tr(context: context)),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
@ -458,7 +458,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Payment Failed! Please try again.".needTranslation),
child: Utils.getErrorWidget(loadingText: LocaleKeys.paymentFailedPleaseTryAgain.tr(context: context)),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:flutter_nfc_kit/flutter_nfc_kit.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -9,6 +10,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/theme/colors.dart';
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
@ -35,8 +37,8 @@ class ErOnlineCheckinSelectCheckinBottomSheet extends StatelessWidget {
children: [
checkInOptionCard(
AppAssets.checkin_location_icon,
"Live Location".needTranslation,
"Verify your location to be at hospital to check in".needTranslation,
LocaleKeys.liveLocation.tr(context: context),
LocaleKeys.verifyYourLocationAtHospital.tr(context: context),
).onPress(() {
// locationUtils = LocationUtils(
// isShowConfirmDialog: false,
@ -51,8 +53,8 @@ class ErOnlineCheckinSelectCheckinBottomSheet extends StatelessWidget {
sendCheckInRequest(projectDetailListModel.checkInQrCode!, context);
} else {
showCommonBottomSheetWithoutHeight(context,
title: "Error".needTranslation,
child: Utils.getErrorWidget(loadingText: "Please ensure you're within the hospital location to perform online check-in.".needTranslation), callBackFunc: () {
title: LocaleKeys.error.tr(context: context),
child: Utils.getErrorWidget(loadingText: LocaleKeys.ensureWithinHospitalLocation.tr(context: context),), callBackFunc: () {
Navigator.of(context).pop();
}, isFullScreen: false);
}
@ -61,8 +63,8 @@ class ErOnlineCheckinSelectCheckinBottomSheet extends StatelessWidget {
SizedBox(height: 16.h),
checkInOptionCard(
AppAssets.checkin_nfc_icon,
"NFC (Near Field Communication)".needTranslation,
"Scan your phone via NFC board to check in".needTranslation,
LocaleKeys.nfcNearFieldCommunication.tr(context: context),
LocaleKeys.scanPhoneViaNFC.tr(context: context),
).onPress(() {
Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) {
@ -75,8 +77,8 @@ class ErOnlineCheckinSelectCheckinBottomSheet extends StatelessWidget {
SizedBox(height: 16.h),
checkInOptionCard(
AppAssets.checkin_qr_icon,
"QR Code".needTranslation,
"Scan QR code with your camera to check in".needTranslation,
LocaleKeys.qrCode.tr(context: context),
LocaleKeys.scanQRCodeToCheckIn.tr(context: context),
).onPress(() async {
String onlineCheckInQRCode = (await BarcodeScanner.scan().then((value) => value.rawContent));
if (onlineCheckInQRCode != "") {

@ -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' show AppAssets;
import 'package:hmg_patient_app_new/core/app_export.dart';
@ -8,6 +9,7 @@ import 'package:hmg_patient_app_new/features/emergency_services/emergency_servic
import 'package:hmg_patient_app_new/features/emergency_services/models/OrderDisplay.dart';
import 'package:hmg_patient_app_new/features/emergency_services/models/resp_model/AmbulanceRequestOrdersModel.dart';
import 'package:hmg_patient_app_new/features/emergency_services/models/resp_model/RRTServiceData.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/history/widget/ambulance_history_item.dart' show AmbulanceHistoryItem;
import 'package:hmg_patient_app_new/presentation/emergency_services/history/widget/rrt_item.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
@ -24,7 +26,7 @@ class ErHistoryListing extends StatelessWidget {
Expanded(
child: CollapsingListView(
title: "History Log".needTranslation,
title: LocaleKeys.history.tr(context: context),
child: SingleChildScrollView(
physics: NeverScrollableScrollPhysics(),
child: Column(
@ -55,12 +57,10 @@ class ErHistoryListing extends StatelessWidget {
}),
),
Visibility(
visible: data.$1
?.isEmpty == true, child: Center(
child: Utils.getNoDataWidget(context,
noDataText: "You don't have any history"
.needTranslation),
)),
visible: data.$1.isEmpty == true,
child: Center(
child: Utils.getNoDataWidget(context, noDataText: LocaleKeys.noDataAvailable.tr(context: context)),
)),
],
);
}
@ -92,9 +92,9 @@ class ErHistoryListing extends StatelessWidget {
return Row(
spacing: 8.h,
children: [
if(dataList?.isNotEmpty == true)
if(dataList.isNotEmpty == true)
AppCustomChipWidget(
labelText: "All Facilities".needTranslation,
labelText: LocaleKeys.allFacilities.tr(context: context),
shape: RoundedRectangleBorder(
side: BorderSide(
color: value == OrderDislpay.ALL ? AppColors.errorColor : AppColors.chipBorderColorOpacity20,
@ -111,7 +111,7 @@ class ErHistoryListing extends StatelessWidget {
.ambulanceOrders
?.isNotEmpty == true)
AppCustomChipWidget(
labelText: "Ambulance".needTranslation,
labelText: LocaleKeys.ambulancerequest.tr(context: context),
icon: AppAssets.ambulance,
shape: RoundedRectangleBorder(
side: BorderSide(
@ -130,7 +130,7 @@ class ErHistoryListing extends StatelessWidget {
?.completedOrders
.isNotEmpty == true)
AppCustomChipWidget(
labelText: "Rapid Response Team".needTranslation,
labelText: LocaleKeys.rapidResponseTeam.tr(context: context),
icon: AppAssets.ic_rrt_vehicle,
shape: RoundedRectangleBorder(
side: BorderSide(

@ -1,8 +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/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';
class RequestStatus extends StatelessWidget {
final int status;
@ -21,14 +22,13 @@ class RequestStatus extends StatelessWidget {
switch (status) {
case 1: //pending
case 2: //processing
return "Under Processing".needTranslation;
case 3: //completed
return "Completed".needTranslation;
break;
return LocaleKeys.underProcessing.tr();
case 3:
return LocaleKeys.completed.tr();
case 4: //cancel
case 6:
case 7:
return "Canceled by patient".needTranslation;
return LocaleKeys.canceledByPatient.tr();
break;
}
return null;

@ -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';
@ -6,6 +7,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/emergency_services/emergency_services_view_model.dart';
import 'package:hmg_patient_app_new/features/emergency_services/models/resp_model/AmbulanceRequestOrdersModel.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/history/widget/RequestStatus.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@ -40,7 +42,7 @@ class AmbulanceHistoryItem extends StatelessWidget {
spacing: 4.w,
children: [
chip( Utils.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.time)), AppAssets.calendar, AppColors.blackBgColor),
chip("Ambulance".needTranslation, AppAssets.ambulance, AppColors.blackBgColor),
chip(LocaleKeys.ambulancerequest.tr(context: context), AppAssets.ambulance, AppColors.blackBgColor),
],
),
Row(
@ -52,7 +54,7 @@ class AmbulanceHistoryItem extends StatelessWidget {
),
if (order.statusId == 1 || order.statusId == 2)
CustomButton(
text: "Cancel Request".needTranslation,
text: LocaleKeys.cancelRequest.tr(context: context),
onPressed: () async {
openCancelOrderBottomSheet(context);
},

@ -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';
@ -6,6 +7,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/emergency_services/emergency_services_view_model.dart';
import 'package:hmg_patient_app_new/features/emergency_services/models/resp_model/RRTServiceData.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/history/widget/RequestStatus.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
@ -40,13 +42,13 @@ class RRTItem extends StatelessWidget {
spacing: 4.w,
children: [
chip( Utils.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.time)), AppAssets.calendar, AppColors.blackBgColor),
chip("Rapid Response Team(RRT)".needTranslation, AppAssets.ic_rrt_vehicle, AppColors.blackBgColor),
chip(LocaleKeys.rapidResponseTeam.tr(context: context), AppAssets.ic_rrt_vehicle, AppColors.blackBgColor),
],
),
SizedBox(height: 4.h),
if (order.statusId == 1 || order.statusId == 2)
CustomButton(
text: "Cancel Request".needTranslation,
text: LocaleKeys.cancelRequest.tr(context: context),
onPressed: () async {
openCancelOrderBottomSheet(context);
},

@ -36,7 +36,7 @@ class _NearestErPageState extends State<NearestErPage> {
@override
Widget build(BuildContext context) {
return CollapsingListView(
title: "Nearest ER".needTranslation,
title: LocaleKeys.nearester.tr(context: context),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -44,7 +44,7 @@ class _NearestErPageState extends State<NearestErPage> {
children: [
TextInputWidget(
labelText: LocaleKeys.search.tr(),
hintText: 'Type any facility name'.needTranslation,
hintText: 'Type any facility name',
controller: searchText,
onChange: (value) {
debouncer.run(() {
@ -92,7 +92,7 @@ class _NearestErPageState extends State<NearestErPage> {
},
);
} else {
return Center(child: Utils.getNoDataWidget(context, noDataText: "No nearest Er Arround you".needTranslation));
return Center(child: Utils.getNoDataWidget(context, noDataText: "No nearest Er Around you"));
}
}),
),

@ -31,7 +31,7 @@ class LocationInputBottomSheet extends StatelessWidget {
children: [
TextInputWidget(
labelText: LocaleKeys.search.tr(),
hintText: "Search Location".needTranslation,
hintText: LocaleKeys.selectLocation.tr(context: context),
controller: TextEditingController(),
onChange: (value){
debouncer.run(() {

@ -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';
@ -6,6 +7,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/emergency_services/emergency_services_view_model.dart';
import 'package:hmg_patient_app_new/features/emergency_services/models/resp_model/ProjectAvgERWaitingTime.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';
@ -67,14 +69,14 @@ class NearestERItem extends StatelessWidget {
spacing: 8.h,
children: [
AppCustomChipWidget(
labelText: "${nearestERItem.distanceInKilometers} km".needTranslation,
labelText: "${nearestERItem.distanceInKilometers} km",
icon: AppAssets.location,
iconHasColor: false,
labelPadding: EdgeInsetsDirectional.only(start: 4.h, end: 0.h),
padding: EdgeInsets.all(8.h),
).toShimmer2(isShow: isLoading),
AppCustomChipWidget(
labelText: "Expected waiting time: ${nearestERItem.getTime()} mins".needTranslation,
labelText: "Expected waiting time: ${nearestERItem.getTime()} mins",
icon: AppAssets.waiting_time_clock,
iconHasColor: false,
labelPadding: EdgeInsetsDirectional.only(start: 4.h, end: 0.h),
@ -87,7 +89,7 @@ class NearestERItem extends StatelessWidget {
children: [
Expanded(
child: CustomButton(
text: "View Location on Google Maps".needTranslation,
text: LocaleKeys.viewLocationGoogleMaps.tr(context: context),
iconSize: 18.h,
icon: AppAssets.location,
onPressed: () {

@ -84,7 +84,7 @@ class _HabibWalletState extends State<HabibWalletPage> {
CustomButton(
icon: AppAssets.recharge_icon,
iconSize: 21.h,
text: "Recharge".needTranslation,
text: LocaleKeys.recharge.tr(context: context),
onPressed: () {
Navigator.of(context)
.push(

@ -80,7 +80,7 @@ class _RechargeWalletPageState extends State<RechargeWalletPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
//TODO: Check with hussain to show AED or SAR
"Enter an amount".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
LocaleKeys.amount.tr(context: context).toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
Spacer(),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
@ -110,7 +110,7 @@ class _RechargeWalletPageState extends State<RechargeWalletPage> {
13.h,
isExpanded: false),
const Spacer(),
"SAR".needTranslation.toText20(color: AppColors.greyTextColor, weight: FontWeight.w500),
LocaleKeys.sar.tr(context: context).toText20(color: AppColors.greyTextColor, weight: FontWeight.w500),
],
),
],
@ -151,7 +151,7 @@ class _RechargeWalletPageState extends State<RechargeWalletPage> {
],
).onPress(() async {
habibWalletVM.setCurrentIndex(0);
showCommonBottomSheetWithoutHeight(context, title: "Select Medical File".needTranslation,
showCommonBottomSheetWithoutHeight(context, title: LocaleKeys.medicalFile.tr(context: context),
titleWidget: Consumer<HabibWalletViewModel>(builder: (context, habibWalletVM, child) {
return habibWalletVM.currentIndex != 0
? IconButton(
@ -160,7 +160,7 @@ class _RechargeWalletPageState extends State<RechargeWalletPage> {
onPressed: () => habibWalletVM.setCurrentIndex(0),
highlightColor: Colors.transparent,
)
: "Select Medical File".needTranslation.toText20(weight: FontWeight.w600);
: LocaleKeys.medicalFile.tr(context: context).toText20(weight: FontWeight.w600);
}), child: Consumer<HabibWalletViewModel>(builder: (context, habibWalletVM, child) {
return MultiPageBottomSheet();
}), callBackFunc: () {}, isFullScreen: false, isCloseButtonVisible: true);
@ -261,7 +261,7 @@ class _RechargeWalletPageState extends State<RechargeWalletPage> {
if (amountTextController.text.isEmpty) {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Please enter amount to continue.".needTranslation),
child: Utils.getErrorWidget(loadingText: "Please enter amount to continue."),
callBackFunc: () {
textFocusNode.requestFocus();
},
@ -271,7 +271,7 @@ class _RechargeWalletPageState extends State<RechargeWalletPage> {
} else if (habibWalletVM.selectedHospital == null) {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Please select hospital to continue.".needTranslation),
child: Utils.getErrorWidget(loadingText: "Please select hospital to continue."),
callBackFunc: () {
textFocusNode.requestFocus();
},

@ -82,7 +82,7 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
children: [
Image.asset(AppAssets.mada, width: 72.h, height: 25.h).toShimmer2(isShow: false),
SizedBox(height: 16.h),
"Mada".needTranslation.toText16(isBold: true).toShimmer2(isShow: false),
LocaleKeys.mada.tr(context: context).toText16(isBold: true).toShimmer2(isShow: false),
],
),
SizedBox(width: 8.h),
@ -124,7 +124,7 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
],
).toShimmer2(isShow: false),
SizedBox(height: 16.h),
"Visa or Mastercard".needTranslation.toText16(isBold: true).toShimmer2(isShow: false),
LocaleKeys.visaOrMastercard.tr(context: context).toText16(isBold: true).toShimmer2(isShow: false),
],
),
SizedBox(width: 8.h),
@ -180,7 +180,7 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"Total amount to pay".needTranslation.toText16(isBold: true),
LocaleKeys.totalAmountToPay.tr(context: context).toText16(isBold: true),
Utils.getPaymentAmountWithSymbol(habibWalletVM.walletRechargeAmount.toString().toText24(isBold: true), AppColors.blackColor, 15.h, isSaudiCurrency: true),
],
).paddingSymmetrical(24.h, 0.h),
@ -314,7 +314,7 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getSuccessWidget(loadingText: "Payment Successful!".needTranslation),
child: Utils.getSuccessWidget(loadingText: "Payment Successful!"),
callBackFunc: () {
Navigator.of(context).pop();
Navigator.of(context).pop();
@ -327,7 +327,7 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Payment Failed - ${err}".needTranslation),
child: Utils.getErrorWidget(loadingText: LocaleKeys.paymentFailedPleaseTryAgain.tr(context: context)),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
@ -339,7 +339,7 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: "Payment Failed! Please try again.".needTranslation),
child: Utils.getErrorWidget(loadingText: LocaleKeys.paymentFailedPleaseTryAgain.tr(context: context)),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,

@ -76,7 +76,7 @@ class _MultiPageBottomSheetState extends State<MultiPageBottomSheet> {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Enter File Number".needTranslation.toText20(weight: FontWeight.w600),
"Enter File Number".toText20(weight: FontWeight.w600),
SizedBox(height: 12.h),
TextInputWidget(
labelText: LocaleKeys.fileNumber.tr(),
@ -98,9 +98,9 @@ class _MultiPageBottomSheetState extends State<MultiPageBottomSheet> {
await habibWalletVM.getPatientInfoByPatientID(
patientID: fileNumberEditingController.text,
onSuccess: (response) async {
print(response.data["GetPatientInfoByPatientIDList"][0]["FullName"]);
debugPrint(response.data["GetPatientInfoByPatientIDList"][0]["FullName"]);
await _dialogService.showCommonBottomSheetWithoutH(
message: "A file was found with name: ${response.data["GetPatientInfoByPatientIDList"][0]["FullName"]}, Would you like to recharge wallet for this file number?".needTranslation,
message: "A file was found with name: ${response.data["GetPatientInfoByPatientIDList"][0]["FullName"]}, Would you like to recharge wallet for this file number?",
label: LocaleKeys.notice.tr(),
onOkPressed: () {
habibWalletVM.setSelectedRechargeType(3);
@ -161,7 +161,7 @@ class _MultiPageBottomSheetState extends State<MultiPageBottomSheet> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.familyTitle.tr(context: context).toText16(color: AppColors.textColor, weight: FontWeight.w500),
"Select a medical file from your family".needTranslation.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
"Select a medical file from your family".toText14(color: AppColors.greyTextColor, weight: FontWeight.w500),
],
),
Utils.buildSvgWithAssets(icon: AppAssets.forward_chevron_icon, iconColor: AppColors.textColor, width: 15.h, height: 15.h),

@ -1,8 +1,10 @@
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/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/widgets/hospital_list_item.dart';
import 'package:hmg_patient_app_new/theme/colors.dart' show AppColors;
import 'package:provider/provider.dart';
@ -28,7 +30,7 @@ class SelectHospitalBottomSheet extends StatelessWidget {
// ),
// ),
Text(
"Please select the hospital you want to make an advance payment for.".needTranslation,
LocaleKeys.selectHospitalForAdvancePayment.tr(context: context),
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w500,

@ -1,9 +1,11 @@
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/core/enums.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/presentation/book_appointment/select_clinic_page.dart';
import 'package:hmg_patient_app_new/presentation/health_calculators_and_converts/health_calculator_view_model.dart';
import 'package:hmg_patient_app_new/presentation/health_calculators_and_converts/widgets/bf.dart';
@ -57,8 +59,8 @@ class _HealthCalculatorDetailedPageState extends State<HealthCalculatorDetailedP
text: widget.calculatorType == HealthCalculatorsTypeEnum.bloodSugar ||
widget.calculatorType == HealthCalculatorsTypeEnum.bloodCholesterol ||
widget.calculatorType == HealthCalculatorsTypeEnum.triglycerides
? "Convert".needTranslation
: "Calculate".needTranslation,
? LocaleKeys.convert.tr(context: context)
: LocaleKeys.calculate.tr(context: context),
onPressed: () {
if (calculatedResult == null) 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/dependencies.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/health_calculators_and_converts/health_calculator_detailed_page.dart';
import 'package:hmg_patient_app_new/presentation/health_calculators_and_converts/widgets/health_card.dart';
import 'package:hmg_patient_app_new/services/dialog_service.dart';
@ -32,7 +34,7 @@ class _HealthCalculatorsPageState extends State<HealthCalculatorsPage> {
Widget build(BuildContext context) {
DialogService dialogService = getIt.get<DialogService>();
return CollapsingListView(
title: widget.type == HealthCalConEnum.calculator ? "Health Calculators".needTranslation : "Health Converters".needTranslation,
title: widget.type == HealthCalConEnum.calculator ? LocaleKeys.healthCalculators.tr(context: context) : LocaleKeys.healthConverters.tr(),
child: widget.type == HealthCalConEnum.calculator
? Column(
children: [
@ -47,8 +49,8 @@ class _HealthCalculatorsPageState extends State<HealthCalculatorsPage> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
"General Health".needTranslation.toText16(weight: FontWeight.w600),
"Related To BMI, calories, body fat, etc to stay updated with your health.".needTranslation.toText12(fontWeight: FontWeight.w500, color: Color(0xFF8F9AA3))
LocaleKeys.generalHealth.tr().toText16(weight: FontWeight.w600),
LocaleKeys.relatedToBMICalories.tr().toText12(fontWeight: FontWeight.w500, color: Color(0xFF8F9AA3))
],
),
),
@ -60,7 +62,7 @@ class _HealthCalculatorsPageState extends State<HealthCalculatorsPage> {
).paddingAll(16.w))
.onPress(() {
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Calculator".needTranslation,
label: LocaleKeys.selectCalculator.tr(),
message: "",
child: showCalculatorsItems(type: HealthCalculatorEnum.general),
onOkPressed: () {},
@ -78,8 +80,8 @@ class _HealthCalculatorsPageState extends State<HealthCalculatorsPage> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
"Women's Health".needTranslation.toText16(weight: FontWeight.w600),
"Related To periods, ovulation, pregnancy, and other topics.".needTranslation.toText12(fontWeight: FontWeight.w500, color: Color(0xFF8F9AA3))
LocaleKeys.womensHealth.tr().toText16(weight: FontWeight.w600),
LocaleKeys.relatedToPeriodsOvulation.tr().toText12(fontWeight: FontWeight.w500, color: Color(0xFF8F9AA3))
],
),
),
@ -89,7 +91,7 @@ class _HealthCalculatorsPageState extends State<HealthCalculatorsPage> {
).paddingAll(16.w))
.onPress(() {
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Calculator".needTranslation,
label: LocaleKeys.selectCalculator.tr(),
message: "",
child: showCalculatorsItems(type: HealthCalculatorEnum.women),
onOkPressed: () {},
@ -111,8 +113,8 @@ class _HealthCalculatorsPageState extends State<HealthCalculatorsPage> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
"Blood Sugar".needTranslation.toText16(weight: FontWeight.w600),
"Track your glucose levels, understand trends, and get personalized insights for better health.".needTranslation.toText12(
LocaleKeys.bloodSugar.tr().toText16(weight: FontWeight.w600),
LocaleKeys.trackYourGlucoseLevels.tr().toText12(
fontWeight: FontWeight.w500,
color: Color(0xFF8F9AA3),
)
@ -145,9 +147,8 @@ class _HealthCalculatorsPageState extends State<HealthCalculatorsPage> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
"Blood Cholesterol".needTranslation.toText16(weight: FontWeight.w600),
"Monitor your cholesterol levels, track your LDL, HDL, and triglycerides. Get personalized recommendations for a healthy heart."
.needTranslation
LocaleKeys.bloodCholesterol.tr().toText16(weight: FontWeight.w600),
LocaleKeys.monitorCholesterolLevels.tr()
.toText12(fontWeight: FontWeight.w500, color: Color(0xFF8F9AA3))
],
),
@ -176,9 +177,8 @@ class _HealthCalculatorsPageState extends State<HealthCalculatorsPage> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
"Triglycerides Fat Blood".needTranslation.toText16(weight: FontWeight.w600),
"Manage triglycerides, a key blood fat. Understand levels, diet impacts, and heart health strategies."
.needTranslation
LocaleKeys.triglyceridesFatBlood.tr().toText16(weight: FontWeight.w600),
LocaleKeys.understandTriglyceridesImpact.tr()
.toText12(fontWeight: FontWeight.w500, color: Color(0xFF8F9AA3))
],
),
@ -230,17 +230,17 @@ class _HealthCalculatorsPageState extends State<HealthCalculatorsPage> {
}
final List<HealthComponentModel> generalHealthServices = [
HealthComponentModel(title: "BMI\nCalculator".needTranslation, icon: AppAssets.bmi, type: HealthCalculatorsTypeEnum.bmi, clinicID: 108, calculationID: null),
HealthComponentModel(title: "Calories\nCalculator".needTranslation, icon: AppAssets.calories, type: HealthCalculatorsTypeEnum.calories, clinicID: null, calculationID: 2),
HealthComponentModel(title: "BMR\nCalculator".needTranslation, icon: AppAssets.bmr, type: HealthCalculatorsTypeEnum.bmr, clinicID: null, calculationID: 3),
HealthComponentModel(title: "Ideal Body\nWeight".needTranslation, icon: AppAssets.ibw, type: HealthCalculatorsTypeEnum.idealBodyWeight, clinicID: null, calculationID: 4),
HealthComponentModel(title: "Body Fat\nCalculator".needTranslation, icon: AppAssets.ibw, type: HealthCalculatorsTypeEnum.bodyFat, clinicID: null, calculationID: 5),
HealthComponentModel(title: "Carbs\nProtein & Fat".needTranslation, icon: AppAssets.ibw, type: HealthCalculatorsTypeEnum.crabsProteinFat, clinicID: null, calculationID: 11),
HealthComponentModel(title: LocaleKeys.bmiCalculator.tr(), icon: AppAssets.bmi, type: HealthCalculatorsTypeEnum.bmi, clinicID: 108, calculationID: null),
HealthComponentModel(title: LocaleKeys.caloriesCalculator.tr(), icon: AppAssets.calories, type: HealthCalculatorsTypeEnum.calories, clinicID: null, calculationID: 2),
HealthComponentModel(title: LocaleKeys.bmrCalculator.tr(), icon: AppAssets.bmr, type: HealthCalculatorsTypeEnum.bmr, clinicID: null, calculationID: 3),
HealthComponentModel(title: LocaleKeys.idealBodyWeight.tr(), icon: AppAssets.ibw, type: HealthCalculatorsTypeEnum.idealBodyWeight, clinicID: null, calculationID: 4),
HealthComponentModel(title: LocaleKeys.bodyFatCalculator.tr(), icon: AppAssets.ibw, type: HealthCalculatorsTypeEnum.bodyFat, clinicID: null, calculationID: 5),
HealthComponentModel(title: LocaleKeys.carbsProteinFat.tr(), icon: AppAssets.ibw, type: HealthCalculatorsTypeEnum.crabsProteinFat, clinicID: null, calculationID: 11),
];
final List<HealthComponentModel> womenHealthServices = [
HealthComponentModel(title: "Ovulation\nPeriod".needTranslation, icon: AppAssets.locate_me, type: HealthCalculatorsTypeEnum.ovulation, clinicID: null, calculationID: 6 ),
HealthComponentModel(title: "Delivery\nDue Date".needTranslation, icon: AppAssets.activeCheck, type: HealthCalculatorsTypeEnum.deliveryDueDate, clinicID: null, calculationID: 6),
HealthComponentModel(title: LocaleKeys.ovulationPeriod.tr(), icon: AppAssets.locate_me, type: HealthCalculatorsTypeEnum.ovulation, clinicID: null, calculationID: 6 ),
HealthComponentModel(title: LocaleKeys.deliveryDueDate.tr(), icon: AppAssets.activeCheck, type: HealthCalculatorsTypeEnum.deliveryDueDate, clinicID: null, calculationID: 6),
];
}

@ -1,4 +1,6 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/health_calculators_and_converts/health_calculator_view_model.dart';
import 'package:provider/provider.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -92,7 +94,7 @@ class _BodyFatWidgetState extends State<BodyFatWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
"Select Gender".toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
LocaleKeys.selectGender.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
selectedGender.toText12(fontWeight: FontWeight.w500, color: AppColors.textColor),
],
),
@ -105,7 +107,7 @@ class _BodyFatWidgetState extends State<BodyFatWidget> {
).paddingSymmetrical(0.w, 16.w).onPress(() {
List<String> _genders = ["Male", "Female"];
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Gender".needTranslation,
label: LocaleKeys.selectGender.tr(context: context),
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
@ -215,7 +217,7 @@ class _BodyFatWidgetState extends State<BodyFatWidget> {
],
).onPress(() {
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Unit".needTranslation,
label: LocaleKeys.unit.tr(context: context),
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
@ -323,7 +325,7 @@ class _BodyFatWidgetState extends State<BodyFatWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
"Unit".toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
LocaleKeys.unit.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
selectedNeckUnit.toText12(fontWeight: FontWeight.w500, color: AppColors.textColor),
],
),
@ -332,7 +334,7 @@ class _BodyFatWidgetState extends State<BodyFatWidget> {
],
).onPress(() {
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Unit".needTranslation,
label: LocaleKeys.unit.tr(context: context),
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
@ -449,7 +451,7 @@ class _BodyFatWidgetState extends State<BodyFatWidget> {
],
).onPress(() {
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Unit".needTranslation,
label: LocaleKeys.unit.tr(context: context),
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
@ -557,7 +559,7 @@ class _BodyFatWidgetState extends State<BodyFatWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
"Unit".toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
LocaleKeys.unit.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
selectedHipUnit.toText12(fontWeight: FontWeight.w500, color: AppColors.textColor),
],
),
@ -566,7 +568,7 @@ class _BodyFatWidgetState extends State<BodyFatWidget> {
],
).onPress(() {
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Unit".needTranslation,
label: LocaleKeys.unit.tr(context: context),
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),

@ -1,3 +1,4 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
@ -10,6 +11,8 @@ 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/presentation/health_calculators_and_converts/health_calculator_view_model.dart';
import '../../../generated/locale_keys.g.dart';
class BMIWidget extends StatefulWidget {
Function(dynamic result)? onChange;
@ -116,7 +119,7 @@ class _BMIWidgetState extends State<BMIWidget> {
],
).onPress(() {
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Unit".needTranslation,
label: LocaleKeys.unit.tr(context: context),
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
@ -233,7 +236,7 @@ class _BMIWidgetState extends State<BMIWidget> {
],
).onPress(() {
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Unit".needTranslation,
label: LocaleKeys.unit.tr(context: context),
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),

@ -1,4 +1,6 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:provider/provider.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
@ -87,7 +89,7 @@ class _BMRWidgetState extends State<BMRWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
"Select Gender".toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
LocaleKeys.selectGender.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
selectedGender.toCamelCase.toText12(fontWeight: FontWeight.w500, color: AppColors.textColor),
],
),
@ -101,7 +103,7 @@ class _BMRWidgetState extends State<BMRWidget> {
List<String> _genders = ["Male", "Female"];
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Gender".needTranslation,
label: LocaleKeys.selectGender.tr(context: context),
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
@ -168,7 +170,7 @@ class _BMRWidgetState extends State<BMRWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
"Age (11-120) yrs".needTranslation.toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
"Age (11-120) yrs".toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
Container(
height: 20.w,
alignment: Alignment.centerLeft,
@ -240,7 +242,7 @@ class _BMRWidgetState extends State<BMRWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
"Unit".toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
LocaleKeys.unit.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
selectedHeightUnit.toText12(fontWeight: FontWeight.w500, color: AppColors.textColor),
],
),
@ -249,7 +251,7 @@ class _BMRWidgetState extends State<BMRWidget> {
],
).onPress(() {
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Unit".needTranslation,
label: LocaleKeys.unit.tr(context: context),
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
@ -367,7 +369,7 @@ class _BMRWidgetState extends State<BMRWidget> {
],
).onPress(() {
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Unit".needTranslation,
label: LocaleKeys.unit.tr(context: context),
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
@ -437,7 +439,7 @@ class _BMRWidgetState extends State<BMRWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
"Activity Level".needTranslation.toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
LocaleKeys.activityLevel.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
selectedActivityLevel.toText12(fontWeight: FontWeight.w500, color: AppColors.textColor),
],
),
@ -450,7 +452,7 @@ class _BMRWidgetState extends State<BMRWidget> {
).paddingSymmetrical(0.w, 16.w).onPress(() {
List<String> _activity = ["Almost Inactive (no exercise)", "Lightly active", "Lightly active (1-3) days per week", "Super active (very hard exercise)"];
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Activity Level".needTranslation,
label: LocaleKeys.selectActivityLevel.tr(context: context),
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),

@ -1,4 +1,6 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:provider/provider.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
@ -102,7 +104,7 @@ class _CaloriesWidgetState extends State<CaloriesWidget> {
List<String> _genders = ["Male", "Female"];
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Gender".needTranslation,
label: LocaleKeys.selectGender.tr(context: context),
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
@ -168,7 +170,7 @@ class _CaloriesWidgetState extends State<CaloriesWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
"Age (11-120) yrs".needTranslation.toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
"Age (11-120) yrs".toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
Container(
height: 20.w,
alignment: Alignment.centerLeft,
@ -249,7 +251,7 @@ class _CaloriesWidgetState extends State<CaloriesWidget> {
],
).onPress(() {
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Unit".needTranslation,
label: LocaleKeys.unit.tr(context: context),
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
@ -366,7 +368,7 @@ class _CaloriesWidgetState extends State<CaloriesWidget> {
],
).onPress(() {
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Unit".needTranslation,
label: LocaleKeys.unit.tr(context: context),
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
@ -436,7 +438,7 @@ class _CaloriesWidgetState extends State<CaloriesWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
"Activity Level".needTranslation.toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
LocaleKeys.activityLevel.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
selectedActivityLevel.toText12(fontWeight: FontWeight.w500, color: AppColors.textColor),
],
),
@ -449,7 +451,7 @@ class _CaloriesWidgetState extends State<CaloriesWidget> {
).paddingSymmetrical(0.w, 16.w).onPress(() {
List<String> _activity = ["Almost Inactive (no exercise)", "Lightly active", "Lightly active (1-3) days per week", "Super active (very hard exercise)"];
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Activity Level".needTranslation,
label: LocaleKeys.selectActivityLevel.tr(context: context),
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),

@ -1,4 +1,6 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:provider/provider.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
@ -68,7 +70,7 @@ class _CrabsWidgetState extends State<CrabsWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
"Calories Per Day".needTranslation.toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
LocaleKeys.caloriesPerDay.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
Container(
height: 20.w,
alignment: Alignment.centerLeft,
@ -111,7 +113,7 @@ class _CrabsWidgetState extends State<CrabsWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
"Diet Type".needTranslation.toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
LocaleKeys.dietType.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
selectedDietType.toText12(fontWeight: FontWeight.w500, color: AppColors.textColor),
],
),
@ -124,7 +126,7 @@ class _CrabsWidgetState extends State<CrabsWidget> {
).paddingSymmetrical(0.w, 16.w).onPress(() {
List<String> _activity = ["Very Low Crabs", "Low Crabs", "Moderate Crabs", "USDA Guidelines ", "Zone Diet"];
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Diet Type".needTranslation,
label: LocaleKeys.selectDietType.tr(context: context),
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),

@ -36,7 +36,7 @@ class _DeliveryDueDWidgetState extends State<DeliveryDueDWidget> {
children: [
TextInputWidget(
labelText: "Last Period Date",
hintText: "11 July, 1994".needTranslation,
hintText: "11 July, 1994",
controller: _date,
focusNode: FocusNode(),
isEnable: true,

@ -1,4 +1,6 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:provider/provider.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
@ -114,7 +116,7 @@ class _IdealBodyWeightWidgetState extends State<IdealBodyWeightWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
"Unit".toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
LocaleKeys.unit.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
selectedHeightUnit.toText12(fontWeight: FontWeight.w500, color: AppColors.textColor),
],
),
@ -123,7 +125,7 @@ class _IdealBodyWeightWidgetState extends State<IdealBodyWeightWidget> {
],
).onPress(() {
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Unit".needTranslation,
label: LocaleKeys.unit.tr(context: context),
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
@ -231,7 +233,7 @@ class _IdealBodyWeightWidgetState extends State<IdealBodyWeightWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
"Unit".toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
LocaleKeys.unit.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
selectedWeightUnit.toText12(fontWeight: FontWeight.w500, color: AppColors.textColor),
],
),
@ -240,7 +242,7 @@ class _IdealBodyWeightWidgetState extends State<IdealBodyWeightWidget> {
],
).onPress(() {
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Unit".needTranslation,
label: LocaleKeys.unit.tr(context: context),
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
@ -308,7 +310,7 @@ class _IdealBodyWeightWidgetState extends State<IdealBodyWeightWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
"Body Frame Size".needTranslation.toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
LocaleKeys.bodyFrameSize.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
selectedBodyFrameSize.toText12(fontWeight: FontWeight.w500, color: AppColors.textColor),
],
),
@ -321,7 +323,7 @@ class _IdealBodyWeightWidgetState extends State<IdealBodyWeightWidget> {
).paddingSymmetrical(0.w, 16.w).onPress(() {
List<String> _activity = ["Small (fingers overlaps)", "Medium (fingers touch)", "Large (fingers don't touch)"];
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Select Body Frame Size".needTranslation,
label: LocaleKeys.selectBodyFrameSize.tr(context: context),
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),

@ -1,4 +1,6 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:provider/provider.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/enums.dart';
@ -63,7 +65,7 @@ class _OvulationWidgetState extends State<OvulationWidget> {
children: [
TextInputWidget(
labelText: "Date",
hintText: "11 July, 1994".needTranslation,
hintText: "11 July, 1994",
controller: _ageController,
isEnable: true,
prefix: null,
@ -95,7 +97,7 @@ class _OvulationWidgetState extends State<OvulationWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
"Average Cycle Length (Usually 28 days)".needTranslation.toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
LocaleKeys.averageCycleLength.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
Container(
height: 20.w,
alignment: Alignment.centerLeft,
@ -132,7 +134,7 @@ class _OvulationWidgetState extends State<OvulationWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
"Average Luteal Phase Length(Usually 14 days)".needTranslation.toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
LocaleKeys.averageLutealPhase.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.inputLabelTextColor),
Container(
height: 20.w,
alignment: Alignment.centerLeft,

@ -1,5 +1,6 @@
import 'dart:developer';
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';
@ -8,6 +9,7 @@ import 'package:hmg_patient_app_new/core/enums.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/health_trackers/health_trackers_view_model.dart';
import 'package:hmg_patient_app_new/services/dialog_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
@ -55,11 +57,11 @@ class _AddHealthTrackerEntryPageState extends State<AddHealthTrackerEntryPage> {
String _getPageTitle() {
switch (widget.trackerType) {
case HealthTrackerTypeEnum.bloodSugar:
return "Add Blood Sugar".needTranslation;
return LocaleKeys.addBloodSugar.tr(context: context);
case HealthTrackerTypeEnum.bloodPressure:
return "Add Blood Pressure".needTranslation;
return LocaleKeys.addBloodPressure.tr(context: context);
case HealthTrackerTypeEnum.weightTracker:
return "Add Weight".needTranslation;
return LocaleKeys.addWeight.tr(context: context);
}
}
@ -67,11 +69,11 @@ class _AddHealthTrackerEntryPageState extends State<AddHealthTrackerEntryPage> {
String _getSuccessMessage() {
switch (widget.trackerType) {
case HealthTrackerTypeEnum.bloodSugar:
return "Blood Sugar Data saved successfully".needTranslation;
return LocaleKeys.bloodSugarDataSavedSuccessfully.tr(context: context);
case HealthTrackerTypeEnum.bloodPressure:
return "Blood Pressure Data saved successfully".needTranslation;
return LocaleKeys.bloodPressureDataSavedSuccessfully.tr(context: context);
case HealthTrackerTypeEnum.weightTracker:
return "Weight Data saved successfully".needTranslation;
return LocaleKeys.weightDataSavedSuccessfully.tr(context: context);
}
}
@ -92,7 +94,7 @@ class _AddHealthTrackerEntryPageState extends State<AddHealthTrackerEntryPage> {
// Save Blood Sugar entry
Future<void> _saveBloodSugarEntry(HealthTrackersViewModel viewModel) async {
LoaderBottomSheet.showLoader(loadingText: "Please wait".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.pleaseWait.tr(context: context));
// Combine date and time
final dateTime = "${dateController.text} ${timeController.text}";
@ -113,7 +115,7 @@ class _AddHealthTrackerEntryPageState extends State<AddHealthTrackerEntryPage> {
// Save Weight entry
Future<void> _saveWeightEntry(HealthTrackersViewModel viewModel) async {
LoaderBottomSheet.showLoader(loadingText: "Please wait".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.pleaseWait.tr(context: context));
// Combine date and time
final dateTime = "${dateController.text} ${timeController.text}";
@ -133,7 +135,7 @@ class _AddHealthTrackerEntryPageState extends State<AddHealthTrackerEntryPage> {
// Save Blood Pressure entry
Future<void> _saveBloodPressureEntry(HealthTrackersViewModel viewModel) async {
LoaderBottomSheet.showLoader(loadingText: "Please wait".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.pleaseWait.tr(context: context));
// Combine date and time
final dateTime = "${dateController.text} ${timeController.text}";
@ -204,7 +206,7 @@ class _AddHealthTrackerEntryPageState extends State<AddHealthTrackerEntryPage> {
bool useUpperCase = false,
}) {
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: title.needTranslation,
label: title,
message: "",
child: Container(
constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.7),
@ -237,7 +239,7 @@ class _AddHealthTrackerEntryPageState extends State<AddHealthTrackerEntryPage> {
FocusScope.of(context).unfocus();
_showSelectionBottomSheet(
context: context,
title: "Select Unit".needTranslation,
title: LocaleKeys.selectUnit.tr(context: context),
items: viewModel.bloodSugarUnit,
selectedValue: viewModel.selectedBloodSugarUnit,
onSelected: viewModel.setBloodSugarUnit,
@ -250,7 +252,7 @@ class _AddHealthTrackerEntryPageState extends State<AddHealthTrackerEntryPage> {
FocusScope.of(context).unfocus();
_showSelectionBottomSheet(
context: context,
title: "Select Measure Time".needTranslation,
title: LocaleKeys.selectMeasureTime.tr(context: context),
items: viewModel.bloodSugarMeasureTimeEnList,
selectedValue: viewModel.selectedBloodSugarMeasureTime,
onSelected: viewModel.setBloodSugarMeasureTime,
@ -263,7 +265,7 @@ class _AddHealthTrackerEntryPageState extends State<AddHealthTrackerEntryPage> {
FocusScope.of(context).unfocus();
_showSelectionBottomSheet(
context: context,
title: "Select Unit".needTranslation,
title: LocaleKeys.selectUnit.tr(context: context),
items: viewModel.weightUnits,
selectedValue: viewModel.selectedWeightUnit,
onSelected: viewModel.setWeightUnit,
@ -276,7 +278,7 @@ class _AddHealthTrackerEntryPageState extends State<AddHealthTrackerEntryPage> {
FocusScope.of(context).unfocus();
_showSelectionBottomSheet(
context: context,
title: "Select Arm".needTranslation,
title: LocaleKeys.selectArm.tr(context: context),
items: viewModel.measuredArmList,
selectedValue: viewModel.selectedMeasuredArm,
onSelected: viewModel.setMeasuredArm,
@ -404,7 +406,7 @@ class _AddHealthTrackerEntryPageState extends State<AddHealthTrackerEntryPage> {
children: [
_buildSettingsRow(
icon: AppAssets.heightIcon,
label: "Enter Blood Sugar".needTranslation,
label: LocaleKeys.enterBloodSugar.tr(context: context),
inputField: _buildTextField(viewModel.bloodSugarController, '', keyboardType: TextInputType.number),
unit: viewModel.selectedBloodSugarUnit,
onUnitTap: () => _showBloodSugarUnitSelectionBottomSheet(context, viewModel),
@ -413,7 +415,7 @@ class _AddHealthTrackerEntryPageState extends State<AddHealthTrackerEntryPage> {
Divider(height: 1, color: AppColors.dividerColor),
_buildSettingsRow(
icon: AppAssets.weight_tracker_icon,
label: "Select Measure Time".needTranslation,
label: LocaleKeys.selectMeasureTime.tr(context: context),
value: viewModel.selectedBloodSugarMeasureTime,
onRowTap: () => _showBloodSugarEntryTimeBottomSheet(context, viewModel),
),
@ -428,19 +430,19 @@ class _AddHealthTrackerEntryPageState extends State<AddHealthTrackerEntryPage> {
_buildSettingsRow(
icon: AppAssets.bloodPressureIcon,
iconColor: AppColors.greyTextColor,
label: "Enter Systolic Value".needTranslation,
label: LocaleKeys.enterSystolicValue.tr(context: context),
inputField: _buildTextField(viewModel.systolicController, '', keyboardType: TextInputType.number),
),
_buildSettingsRow(
icon: AppAssets.bloodPressureIcon,
iconColor: AppColors.greyTextColor,
label: "Enter Diastolic Value".needTranslation,
label: LocaleKeys.enterDiastolicValue.tr(context: context),
inputField: _buildTextField(viewModel.diastolicController, '', keyboardType: TextInputType.number),
),
_buildSettingsRow(
icon: AppAssets.bodyIcon,
iconColor: AppColors.greyTextColor,
label: "Select Arm".needTranslation,
label: LocaleKeys.selectArm.tr(context: context),
value: viewModel.selectedMeasuredArm,
onRowTap: () => _showMeasuredArmSelectionBottomSheet(context, viewModel),
),
@ -455,7 +457,7 @@ class _AddHealthTrackerEntryPageState extends State<AddHealthTrackerEntryPage> {
children: [
_buildSettingsRow(
icon: AppAssets.weightScale,
label: "Enter Weight".needTranslation,
label: LocaleKeys.enterWeight.tr(context: context),
inputField: _buildTextField(viewModel.weightController, '', keyboardType: TextInputType.number),
unit: viewModel.selectedWeightUnit,
onUnitTap: () => _showWeightUnitSelectionBottomSheet(context, viewModel),
@ -474,7 +476,7 @@ class _AddHealthTrackerEntryPageState extends State<AddHealthTrackerEntryPage> {
isReadOnly: true,
isArrowTrailing: true,
labelText: "Date",
hintText: "Select date".needTranslation,
hintText: LocaleKeys.pickADate.tr(context: context),
focusNode: FocusNode(),
isEnable: true,
prefix: null,
@ -504,7 +506,7 @@ class _AddHealthTrackerEntryPageState extends State<AddHealthTrackerEntryPage> {
isReadOnly: true,
isArrowTrailing: true,
labelText: "Time",
hintText: "Select time".needTranslation,
hintText: LocaleKeys.selectMeasureTime.tr(context: context),
focusNode: FocusNode(),
isEnable: true,
prefix: null,
@ -547,7 +549,7 @@ class _AddHealthTrackerEntryPageState extends State<AddHealthTrackerEntryPage> {
child: Padding(
padding: EdgeInsets.all(24.w),
child: CustomButton(
text: "Save".needTranslation,
text: LocaleKeys.save.tr(context: context),
onPressed: () async => await _saveEntry(viewModel),
borderRadius: 12.r,
padding: EdgeInsets.symmetric(vertical: 14.h),

@ -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';
@ -14,6 +15,7 @@ import 'package:hmg_patient_app_new/features/health_trackers/models/blood_sugar/
import 'package:hmg_patient_app_new/features/health_trackers/models/blood_sugar/year_diabetic_result_average.dart';
import 'package:hmg_patient_app_new/features/health_trackers/models/weight/week_weight_measurement_result_average.dart';
import 'package:hmg_patient_app_new/features/health_trackers/models/weight/year_weight_measurement_result_average.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/health_trackers/health_trackers_view_model.dart';
import 'package:hmg_patient_app_new/presentation/health_trackers/widgets/tracker_last_value_card.dart';
import 'package:hmg_patient_app_new/services/dialog_service.dart';
@ -67,11 +69,11 @@ class _HealthTrackerDetailPageState extends State<HealthTrackerDetailPage> {
String _getPageTitle() {
switch (widget.trackerType) {
case HealthTrackerTypeEnum.bloodSugar:
return "Blood Sugar".needTranslation;
return LocaleKeys.bloodSugar.tr(context: context);
case HealthTrackerTypeEnum.bloodPressure:
return "Blood Pressure".needTranslation;
return LocaleKeys.bloodPressure.tr(context: context);
case HealthTrackerTypeEnum.weightTracker:
return "Weight".needTranslation;
return LocaleKeys.weight.tr(context: context);
}
}
@ -153,7 +155,7 @@ class _HealthTrackerDetailPageState extends State<HealthTrackerDetailPage> {
final dialogService = getIt.get<DialogService>();
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: title.needTranslation,
label: title,
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
@ -183,7 +185,7 @@ class _HealthTrackerDetailPageState extends State<HealthTrackerDetailPage> {
void _showHistoryDurationBottomsheet(BuildContext context, HealthTrackersViewModel viewModel) {
_showSelectionBottomSheet(
context: context,
title: "Select Duration".needTranslation,
title: LocaleKeys.selectDuration.tr(),
items: viewModel.durationFilters,
selectedValue: viewModel.selectedDurationFilter,
onSelected: viewModel.setFilterDuration,
@ -286,7 +288,7 @@ class _HealthTrackerDetailPageState extends State<HealthTrackerDetailPage> {
children: [
Row(
children: [
"History".needTranslation.toText16(isBold: true),
LocaleKeys.history.tr(context: context).toText16(isBold: true),
if (viewModel.isGraphView) ...[
SizedBox(width: 12.w),
InkWell(
@ -661,9 +663,9 @@ class _HealthTrackerDetailPageState extends State<HealthTrackerDetailPage> {
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
_buildLegendItem(AppColors.errorColor, "Systolic".needTranslation),
_buildLegendItem(AppColors.errorColor, LocaleKeys.systolic.tr()),
SizedBox(width: 24.w),
_buildLegendItem(AppColors.blueColor, "Diastolic".needTranslation),
_buildLegendItem(AppColors.blueColor, LocaleKeys.diastolic.tr()),
],
),
SizedBox(height: 12.h),
@ -1046,7 +1048,7 @@ class _HealthTrackerDetailPageState extends State<HealthTrackerDetailPage> {
final emailController = TextEditingController(text: userEmail);
dialogService.showFamilyBottomSheetWithoutHWithChild(
label: "Send Report by Email".needTranslation,
label: LocaleKeys.sendReportByEmail.tr(),
message: "",
child: _buildEmailInputContent(
context: context,
@ -1068,7 +1070,7 @@ class _HealthTrackerDetailPageState extends State<HealthTrackerDetailPage> {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
"Enter your email address to receive the report".needTranslation.toText14(
LocaleKeys.enterYourEmailToReceiveReport.tr().toText14(
color: AppColors.textColor,
weight: FontWeight.w400,
),
@ -1077,8 +1079,8 @@ class _HealthTrackerDetailPageState extends State<HealthTrackerDetailPage> {
// Email Input Field using TextInputWidget
TextInputWidget(
padding: EdgeInsets.symmetric(horizontal: 8.w),
labelText: "Email Address".needTranslation,
hintText: "Enter email address".needTranslation,
labelText: LocaleKeys.email.tr(context: context),
hintText: LocaleKeys.enterEmail.tr(context: context),
controller: emailController,
keyboardType: TextInputType.emailAddress,
isEnable: true,
@ -1094,7 +1096,7 @@ class _HealthTrackerDetailPageState extends State<HealthTrackerDetailPage> {
Expanded(
child: CustomButton(
height: 56.h,
text: "Send Report".needTranslation,
text: LocaleKeys.send.tr(context: context),
onPressed: () {
_sendEmailReport(
context: context,
@ -1122,7 +1124,7 @@ class _HealthTrackerDetailPageState extends State<HealthTrackerDetailPage> {
// Validate email
if (email.isEmpty) {
dialogService.showErrorBottomSheet(
message: "Please enter your email address".needTranslation,
message: LocaleKeys.enterEmail.tr(context: context),
);
return;
}
@ -1131,7 +1133,7 @@ class _HealthTrackerDetailPageState extends State<HealthTrackerDetailPage> {
final emailRegex = RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$');
if (!emailRegex.hasMatch(email)) {
dialogService.showErrorBottomSheet(
message: "Please enter a valid email address".needTranslation,
message: LocaleKeys.pleaseEnterAValidEmail.tr(context: context),
);
return;
}
@ -1142,7 +1144,7 @@ class _HealthTrackerDetailPageState extends State<HealthTrackerDetailPage> {
// Call appropriate email function based on tracker type
switch (widget.trackerType) {
case HealthTrackerTypeEnum.bloodSugar:
LoaderBottomSheet.showLoader(loadingText: "Please wait".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.pleaseWait.tr(context: context));
await viewModel.sendBloodSugarReportByEmail(
email: email,
onSuccess: () {
@ -1158,7 +1160,7 @@ class _HealthTrackerDetailPageState extends State<HealthTrackerDetailPage> {
break;
case HealthTrackerTypeEnum.bloodPressure:
LoaderBottomSheet.showLoader(loadingText: "Please wait".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.pleaseWait.tr(context: context));
await viewModel.sendBloodPressureReportByEmail(
email: email,
@ -1176,7 +1178,7 @@ class _HealthTrackerDetailPageState extends State<HealthTrackerDetailPage> {
break;
case HealthTrackerTypeEnum.weightTracker:
LoaderBottomSheet.showLoader(loadingText: "Please wait".needTranslation);
LoaderBottomSheet.showLoader(loadingText: LocaleKeys.pleaseWait.tr(context: context));
await viewModel.sendWeightReportByEmail(
email: email,
onSuccess: () {
@ -1199,7 +1201,7 @@ class _HealthTrackerDetailPageState extends State<HealthTrackerDetailPage> {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getSuccessWidget(
loadingText: "Report has been sent to your email successfully".needTranslation,
loadingText: LocaleKeys.emailSentSuccessfully.tr(context: context),
),
callBackFunc: () {},
isCloseButtonVisible: false,
@ -1261,7 +1263,7 @@ class _HealthTrackerDetailPageState extends State<HealthTrackerDetailPage> {
child: Padding(
padding: EdgeInsets.all(24.w),
child: CustomButton(
text: "Add new Record".needTranslation,
text: LocaleKeys.addNewRecord.tr(),
onPressed: () {
if (!viewModel.isLoading) {
context.navigateWithName(AppRoutes.addHealthTrackerEntryPage, arguments: widget.trackerType);

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

Loading…
Cancel
Save