From 04d14a4d8290970039d7fb5be26cbf1cbe5957f6 Mon Sep 17 00:00:00 2001 From: tahaalam Date: Mon, 13 Apr 2026 16:41:50 +0300 Subject: [PATCH 1/3] langauge regarding changes --- assets/langs/ar-SA.json | 96 ++++++++++--------- assets/langs/en-US.json | 10 +- lib/core/enums.dart | 10 +- lib/generated/codegen_loader.g.dart | 14 +-- lib/generated/locale_keys.g.dart | 6 +- .../book_appointment_page.dart | 2 +- .../widgets/bmi.dart | 61 ++++++++---- .../home/data/landing_page_data.dart | 20 ++-- .../prescription_detail_page.dart | 2 +- .../symptoms_checker/user_info_selection.dart | 6 +- 10 files changed, 132 insertions(+), 95 deletions(-) diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json index 5df2dcbd..76481987 100644 --- a/assets/langs/ar-SA.json +++ b/assets/langs/ar-SA.json @@ -81,7 +81,7 @@ "upcomingNoAction": "لا يتطلب أي إجراء", "upcomingConfirm": "يرجى تأكيد الموعد لتجنب الإلغاء", "bookSuccessConfirmMore2412": "ستكون عملية الدفع عبر الإنترنت متاحة قبل 24 ساعة ��ن الموعد.", - "upcomingPaymentPending": "سيتم تفعيل الدفع عبر الإنترنت قبل 24 ساعة من موعد الموعد", + "upcomingPaymentPending": "سيتم تفعيل الدفع عبر الإنترنت قبل 24 ساعة من وقت الموعد", "upcomingPaymentNow": "ادفع عبر الإنترنت الآن لتجنب الانتظار الطويل", "timeUntilAppointment": "الوقت المتبقي حتى الموعد", "appointmentTimePassed": "انتهى وقت الموعد", @@ -100,7 +100,7 @@ "onlinePayment": "عبر الإنترنت", "onlinePaymentSubtitle": "الدفع", "cancelNocaps": "إلغاء", - "setReminder": "ضبط تذكير", + "setReminder": "تذكير", "nationalIdNumber": "رقم الهوية الوطنية", "medicalFileNumber": "رقم الملف الطبي", "loginregister": "تسجيل الدخول / التسجيل", @@ -178,7 +178,7 @@ "arrived": " تم الوصول", "payNowBookSuccess": "ادفع الآن عبر تطبيق الحبيب", "payNowBookSuccesstext1": "ادفع الآن باستخدام خدمة الدفع عبر الإنترنت من بوابات الدفع الآمنة", - "payNowBookSuccesstext2": "يمكنك أيضًا الدفع لاحقًا عبر الدفع الإلكتروني أو في المستشفى.", + "payNowBookSuccesstext2": "يمكنك أيضًا الدفع لاحقًا عبر الدفع الإلكت§روني أو في المستشفى.", "payLater": "ادفع لاحقًا", "askDocNotAllowed": "هذه الخدمة ستكون متاحة فقط لزيارة الطبيب قبل 15 يومًا", "moreVerify": "خيارات تحقق إضافية", @@ -271,6 +271,7 @@ "userViewRequester": "يريد المستخدم عرض ملفك الطبي", "userView": "يمكن للمستخدم عرض ملفك الطبي", "parking": "موقف السيارات", + "parking2": " المواقف", "alhabiServices": "خدمة HMG", "parkingTitle": "خدمة السيارة، خدمة السيارة، خدمة لحفظ معلومات الموقف، العودة إليها لاحقًا، 1- من خلال النقر على (قراءة الرمز)، حفظ بيانات الموقف. 2- من خلال النقر على زر (عرض موقف سيارتي)، يظهر لك موقع السيارة في خرائط Google. 3- قراءة موضع آخر بالضغط على زر مسح بيانات الموضع.", "parkingDescription": "خدمة المواقف هي لك لمسح موقع السيارة حتى تتمكن من العثور عليها بسهولة عند مغادرتك. انقر على زر (مسح الموقف) لحفظ موقع الموقف، ثم سيظهر زر (عرض موقفي) لإظهار الطريق إلى الموقف. إذا كنت ترغب في إعادة مسح موقف السيارة QR فقط انقر على (مسح بياناتي).", @@ -693,8 +694,8 @@ "duration": "المدة", "cm": "سم", "ft": "قدم", - "kg": "كجم", - "lb": "رطل", + "kg": "كغ", + "lb": "باوند", "birthDate": "تاريخ الميلاد", "dateOfBirth": "تاريخ الميلاد", "mass": "الكتلة", @@ -767,7 +768,7 @@ "infoTodo": "تم تصميم هذه الخدمة لتمكينك من الحصول على رابط سريع لقائمة المهام التي تحتاج القيام بها", "familyInfo": "من خلال هذه الخدمة، ستتمكن من ربط ملفات عائلتك الطبية بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي.", "rrtdDetails": "تقدم فريق الاستجابة السريعة خدمة طبية شاملة لجميع أنواع الحالات العاجلة والمستقرة من جميع الأعمار، بما في ذلك البالغين والمرضى الأطفال، وتغطي الخدمة فريق طبي مدرب تدريبًا عاليًا ومجهز تجهيزًا كاملاً قادرًا على تقديم أفضل رعاية طبية في منزل المريض.", - "homeHealthCareText": "تقدم هذه الخدمة مجموعة من خدمات الرعاية الصحية المنزلية، والمتابعة المستمرة والشاملة في أماكن إقامتهم لأولئك الذين لا يمكنهم الوصول إلى المرافق الصحية، مثل (تحليلات المختبر - الأشعة - التطعيمات - العلاج الطبيعي)، إلخ.", + "homeHealthCareText": "تقدم هذه الخدمة مجموعة من خدمات الرعاية الصحية المنزلية.", "onlineCheckInAgreement": "تسجيل الوصول عبر الإنترنت مخصص للحالات التي لا تهدد الحياة. اتصل بالهلال الأحمر (997) أو اذهب إلى أقرب قسم طوارئ إذا كان هناك: \n\nعلامات السكتة الدماغية أو النوبة القلبية \nhالة من النوبات أو الإغماء \nهناك إصابة تهدد الطرف أو الحياة \nصورة لإصابات خطيرة", "infoEreferral": "تتيح لك هذه الخدمة تقديم طلب إحالة من أي مقدم رعاية صحية سواء داخل أو خارج المملكة العربية السعودية إلى أي من مستشفيات HMG، عن طريق ملء بعض بيانات المريض وإرفاق التقارير الطبية، علاوة على ذلك يمكنك تتبع حالة الطلب (قيد المعالجة، مقبول أو مرفوض)", "erConsultation": "تتيح لك هذه الخدمة إجراء استشارة افتراضية عبر الإنترنت عبر مكالمة فيديو مباشرة مع الطبيب من أي مكان وفي أي وقت.", @@ -819,8 +820,8 @@ "loginNow": "تسجيل الدخول الآن", "notice": "إشعار", "oR": "أو", - "sendOTPWHATSAPP": "أرسل لي OTP عبر واتساب", - "sendOTPSMS": "أرسل لي OTP عبر الرسائل القصيرة", + "sendOTPWHATSAPP": "واتساب", + "sendOTPSMS": "االرسائل النصية", "fullName": "الاسم الكامل", "married": "متزوج", "uae": "الإمارات العربية المتحدة", @@ -836,10 +837,10 @@ "notNow": "ليس الآن", "pendingActivation": "في انتظار التنشيط", "awaitingApproval": "انتظر القبول", - "news": "أخبار", + "news": "الأخبار", "ready": "جاهز", "enterValidNationalId": "رقم الهوية أو رقم الملف غير صحيح", - "enterValidPhoneNumber": "الرجاء إدخال رقم هاتف صالح", + "enterValidPhoneNumber": "الرجاء ادخال رقم الهاتف", "cannotEnterSaudiOrUAENumber": "لا يمكنك إدخال أرقام هواتف السعودية (00966) أو الإمارات (00971) عند اختيار دولة 'أخرى'", "medicalCentersWithCount": "{count} مراكز طبية", "medicalCenters": "مراكز طبية", @@ -880,13 +881,13 @@ "onboardingBody1": "ببضع نقرات فقط يمكنك استشارة الطبيب الذي تختاره.", "onboardingHeading2": "الوصول إلى السجل الطبي بين يديك", "onboardingBody2": "تتبع تاريخك الطبي بما في ذلك الفحوصات المخبرية، الوصفات الطبية، التأمين، وغيرها.", - "hmgHospitals": "مستشفيات الحبيب", - "hmcMedicalClinic": "مراكز مجموعة الحبيب الطبية", - "applyFilter": "تطبيق الفلتر", + "hmgHospitals": "المستشفيات", + "hmcMedicalClinic": "المراكز الطبية", + "applyFilter": "تطبيق", "facilityAndLocation": "المرفق والموقع", "regionAndLocation": "المنطقة والمواقع", - "clearAllFilters": "مسح جميع الفلاتر", - "filters": "فلاتر", + "clearAllFilters": "اعادة تعيين", + "filters": "التخصيص", "searchClinic": "بحث عن عيادة", "normal": "عادي", "attention": "انتباه", @@ -908,8 +909,8 @@ "notConfirmed": "غير مؤكد", "appointmentStatus": "حالة الموعد", "doctorWillCallYou": "سيتصل بك الطبيب عندما يقترب موعدك.", - "getDirections": "الحصول على الاتجاهات", - "notifyMeBeforeAppointment": "أبلغني قبل الموعد", + "getDirections": "الاتجاهات", + "notifyMeBeforeAppointment": "تنبيه قبل الموعد", "fetchingLabResults": "جاري جلب نتائج المختبر...", "fetchingRadiologyResults": "جاري جلب نتائج الأشعة...", "fetchingAppointmentPrescriptions": "جاري جلب وصفات الموعد...", @@ -924,14 +925,14 @@ "checkingPaymentStatusPleaseWait": "جاري التحقق من حالة الدفع، يرجى الانتظار...", "paymentFailedPleaseTryAgain": "فشل الدفع! يرجى المحاولة مرة أخرى.", "appointmentCheckIn": "تسجيل حضور الموعد", - "insuranceExpiredOrInactive": "التأمين منتهي الصلاحية أو غير نشط", + "insuranceExpiredOrInactive": "التأمين غير ساري (منتهي او غير مفعل)", "totalAmountToPay": "المبلغ الإجمالي المستحق", "vat15": "ضريبة القيمة المضافة 15%", "general": "عام", "liveCare": "لايف كير", "recentVisits": "الزيارات الأخيرة", "favouriteDoctors": "الأطباء المفضلون", - "searchByClinic": "البحث حسب العيادة", + "searchByClinic": "العيادة", "tapToSelectClinic": "انقر لاختيار العيادة", "searchByDoctor": "البحث حسب الطبيب", "tapToSelect": "انقر للاختيار", @@ -1164,11 +1165,11 @@ "averageLutealPhase": "متوسط طول المرحلة الأصفرية (عادةً 14 يومًا)", "convert": "يتحول", "calculate": "احسب", - "healthCalculators": "حاسبات الصحة", - "healthConverters": "محولات الصحة", + "healthCalculators": "الحاسبات الصحية", + "healthConverters": "محول الوحدات الصحية", "generalHealth": "الصحة العامة", "relatedToBMICalories": "متعلق بمؤشر كتلة الجسم والسعرات الحرارية ودهون الجسم وما إلى ذلك للبقاء على اطلاع دائم بصحتك.", - "selectCalculator": "اختر الآلة الحاسبة", + "selectCalculator": "اختر الحاسبة", "womensHealth": "صحة المرأة", "relatedToPeriodsOvulation": "متعلق بالدورة الشهرية والإباضة والحمل ومواضيع أخرى.", "bloodSugar": "سكر الدم", @@ -1177,11 +1178,11 @@ "monitorCholesterolLevels": "راقب مستويات الكوليسترول، وقيّم مخاطر صحة القلب، واتخذ خطوات استباقية للرفاهية.", "triglyceridesFatBlood": "الدهون الثلاثية في الدم", "understandTriglyceridesImpact": "افهم تأثير الدهون الثلاثية على صحة القلب مع رؤى مخصصة وتوصيات الخبراء.", - "bmiCalculator": "حاسبة\nمؤشر كتلة الجسم", - "caloriesCalculator": "حاسبة\nالسعرات الحرارية", - "bmrCalculator": "حاسبة\nمعدل الأيض الأساسي", - "idealBodyWeight": "الوزن المثالي\nللجسم", - "bodyFatCalculator": "حاسبة\nدهون الجسم", + "bmiCalculator": "مؤشر\nكتلة الجسم", + "caloriesCalculator": "السعرات \nالحرارية", + "bmrCalculator": "معدل \nالايض", + "idealBodyWeight": "الوزن\n المثالي", + "bodyFatCalculator": "دهون\n الجسم", "carbsProteinFat": "الكربوهيدرات\nالبروتين والدهون", "ovulationPeriod": "فترة\nالإباضة", "deliveryDueDate": "تاريخ الولادة\nالمتوقع", @@ -1218,15 +1219,15 @@ "bookAppointment": "حجز\nموعد", "completeCheckup": "الفحص الشامل", "indoorNavigation": "الملاحة الداخلية", - "eReferralServices": "خدمات الإحالة الإلكترونية", + "eReferralServices": "الاحالة", "bloodDonation": "التبرع بالدم", "dailyWaterMonitor": "مراقب الماء اليومي", "fetchingYourWaterIntakeDetails": "جاري جلب تفاصيل استهلاك الماء الخاص بك.", "healthCalculatorsServices": "حاسبات\nالصحة", "healthConvertersServices": "محولات\nالصحة", "smartWatchesServices": "الساعات\nالذكية", - "exploreServices": "استكشف الخدمات", - "medicalAndCareServices": "الخدمات الطبية والرعاية", + "exploreServices": "قائمة الخدمات او الخدمات", + "medicalAndCareServices": "خدمات الرعاية الطبية", "hmgServices": "خدمات مجموعة الحبيب الطبية", "personalServices": "الخدمات الشخصية", "habibWallet": "محفظة الحبيب", @@ -1236,7 +1237,7 @@ "addMember": "إضافة عضو", "addFamilyMember": "إضافة فرد من العائلة", "pleaseFillBelowFieldToAddNewFamilyMember": "يرجى ملء الحقل أدناه لإضافة فرد جديد من العائلة إلى ملفك الشخصي", - "healthTools": "أدوات الصحة", + "healthTools": "الادوات الصحية", "supportServices": "خدمات الدعم", "virtualTour": "جولة افتراضية", "carParking": "موقف السيارات", @@ -1260,9 +1261,9 @@ "invalidWeight": "الوزن غير صالح", "timeToDrinkWater": "حان وقت شرب الماء! 💧", "stayHydratedDrinkWater": "ابق رطبًا! اشرب {amount} مل من الماء.", - "visitPharmacyOnline": "زيارة الصيدلية على الانترنت", + "visitPharmacyOnline": "زيارة الصيدلية", "howAreYouFeelingToday": "كيف حالك اليوم؟", - "checkYourSymptomsWithScale": "تحقق من أعراضك باستخدام ذا المقياس", + "checkYourSymptomsWithScale": "تحقق من حالتك الصحية", "checkYourSymptoms": "تحقق من أعراضك", "noUpcomingAppointmentPleaseBook": "ليس لديك أي مواعيد قادمة. يرجى حجز موعد", "youHaveEROnlineCheckInRequest": "لديك طلب تسجيل وصول عبر الإنترنت للطوارئ", @@ -1387,9 +1388,9 @@ "previous": "سابق", "selectedOrgans": "الهيئات المختارة", "noOrgansSelected": "لم يتم تحديد أي أعضاء بعد", - "organSelector": "محدد الأعضاء", + "organSelector": "اين تشعر بالالم", "noPredictionsAvailable": "لا توجد تنبؤات متاحة", - "areYouSureYouWantToRestartOrganSelection": "هل أنت متأكد أنك تريد إعادة تشغيل اختيار الأعضاء؟", + "areYouSureYouWantToRestartOrganSelection": "هل تريد الخروج؟", "possibleConditions": "الحالات المحتملة", "pleaseSelectAtLeastOneRiskBeforeProceeding": "يرجى اختيار عامل خطر واحد على الأقل قبل المتابعة", "aboveYouSeeCommonRiskFactors": "أعلاه ترى عوامل الخطر الأكثر شيوعًا. على الرغم من أن /diagnosis قد تعيد أسئلة حول عوامل الخطر، ", @@ -1431,7 +1432,7 @@ "symptomsChecker": "فاحص الأعراض", "helloIsYourInformationUpToDate": "مرحباً {name}، هل معلوماتك محدثة؟", "noEditAll": "لا، تعديل الكل", - "yesItIs": "نعم، إنها كذلك", + "yesItIs": "نعم", "age": "العمر", "youDontHaveAnyAncillaryOrdersYet": "ليس لديك أي طلبات مساعدة بعد.", "invoiceWithNumber": "الفاتورة: {invoiceNo}", @@ -1539,12 +1540,12 @@ "pleaseVisitRoomForVitalSigns": "يرجى زيارة الغرفة {roomNumber} لقياس العلامات الحيوية", "pleaseVisitRoomToTheDoctor": "يرجى زيارة الغرفة {roomNumber} لمقابلة الطبيب", "erOnlineCheckInRequest": "طلب تسجيل الوصول عبر الإنترنت لقسم الطوارئ", - "indoor": "داخلي", - "navigation": "الملاحة", - "health": "الصحة", + "indoor": "خريطة", + "thehospital": "المستشفى", + "health": " الصحية", "calculators": "الحاسبات", - "converters": "المحولات", - "guide": "الدليل", + "converters": "محول الوحدات", + "guide": "دليل", "liveCareServiceDesc": "احصل على استشارة طبية من طبيب متخصص عبر مكالمة فيديو", "bloodGroup": "فصيلة الدم: {bloodType}", "medicalServices": "الخدمات الطبية", @@ -1632,13 +1633,13 @@ "featureComingSoonDescription": "هذه الميزة ستتوفر قريباً. نحن نعمل جاهدين لإضافة ميزات أكثر تميزاً إلى التطبيق. انتظرونا لمتابعة التحديثات.", "generateAiAnalysisResult": "قم بإجراء تحليل لهذا المختبر AI", "ratings": "التقييمات", - "hmgPharmacyText": "صيدلية الحبيب، المتجر الصيدلاني الإلكتروني المتكامل الذي تقدمه لكم مجموعة خدمات الدكتور سليمان الحبيب الطبية.", + "hmgPharmacyText": "المتجر الالكتروني او تسوق من الصيدلية بسهوله", "insuranceRequestSubmittedSuccessfully": "تم إرسال طلب تحديث بيانات التأمين بنجاح. سيتم إعلامك بمجرد الانتهاء.", "updatingEmailAddress": "جارٍ تحديث عنوان البريد الإلكتروني، يرجى الانتظار...", "verifyInsurance": "التحقق من التأمين", "tests": "تحليل", "calendarPermissionAlert": "يرجى منح إذن الوصول إلى التقويم من إعدادات التطبيق لضبط تذكير تناول الدواء.", - "sortByNearestLocation": "فرز حسب الأقرب إلى موقعك", + "sortByNearestLocation": "حسب الأقرب الى موقعك", "giveLocationPermissionForNearestList": "يرجى منح إذن الوصول إلى الموقع من إعدادات التطبيق لعرض أقرب المواقع.", "sortByLocation": "الترتيب حسب الموقع", "timeForFirstReminder": "وقت التذكير الأول", @@ -1662,7 +1663,7 @@ "emergencyServiceHeader": "تسجيل الوصول إلى قسم الطوارئ، أسرع من أي وقت مضى. اتصل بالإسعاف / فريق الاستجابة السريعة على الفور", "emergencyServiceDescription": "هل تواجه حالة طبية طارئة؟ سيارات الإسعاف وفرق الاستجابة السريعة لدينا جاهزة على مدار الساعة. بالإضافة إلى ذلك، يمكنك تسجيل دخولك إلى قسم الطوارئ بسرعة لتلقي رعاية أسرع.", "homeHealthCareServiceHeader": "صحتك، في أبهى صورها. رعاية فائقة الجودة، تصلك إلى عتبة دارك.", - "homeHealthCareServiceDescription": "نقدم لكم رعاية صحية عالية الجودة تصلكم إلى عتبة منزلكم. ممرضات ذوات خبرة يقدمون رعاية حانية في راحة منزلكم.", + "homeHealthCareServiceDescription": "نقدم لكم رعاية صحية عالية الجودة تصلكم إلى عتبة منزلكم. ممرضات ذوات خبرةممرضات ذوات خبرة يقدمون لكم الرعاية اللازمة.", "profileOnlyText": "الملف الشخصي", "information": "معلومة", "noFavouriteDoctors": "ليس لديك أي قائمة مفضلة حتى الآن", @@ -1670,7 +1671,7 @@ "favouriteList": "قائمة المفضلة", "later": "لاحقاً", "cancelAppointmentConfirmMessage": "هل أنت متأكد من رغبتك في إلغاء هذا الموعد؟", - "acknowledged": "معترف به", + "acknowledged": "حسنا", "searchLabResults": "بحث نتائج المختبر", "callForAssistance": "اتصل للحصول على المساعدة الفورية", "oneWaySubtitle": "نقل من الموقع إلى المستشفى", @@ -1732,5 +1733,8 @@ "aiDisclaimerRad": "سيتم مشاركة بيانات نتائج الأشعة الخاصة بك بشكل آمن مع محلل الذكاء الاصطناعي لدينا لتحليلها. يساعد هذا في توفير رؤى صحية مخصصة. هل ترغب في المتابعة؟", "sendingAskDrRequest": "جارٍ إرسال الطلب...", "askDrRequestSentSuccess": "تم إرسال الطلب بنجاح، وسيتواصل معك الطبيب قريباً.", - "onlineCheckIn24HoursOnly": "لا تتوفر خدمة تسجيل الوصول عبر الإنترنت إلا خلال 4 ساعات من موعد الحجز.لا تتوفر خدمة تسجيل الوصول عبر الإنترنت إلا خلال 4 ساعات من موعد الحجز." + "onlineCheckIn24HoursOnly": "لا تتوفر خدمة تسجيل الوصول عبر الإنترنت إلا خلال 4 ساعات من موعد الحجز.لا تتوفر خدمة تسجيل الوصول عبر الإنترنت إلا خلال 4 ساعات من موعد الحجز.", + "searchFor" : "بحث عن", + "m": "متر", + "inch": "انش" } diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json index ca64e0a9..163eb616 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -268,6 +268,7 @@ "userViewRequester": "User Wants to View Your Medical File", "userView": "User Can View Your Medical File", "parking": "Parking", + "parking2": "Parking", "alhabiServices": "HMG Service", "parkingTitle": "Car service, car service, service to save parking information, return to it later, 1- By clicking on (Read the code), save the parking data. 2- By clicking on the button (view my car park), it shows you the car’s location in Google Maps. 3- Read another position by pressing the Clear Position Data button.", "parkingDescription": "Parking service is for you to scan the car location so you can find it easy on you way out. click on (scan parking) button to save the parking location, then (show my park) button will appear to show you the way for the parking. if you want to rescan parking QR just click on (Clear My Data).", @@ -1251,7 +1252,7 @@ "stayHydratedDrinkWater": "Stay hydrated! Drink {amount}ml of water.", "visitPharmacyOnline": "Visit Pharmacy Online", "howAreYouFeelingToday": "How are you feeling today?", - "checkYourSymptomsWithScale": "Check your symptoms with this scale", + "checkYourSymptomsWithScale": "Check your symptoms or check your health", "checkYourSymptoms": "Check your symptoms", "noUpcomingAppointmentPleaseBook": "You do not have any upcoming appointment. Please book an appointment", "youHaveEROnlineCheckInRequest": "You have ER Online Check-In Request", @@ -1531,7 +1532,7 @@ "pleaseVisitRoomToTheDoctor": "Please visit Room {roomNumber} to the Doctor", "erOnlineCheckInRequest": "ER Online Check-In Request", "indoor": "Indoor", - "navigation": "Navigation", + "thehospital": "Navigation", "health": "Health", "calculators": "Calculators", "converters": "Converters", @@ -1721,5 +1722,8 @@ "aiDisclaimerRad": "Your radiology result data will be securely shared with our AI Analyzer for analysis. This helps provide personalized health insights. Do you want to proceed?", "sendingAskDrRequest": "Sending Request...", "askDrRequestSentSuccess": "Request has been sent successfully, The doctor will get back to you soon.", - "onlineCheckIn24HoursOnly": "Online Check-In is only available within 4 hours of the appointment time." + "onlineCheckIn24HoursOnly": "Online Check-In is only available within 4 hours of the appointment time.", + "searchFor": "Search For", + "m": "m", +"inch": "in" } diff --git a/lib/core/enums.dart b/lib/core/enums.dart index 8bb8330c..2d42a2ae 100644 --- a/lib/core/enums.dart +++ b/lib/core/enums.dart @@ -58,15 +58,15 @@ extension HealthCalculatorExtenshion on HealthCalculatorsTypeEnum { bool isArabic = appState.getLanguageID() == 1 ? true : false; switch (this) { case HealthCalculatorsTypeEnum.bmi: - return isArabic ? "حاسبة مؤشر كتلة الجسم" : "BMI Calculator"; + return isArabic ? "مؤشر كتلة الجسم" : "BMI Calculator"; case HealthCalculatorsTypeEnum.calories: - return isArabic ? "حاسبة السعرات الحرارية" : "Calories Calculator"; + return isArabic ? "السعرات الحرارية" : "Calories Calculator"; case HealthCalculatorsTypeEnum.bmr: - return isArabic ? "حاسبة معدل الأيض الأساسي" : "BMR Calculator"; + return isArabic ? "معدل الايض" : "BMR Calculator"; case HealthCalculatorsTypeEnum.idealBodyWeight: - return isArabic ? "الوزن المثالي للجسم" : "Ideal Body Weight Calculator"; + return isArabic ? "الوزن المثالي" : "Ideal Body Weight Calculator"; case HealthCalculatorsTypeEnum.bodyFat: - return isArabic ? "حاسبة الدهون في الجسم" : "Body Fat Calculator"; + return isArabic ? "دهون الجسم" : "Body Fat Calculator"; case HealthCalculatorsTypeEnum.crabsProteinFat: return isArabic ? "حاسبة البروتين والدهون في سرطان البحر" : "Crabs Protein & Fat Calculator"; case HealthCalculatorsTypeEnum.ovulation: diff --git a/lib/generated/codegen_loader.g.dart b/lib/generated/codegen_loader.g.dart index 7722c8d8..12abda09 100644 --- a/lib/generated/codegen_loader.g.dart +++ b/lib/generated/codegen_loader.g.dart @@ -85,7 +85,7 @@ class CodegenLoader extends AssetLoader{ "date": "التاريخ", "time": "الوقت", "pendingPayment": "معلق للدفع", - "payNow": "ادفع الآن", + "payNow": "الدفع", "viewQR": "عرض رمز الاستجابة السريعة", "instruction": "تعليمات", "livecare": "لايف كير", @@ -187,9 +187,9 @@ class CodegenLoader extends AssetLoader{ "emailSentError": "خطأ في إرسال البريد الإلكتروني", "close": "إغلاق", "closeIt": "أغلق", - "booked": "محجوز", + "booked": "تم الحجز", "confirmed": "مؤكد", - "arrived": "وصل", + "arrived": "تم الحضور", "payNowBookSuccess": "ادفع الآن عبر تطبيق الحبيب", "payNowBookSuccesstext1": "ادفع الآن باستخدام خدمة الدفع عبر الإنترنت من بوابات الدفع الآمنة", "payNowBookSuccesstext2": "يمكنك أيضًا الدفع لاحقًا عبر الدفع الإلكتروني أو في المستشفى.", @@ -885,8 +885,8 @@ class CodegenLoader extends AssetLoader{ "onboardingBody1": "ببضع نقرات فقط يمكنك استشارة الطبيب الذي تختاره.", "onboardingHeading2": "الوصول إلى السجل الطبي بين يديك", "onboardingBody2": "تتبع تاريخك الطبي بما في ذلك الفحوصات المخبرية، الوصفات الطبية، التأمين، وغيرها.", - "hmgHospitals": "مستشفيات الحبيب", - "hmcMedicalClinic": "مراكز مجموعة الحبيب الطبية", + "hmgHospitals": "المستشفيات", + "hmcMedicalClinic": "المراكز الطبية", "applyFilter": "تطبيق الفلتر", "facilityAndLocation": "المرفق والموقع", "regionAndLocation": "المنطقة والمواقع", @@ -902,7 +902,7 @@ class CodegenLoader extends AssetLoader{ "to": "إلى", "startDate": "تاريخ البدء", "endDate": "تاريخ الانتهاء", - "walkin": "زيارة بدون موعد", + "walkin": "بدون حجز", "laserClinic": "عيادة الليزر", "continueString": "يكمل", "covid_info": "تجري مستشفيات د. سليمان الحبيب فحص فيروس كورونا المستجد وتصدر شهادات السفر على مدار الساعة، طوال أيام الأسبوع، وبسرعة ودقة عالية. يمكن للراغبين في الاستفادة من هذه الخدمة زيارة أحد فروع مستشفيات د. سليمان الحبيب وإجراء فحص كورونا خلال بضع دقائق والحصول على النتائج خلال عدة ساعات خدمة فحص فيروس كورونا Covid 19 بتقنية PCR للكشف عن الفيروس وفقاً لأعلى المعايير العالمية وبأحدث أجهزة RT-PCR عالية الدقة (GeneXpert الأمريكي وغيره)، وهي طرق معتمدة من قبل هيئة الغذاء والدواء وكذلك من قبل المركز السعودي للوقاية من الأمراض المُعدية", @@ -1229,7 +1229,7 @@ class CodegenLoader extends AssetLoader{ "healthConvertersServices": "محولات\nالصحة", "smartWatchesServices": "الساعات\nالذكية", "exploreServices": "استكشف الخدمات", - "medicalAndCareServices": "الخدمات الطبية والرعاية", + "medicalAndCareServices": "خدمات الرعاية الطبية", "hmgServices": "خدمات مجموعة الحبيب الطبية", "personalServices": "الخدمات الشخصية", "habibWallet": "محفظة الحبيب", diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart index 64577cbb..d872f0c9 100644 --- a/lib/generated/locale_keys.g.dart +++ b/lib/generated/locale_keys.g.dart @@ -272,6 +272,7 @@ abstract class LocaleKeys { static const userViewRequester = 'userViewRequester'; static const userView = 'userView'; static const parking = 'parking'; + static const parking2 = 'parking2'; static const alhabiServices = 'alhabiServices'; static const parkingTitle = 'parkingTitle'; static const parkingDescription = 'parkingDescription'; @@ -1534,7 +1535,7 @@ abstract class LocaleKeys { static const pleaseVisitRoomToTheDoctor = 'pleaseVisitRoomToTheDoctor'; static const erOnlineCheckInRequest = 'erOnlineCheckInRequest'; static const indoor = 'indoor'; - static const navigation = 'navigation'; + static const thehospital = 'thehospital'; static const health = 'health'; static const calculators = 'calculators'; static const converters = 'converters'; @@ -1723,5 +1724,8 @@ abstract class LocaleKeys { static const sendingAskDrRequest = 'sendingAskDrRequest'; static const askDrRequestSentSuccess = 'askDrRequestSentSuccess'; static const onlineCheckIn24HoursOnly = 'onlineCheckIn24HoursOnly'; + static const searchFor = 'searchFor'; + static const m = 'm'; + static const inch = 'inch'; } diff --git a/lib/presentation/book_appointment/book_appointment_page.dart b/lib/presentation/book_appointment/book_appointment_page.dart index aff3e275..aa32782f 100644 --- a/lib/presentation/book_appointment/book_appointment_page.dart +++ b/lib/presentation/book_appointment/book_appointment_page.dart @@ -907,7 +907,7 @@ class _BookAppointmentPageState extends State { ), SizedBox(height: 36.h), CustomButton( - text: "Login to use this service", + text: LocaleKeys.loginToUseService.tr(), onPressed: () async { await authVM.onLoginPressed(); }, diff --git a/lib/presentation/health_calculators_and_converts/widgets/bmi.dart b/lib/presentation/health_calculators_and_converts/widgets/bmi.dart index 9e9d1bed..b982df0b 100644 --- a/lib/presentation/health_calculators_and_converts/widgets/bmi.dart +++ b/lib/presentation/health_calculators_and_converts/widgets/bmi.dart @@ -25,11 +25,29 @@ class BMIWidget extends StatefulWidget { class _BMIWidgetState extends State { final TextEditingController _heightController = TextEditingController(); final TextEditingController _weightController = TextEditingController(); - final List _heightUnits = ['cm', 'm', 'ft', 'in']; - final List _weightUnits = ['kg', 'lb']; + // Map keys are the localization keys (when available) or plain strings. + // Map values are the actual unit values used for calculations. + final Map _heightUnitsMap = { + LocaleKeys.cm: 'cm', + LocaleKeys.m: 'm', // no LocaleKeys entry found for meter, fallback to key 'm' + LocaleKeys.ft: 'ft', + LocaleKeys.inch: 'in', // no LocaleKeys entry for inches, fallback + }; + + final Map _weightUnitsMap = { + LocaleKeys.kg: 'kg', + LocaleKeys.lb: 'lb', + }; String selectedHeightUnit = 'cm'; String selectedWeightUnit = 'kg'; + // Helper to return a localized label for a given selected (value) unit. + String _getUnitLabel(Map map, String value) { + final entry = map.entries.firstWhere((e) => e.value == value, orElse: () => MapEntry(value, value)); + // tr() will return the localized string if available, otherwise it will return the key itself. + return entry.key.tr(context: context); + } + @override void initState() { super.initState(); @@ -75,7 +93,7 @@ class _BMIWidgetState extends State { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ - "Height".toText12(isBold: true, color: AppColors.inputLabelTextColor), + LocaleKeys.height.tr().toText12(isBold: true, color: AppColors.inputLabelTextColor), Container( height: 20.w, alignment: Alignment.centerLeft, @@ -110,8 +128,9 @@ class _BMIWidgetState extends State { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ - "Unit".toText12(isBold: true, color: AppColors.inputLabelTextColor), - selectedHeightUnit.toUpperCase().toText12(isBold: true, color: AppColors.textColor), + LocaleKeys.unit.tr().toText12(isBold: true, color: AppColors.inputLabelTextColor), + // Show localized label for the currently selected height unit + _getUnitLabel(_heightUnitsMap, selectedHeightUnit).toText12(isBold: true, color: AppColors.textColor), ], ), SizedBox(width: 12.w), @@ -126,9 +145,11 @@ class _BMIWidgetState extends State { decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, - itemCount: _heightUnits.length, + itemCount: _heightUnitsMap.length, itemBuilder: (context, index) { - final unit = _heightUnits[index]; + final entry = _heightUnitsMap.entries.elementAt(index); + final key = entry.key; + final value = entry.value; return Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, @@ -139,7 +160,7 @@ class _BMIWidgetState extends State { spacing: 8.h, children: [ Radio( - value: unit, + value: value, groupValue: selectedHeightUnit, activeColor: AppColors.errorColor, onChanged: (String? value) { @@ -152,11 +173,12 @@ class _BMIWidgetState extends State { }, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, ), - unit.toUpperCase().toText16(isBold: true, textOverflow: TextOverflow.ellipsis, maxlines: 1).expanded, + // show localized label (if available) otherwise show the key itself + key.tr(context: context).toText16(isBold: true, textOverflow: TextOverflow.ellipsis, maxlines: 1).expanded, ], ).onPress(() { setState(() { - selectedHeightUnit = unit; + selectedHeightUnit = value; }); Navigator.pop(context); }), @@ -187,7 +209,7 @@ class _BMIWidgetState extends State { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ - "Weight".toText12(isBold: true, color: AppColors.inputLabelTextColor), + LocaleKeys.weight.tr().toText12(isBold: true, color: AppColors.inputLabelTextColor), Container( height: 20.w, alignment: Alignment.centerLeft, @@ -227,8 +249,9 @@ class _BMIWidgetState extends State { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, children: [ - "Unit".toText12(isBold: true, color: AppColors.inputLabelTextColor), - selectedWeightUnit.toUpperCase().toText12(isBold: true, color: AppColors.textColor), + LocaleKeys.unit.tr().toText12(isBold: true, color: AppColors.inputLabelTextColor), + // Show localized label for the currently selected weight unit + _getUnitLabel(_weightUnitsMap, selectedWeightUnit).toText12(isBold: true, color: AppColors.textColor), ], ), SizedBox(width: 12.w), @@ -243,9 +266,11 @@ class _BMIWidgetState extends State { decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, - itemCount: _weightUnits.length, + itemCount: _weightUnitsMap.length, itemBuilder: (context, index) { - final unit = _weightUnits[index]; + final entry = _weightUnitsMap.entries.elementAt(index); + final key = entry.key; + final value = entry.value; return Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start, @@ -256,7 +281,7 @@ class _BMIWidgetState extends State { spacing: 8.h, children: [ Radio( - value: unit, + value: value, groupValue: selectedWeightUnit, activeColor: AppColors.errorColor, onChanged: (String? value) { @@ -268,11 +293,11 @@ class _BMIWidgetState extends State { }, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, ), - unit.toUpperCase().toText16(isBold: true, textOverflow: TextOverflow.ellipsis, maxlines: 1).expanded, + key.tr(context: context).toText16(isBold: true, textOverflow: TextOverflow.ellipsis, maxlines: 1).expanded, ], ).onPress(() { setState(() { - selectedWeightUnit = unit; + selectedWeightUnit = value; _onInputChanged(); }); Navigator.pop(context); diff --git a/lib/presentation/home/data/landing_page_data.dart b/lib/presentation/home/data/landing_page_data.dart index fbf7043d..eb0bb500 100644 --- a/lib/presentation/home/data/landing_page_data.dart +++ b/lib/presentation/home/data/landing_page_data.dart @@ -12,8 +12,8 @@ class LandingPageData { ServiceCardData( serviceName: "emergency", icon: AppAssets.emergency_services_icon, - title: LocaleKeys.emergency, - subtitle: LocaleKeys.services2, + title: getIt.get().isArabic()?LocaleKeys.services3 :LocaleKeys.emergency2, + subtitle: getIt.get().isArabic()?LocaleKeys.emergency2:LocaleKeys.services3, backgroundColor: AppColors.primaryRedColor, iconColor: Colors.white, textColor: Colors.white, @@ -23,7 +23,7 @@ class LandingPageData { serviceName: "indoor_navigation", icon: AppAssets.indoor_nav_icon, title: LocaleKeys.indoor, - subtitle: LocaleKeys.navigation, + subtitle: LocaleKeys.thehospital, backgroundColor: AppColors.whiteColor, iconColor: AppColors.blackColor, textColor: AppColors.blackColor, @@ -32,7 +32,7 @@ class LandingPageData { ServiceCardData( serviceName: "search_doctor", icon: AppAssets.search_doctor_icon, - title: LocaleKeys.search, + title: LocaleKeys.searchFor, subtitle: LocaleKeys.doctor, backgroundColor: AppColors.whiteColor, iconColor: AppColors.blackColor, @@ -42,8 +42,8 @@ class LandingPageData { ServiceCardData( serviceName: "health_calculators_and_converts", icon: AppAssets.health_calculators_icon, - title: LocaleKeys.health, - subtitle: LocaleKeys.calculators, + title: getIt.get().isArabic()? LocaleKeys.calculators:LocaleKeys.health , + subtitle: getIt.get().isArabic()? LocaleKeys.health:LocaleKeys.calculators, backgroundColor: AppColors.whiteColor, iconColor: AppColors.blackColor, textColor: AppColors.blackColor, @@ -52,8 +52,8 @@ class LandingPageData { ServiceCardData( serviceName: "health_converters", icon: AppAssets.health_converters_icon, - title: LocaleKeys.health, - subtitle: LocaleKeys.converters, + title: getIt.get().isArabic()? LocaleKeys.converters:LocaleKeys.health, + subtitle: getIt.get().isArabic()? LocaleKeys.health:LocaleKeys.converters, backgroundColor: AppColors.whiteColor, iconColor: AppColors.blackColor, textColor: AppColors.blackColor, @@ -62,8 +62,8 @@ class LandingPageData { ServiceCardData( serviceName: "parking_guide", icon: AppAssets.car_parking_icon, - title: LocaleKeys.parking, - subtitle: LocaleKeys.guide, + title: getIt.get().isArabic()? LocaleKeys.guide:LocaleKeys.parking2, + subtitle: getIt.get().isArabic()? LocaleKeys.parking2:LocaleKeys.guide, backgroundColor: AppColors.whiteColor, iconColor: AppColors.blackColor, textColor: AppColors.blackColor, diff --git a/lib/presentation/prescriptions/prescription_detail_page.dart b/lib/presentation/prescriptions/prescription_detail_page.dart index 715b6e4d..f2ac16c9 100644 --- a/lib/presentation/prescriptions/prescription_detail_page.dart +++ b/lib/presentation/prescriptions/prescription_detail_page.dart @@ -113,7 +113,7 @@ class _PrescriptionDetailPageState extends State { children: [ AppCustomChipWidget( labelText: getIt.get().isArabic() - ? (widget.prescriptionsResponseModel.isInOutPatientDescriptionN ?? "مراجع للعيادات الخارجية") + ? (widget.prescriptionsResponseModel.isInOutPatientDescriptionN ?? "العيادات الخارجية") : (widget.prescriptionsResponseModel.isInOutPatientDescription ?? "OutPatient"), backgroundColor: AppColors.warningColorYellow.withOpacity(0.1), textColor: AppColors.warningColorYellow, diff --git a/lib/presentation/symptoms_checker/user_info_selection.dart b/lib/presentation/symptoms_checker/user_info_selection.dart index bd19f31b..9113487d 100644 --- a/lib/presentation/symptoms_checker/user_info_selection.dart +++ b/lib/presentation/symptoms_checker/user_info_selection.dart @@ -159,7 +159,7 @@ class _UserInfoSelectionPageState extends State { } } } else { - name = "Guest"; + name = ""; /// as per the mahmooud instruction, if user is not authenticated, we will not show any name in the greeting message } return Scaffold( @@ -176,11 +176,11 @@ class _UserInfoSelectionPageState extends State { String ageText = displayAge != null ? "$displayAge ${LocaleKeys.years.tr(context: context)}" : LocaleKeys.notSet.tr(context: context); String heightText = (viewModel.selectedHeight != null && viewModel.selectedHeight != 0) - ? "${viewModel.selectedHeight!.round()} ${viewModel.isHeightCm ? 'cm' : 'ft'}" + ? "${viewModel.selectedHeight!.round()} ${viewModel.isHeightCm ? LocaleKeys.cm.tr() : LocaleKeys.ft.tr()}" : LocaleKeys.notSet.tr(context: context); String weightText = (viewModel.selectedWeight != null && viewModel.selectedWeight != 0) - ? "${viewModel.selectedWeight!.round()} ${viewModel.isWeightKg ? 'kg' : 'lbs'}" + ? "${viewModel.selectedWeight!.round()} ${viewModel.isWeightKg ? LocaleKeys.kg.tr() : LocaleKeys.lb.tr()}" : LocaleKeys.notSet.tr(context: context); return Column( From 4f60227429ae55e18ca1a8d2c48e2952278f8653 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 13 Apr 2026 19:01:03 +0300 Subject: [PATCH 2/3] LiveCare Video Call fixes --- lib/core/cache_consts.dart | 1 + lib/core/utils/push_notification_handler.dart | 2 + .../tele_consultation/zoom/call_screen.dart | 108 ++++++++---------- lib/splashPage.dart | 4 +- 4 files changed, 56 insertions(+), 59 deletions(-) diff --git a/lib/core/cache_consts.dart b/lib/core/cache_consts.dart index c1e06aa3..c829adbf 100644 --- a/lib/core/cache_consts.dart +++ b/lib/core/cache_consts.dart @@ -78,5 +78,6 @@ class CacheConst { static const String isMonthlyReportEnabled = 'is-monthly-report-enabled'; static const String zoomRoomID = 'zoom-room-id'; + static const String callTypeID = 'call-type-id'; static String isAppOpenedFromCall = "is_app_opened_from_call"; } diff --git a/lib/core/utils/push_notification_handler.dart b/lib/core/utils/push_notification_handler.dart index e2925c29..6fc248f9 100644 --- a/lib/core/utils/push_notification_handler.dart +++ b/lib/core/utils/push_notification_handler.dart @@ -46,11 +46,13 @@ _incomingCall(Map data) async { // LandingPage.isOpenCallPage = true; String roomID = data['session_id'] ?? ''; + String callTypeID = data['AppointmentNo'] ?? ''; // GetIt.instance().saveString(key: CacheConst.zoomRoomID, value: roomID); // GetIt.instance().saveBool(key: CacheConst.isAppOpenedFromCall, value: true); Utils.saveStringFromPrefs(CacheConst.zoomRoomID, roomID); + Utils.saveStringFromPrefs(CacheConst.callTypeID, callTypeID); Utils.saveBoolFromPrefs(CacheConst.isAppOpenedFromCall, true); WidgetsFlutterBinding.ensureInitialized(); diff --git a/lib/presentation/tele_consultation/zoom/call_screen.dart b/lib/presentation/tele_consultation/zoom/call_screen.dart index 21836a8a..a2721aba 100644 --- a/lib/presentation/tele_consultation/zoom/call_screen.dart +++ b/lib/presentation/tele_consultation/zoom/call_screen.dart @@ -84,6 +84,7 @@ class _CallScreenState extends State { Color chatTextColor = const Color(0xFFAAAAAA); Widget changeNamePopup; final args = ModalRoute.of(context)!.settings.arguments as CallArguments; + var isFrontCamera = useState(true); useEffect(() { Future.microtask(() async { @@ -93,8 +94,11 @@ class _CallScreenState extends State { try { Map SDKaudioOptions = {"connect": true, "mute": false, "autoAdjustSpeakerVolume": false}; + // Map SDKvideoOptions = { + // "localVideoOn": true, + // }; Map SDKvideoOptions = { - "localVideoOn": true, + "localVideoOn": args.callType == 1 ? true : false, }; JoinSessionConfig joinSession = JoinSessionConfig( sessionName: args.sessionName, @@ -302,6 +306,19 @@ class _CallScreenState extends State { List? remoteUserList = await zoom.session.getRemoteUsers(); var leftUserListJson = jsonDecode(data['leftUsers']) as List; List leftUserLis = leftUserListJson.map((userJson) => ZoomVideoSdkUser.fromJson(userJson)).toList(); + + // If no remote users remain, the other participant has left — end the session + if (remoteUserList == null || remoteUserList.isEmpty) { + await zoom.leaveSession(true); + Navigator.pushAndRemoveUntil( + context, + CustomPageRoute( + page: LandingNavigation(), + ), + (r) => false); + return; + } + if (fullScreenUser.value != null) { for (var user in leftUserLis) { { @@ -313,8 +330,8 @@ class _CallScreenState extends State { } else { fullScreenUser.value = mySelf; } - remoteUserList?.add(mySelf!); - users.value = remoteUserList!; + remoteUserList.add(mySelf!); + users.value = remoteUserList; }); final userNameChangedListener = eventListener.addListener(EventType.onUserNameChanged, (data) async { @@ -817,63 +834,38 @@ class _CallScreenState extends State { } void onPressCameraList() async { - List options = []; List cameraList = await zoom.videoHelper.getCameraList(); - for (var camera in cameraList) { - options.add( - ListTile( - title: Text( - camera.deviceName, - style: const TextStyle( - fontSize: 14, - fontWeight: FontWeight.normal, - color: Colors.black, - ), - ), - onTap: () async => { - await zoom.videoHelper.switchCamera(camera.deviceId), - Navigator.of(context).pop(), - }, - ), - ); + if (cameraList.isEmpty) return; + + // Find the target camera by toggling between front and back + ZoomVideoSdkCameraDevice? targetCamera; + try { + if (isFrontCamera.value) { + // Currently front, switch to back + targetCamera = cameraList.firstWhere( + (c) => c.deviceName.toLowerCase().contains('back') || c.deviceName.toLowerCase().contains('rear'), + ); + } else { + // Currently back, switch to front + targetCamera = cameraList.firstWhere( + (c) => c.deviceName.toLowerCase().contains('front') || c.deviceName.toLowerCase().contains('facing'), + ); + } + } catch (_) { + targetCamera = null; + } + + // Fallback: if we can't identify by name, just pick the other camera + if (targetCamera == null && cameraList.length >= 2) { + final currentIndex = isFrontCamera.value ? 0 : 1; + final nextIndex = (currentIndex + 1) % cameraList.length; + targetCamera = cameraList[nextIndex]; + } + + if (targetCamera != null) { + await zoom.videoHelper.switchCamera(targetCamera.deviceId); + isFrontCamera.value = !isFrontCamera.value; } - options.add( - ListTile( - title: Text( - "Cancel", - style: const TextStyle( - fontSize: 14, - fontWeight: FontWeight.normal, - color: Colors.black, - ), - ), - onTap: () async => { - Navigator.of(context).pop(), - }, - ), - ); - showDialog( - context: context, - builder: (context) { - return Dialog( - elevation: 0.0, - insetPadding: const EdgeInsets.symmetric(horizontal: 40), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), - child: SizedBox( - height: options.length * 60, - child: Scrollbar( - child: ListView( - shrinkWrap: true, - scrollDirection: Axis.vertical, - children: ListTile.divideTiles( - context: context, - tiles: options, - ).toList(), - ), - ), - ), - ); - }); } // Future onPressMore() async { diff --git a/lib/splashPage.dart b/lib/splashPage.dart index 64518f30..f17d8bc3 100644 --- a/lib/splashPage.dart +++ b/lib/splashPage.dart @@ -80,7 +80,9 @@ class _SplashScreenState extends State { navigateToTeleConsult() async { String roomID = await Utils.getStringFromPrefs(CacheConst.zoomRoomID); + String callTypeID = await Utils.getStringFromPrefs(CacheConst.callTypeID); print('RoomID: $roomID'); + print('callTypeID: $callTypeID'); // GetIt.instance().remove(key: CacheConst.isAppOpenedFromCall); Utils.removeFromPrefs(CacheConst.isAppOpenedFromCall); @@ -92,7 +94,7 @@ class _SplashScreenState extends State { GetIt.instance().navigatorKey.currentContext!, AppRoutes.zoomCallPage, // arguments: CallArguments(appointmentID, "111", "Patient", "40", "1", true, 1), - arguments: CallArguments(roomID, "123", "Patient", "40", "0", true, 1), + arguments: CallArguments(roomID, "123", "Patient", "40", "0", true, int.parse(callTypeID)), // arguments: CallArguments("SmallDailyStandup9875", "123", "Patient", "40", "0", false, int.parse(widget.incomingCallData!.appointmentNo!)), ); } From 994bf95043e8f5fe3d3efe242594c6332b03b3d5 Mon Sep 17 00:00:00 2001 From: tahaalam Date: Mon, 13 Apr 2026 19:05:54 +0300 Subject: [PATCH 3/3] updates and fixes --- assets/langs/ar-SA.json | 18 +++--- assets/langs/en-US.json | 4 +- lib/generated/locale_keys.g.dart | 16 +++--- .../appointment_details_page.dart | 4 +- lib/presentation/home/landing_page.dart | 57 ++++++++++++++++++- .../widgets/update_email_widget.dart | 2 +- .../update_emergency_contact_widget.dart | 2 +- 7 files changed, 82 insertions(+), 21 deletions(-) diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json index 9dc024b6..b509107b 100644 --- a/assets/langs/ar-SA.json +++ b/assets/langs/ar-SA.json @@ -123,7 +123,7 @@ "forgotFileNoTitle": "نسيت الملف الطبي", "enterNationalId": "يرجى إدخال رقم الهاتف المحمول ورقم الهوية", "profileInfo": "يرجى إدخال معلومات الملف الشخصي", - "submit": "إرسال", + "submit": "تحديث", "forgotDesc": "أدخل رقم الهاتف المحمول لاستلام رقم الملف الطبي عبر الرسائل القصيرة", "dob": "تاريخ الميلاد:", "hijriDate": "الت��ريخ الهجري", @@ -1295,7 +1295,7 @@ "noInsuranceApprovals": "لم تحصل على أي موافقات تأمينية حتى الآن.", "noInsuranceWithHMG": "ليس لديك تأمين مسجل لدى مجموعة الحبيب الطبية.", "referenceRange": "النطاق المرجعي", - "downloadReport": "تنزيل التقرير", + "downloadReport": "تحميل التقارير", "generatingReport": "جارٍ إنشاء التقرير، يرجى الانتظار...", "noLabResults": "ليس لديك أي نتائج مختبرية حتى الآن.", "labResultDetails": "تفاصيل نتائج المختبر", @@ -1375,7 +1375,7 @@ "notificationsSettings": "إعدادات الإشعارات", "touchIDFaceIDServices": "خدمات Touch ID / Face ID", "personalInformation": "المعلومات الشخصية", - "updateEmailAddress": "تحديث عنوان البريد الإلكتروني", + "updateEmailAddress": "عنوان البريد الالكتروني", "helpAndSupport": "المساعدة والدعم", "permissionsProfile": "الأذونات", "privacyPolicy": "سياسة الخصوصية", @@ -1565,8 +1565,8 @@ "generateAiAnalysis": "قم بإجراء تحليل لهذا الطلب AI", "aiAnalysis": "AI تحليل", "prediction": "تنبؤ", - "prevention": "وقاية", - "disclaimer": "تنصل", + "prevention": "الوقاية", + "disclaimer": "تنبيه", "thisAboveInfo": "المعلومات المذكورة أعلاه مُولّدة بواسطة AI بناءً على نتائج تحاليلك المخبرية، وهي لأغراض إعلامية فقط. لا ينبغي اعتبارها تشخيصًا طبيًا أو خطة علاجية. استشر طبيبك دائمًا للحصول على نصيحة طبية مُخصصة قبل اتخاذ أي قرارات تتعلق بصحتك.", "aiDisclaimer": "سيتم مشاركة بيانات نتائج تحاليلك المخبرية بشكل آمن مع خدمة الذكاء الاصطناعي لدينا لتحليلها. يساعد هذا في تقديم رؤى صحية مُخصصة. هل ترغب في المتابعة؟", "consent": "موافقة", @@ -1637,7 +1637,7 @@ "continueCash": "متابعة الدفع نقدًا", "timeFor": "الوقت", "hmgPolicies": "سياسات مجموعة الحبيب الطبية", - "darkMode": "المظهر الداكن", + "darkMode": "الوضع الداكن", "featureComingSoonDescription": "هذه الميزة ستتوفر قريباً. نحن نعمل جاهدين لإضافة ميزات أكثر تميزاً إلى التطبيق. انتظرونا لمتابعة التحديثات.", "generateAiAnalysisResult": "قم بإجراء تحليل لهذا المختبر AI", "ratings": "التقييمات", @@ -1720,7 +1720,7 @@ "openCamera": "افتح الكاميرا", "openGallery": "افتح المعرض", "openFiles": "فتح الملفات", - "generateAiAnalysisRadResult": "بإنشاء تحليل الذكاء الاصطناعي لهذا التقرير", + "generateAiAnalysisRadResult": "نتيجة الاشعة بالذكاء الاصطناعي", "grantLocationPermission": "يرجى منح إذن الوصول إلى الموقع من إعدادات التطبيق للحصول على نتائج أفضل.", "NoBookedAppointments": "لا توجد مواعيد محجوزة", "aiDisclaimerRad": "سيتم مشاركة بيانات نتائج الأشعة الخاصة بك بشكل آمن مع محلل الذكاء الاصطناعي لدينا لتحليلها. يساعد هذا في توفير رؤى صحية مخصصة. هل ترغب في المتابعة؟", @@ -1744,5 +1744,7 @@ "onlineCheckIn24HoursOnly": "لا تتوفر خدمة تسجيل الوصول عبر الإنترنت إلا خلال 4 ساعات من موعد الحجز.لا تتوفر خدمة تسجيل الوصول عبر الإنترنت إلا خلال 4 ساعات من موعد الحجز.", "searchFor" : "بحث عن", "m": "متر", - "inch": "انش" + "inch": "انش", + "updateEmailAddressTitle": "تحديث البريد الالكتروني: ", + "enterNewNewContactNumber": "الرجاء اضافة رقم اتصال في حالة الطواريء: " } diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json index 311d320c..a913111a 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -1733,5 +1733,7 @@ "onlineCheckIn24HoursOnly": "Online Check-In is only available within 4 hours of the appointment time.", "searchFor": "Search For", "m": "m", -"inch": "in" +"inch": "in", + "updateEmailAddressTitle": "Enter the new email address to be updated: ", + "enterNewNewContactNumber": "Enter the new emergency contact number to be updated: " } diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart index 75b5e390..88964f6c 100644 --- a/lib/generated/locale_keys.g.dart +++ b/lib/generated/locale_keys.g.dart @@ -1177,20 +1177,20 @@ abstract class LocaleKeys { static const triglyceridesFatBlood = 'triglyceridesFatBlood'; static const understandTriglyceridesImpact = 'understandTriglyceridesImpact'; static const bmiCalculator = 'bmiCalculator'; - static const bmiCalculatorDesc = 'bmiCalculatorDesc'; static const caloriesCalculator = 'caloriesCalculator'; - static const caloriesCalculatorDesc = 'caloriesCalculatorDesc'; static const bmrCalculator = 'bmrCalculator'; - static const bmrCalculatorDesc = 'bmrCalculatorDesc'; static const idealBodyWeight = 'idealBodyWeight'; - static const idealBodyWeightDesc = 'idealBodyWeightDesc'; static const bodyFatCalculator = 'bodyFatCalculator'; - static const bodyFatCalculatorDesc = 'bodyFatCalculatorDesc'; static const carbsProteinFat = 'carbsProteinFat'; - static const carbsProteinFatDesc = 'carbsProteinFatDesc'; static const ovulationPeriod = 'ovulationPeriod'; - static const ovulationPeriodDesc = 'ovulationPeriodDesc'; static const deliveryDueDate = 'deliveryDueDate'; + static const bmiCalculatorDesc = 'bmiCalculatorDesc'; + static const caloriesCalculatorDesc = 'caloriesCalculatorDesc'; + static const bmrCalculatorDesc = 'bmrCalculatorDesc'; + static const idealBodyWeightDesc = 'idealBodyWeightDesc'; + static const bodyFatCalculatorDesc = 'bodyFatCalculatorDesc'; + static const carbsProteinFatDesc = 'carbsProteinFatDesc'; + static const ovulationPeriodDesc = 'ovulationPeriodDesc'; static const deliveryDueDateDesc = 'deliveryDueDateDesc'; static const low = 'low'; static const preDiabetic = 'preDiabetic'; @@ -1735,5 +1735,7 @@ abstract class LocaleKeys { static const searchFor = 'searchFor'; static const m = 'm'; static const inch = 'inch'; + static const updateEmailAddressTitle = 'updateEmailAddressTitle'; + static const enterNewNewContactNumber = 'enterNewNewContactNumber'; } diff --git a/lib/presentation/appointments/appointment_details_page.dart b/lib/presentation/appointments/appointment_details_page.dart index ff656c72..5b012872 100644 --- a/lib/presentation/appointments/appointment_details_page.dart +++ b/lib/presentation/appointments/appointment_details_page.dart @@ -97,8 +97,8 @@ class _AppointmentDetailsPageState extends State { isAppointmentWithin4Hours = true; } - // Check if reminder exists in calendar and update the flag - await _checkAndUpdateReminderStatus(); + // // Check if reminder exists in calendar and update the flag + // await _checkAndUpdateReminderStatus(); } }); diff --git a/lib/presentation/home/landing_page.dart b/lib/presentation/home/landing_page.dart index fc5924ca..2807c57e 100644 --- a/lib/presentation/home/landing_page.dart +++ b/lib/presentation/home/landing_page.dart @@ -510,7 +510,12 @@ class _LandingPageState extends State { pagination: SwiperPagination( alignment: Alignment.bottomCenter, margin: EdgeInsets.only(top: 220.h + 20 + 8 + 24), - builder: DotSwiperPaginationBuilder(color: Color(0xffD9D9D9), activeColor: AppColors.blackBgColor), + builder: _DirectionalDotPaginationBuilder( + color: Color(0xffD9D9D9), + activeColor: AppColors.blackBgColor, + isRTL: isArabic, + totalCount: swiperItemCount, + ), ), itemBuilder: (BuildContext context, int index) { final int actualIndex = isArabic ? (swiperItemCount - 1 - index) : index; @@ -1414,3 +1419,53 @@ class _LandingPageState extends State { ); } } + +/// A custom pagination builder that reverses the active-dot index +/// when the UI is in RTL (Arabic) mode, so the dots visually match +/// the swipe direction. +class _DirectionalDotPaginationBuilder extends SwiperPlugin { + final Color color; + final Color activeColor; + final double size; + final double activeSize; + final double space; + final bool isRTL; + final int totalCount; + + const _DirectionalDotPaginationBuilder({ + required this.color, + required this.activeColor, + required this.isRTL, + required this.totalCount, + this.size = 10.0, + this.activeSize = 10.0, + this.space = 3.0, + }); + + @override + Widget build(BuildContext context, SwiperPluginConfig config) { + final int activeIndex = isRTL + ? (totalCount - 1 - config.activeIndex) + : config.activeIndex; + print("the index is $activeIndex"); + print("the config.activeIndex is ${config.activeIndex}"); + + return Row( + mainAxisSize: MainAxisSize.min, + textDirection: ui.TextDirection.ltr, // always lay out dots left-to-right + children: List.generate(config.itemCount, (i) { + final bool isActive = i == config.activeIndex; + return Container( + margin: EdgeInsets.symmetric(horizontal: space), + width: isActive ? activeSize : size, + height: isActive ? activeSize : size, + decoration: BoxDecoration( + color: isActive ? activeColor : color, + shape: BoxShape.circle, + ), + ); + }), + ); + } +} + diff --git a/lib/presentation/profile_settings/widgets/update_email_widget.dart b/lib/presentation/profile_settings/widgets/update_email_widget.dart index d2633b93..c1952dd0 100644 --- a/lib/presentation/profile_settings/widgets/update_email_widget.dart +++ b/lib/presentation/profile_settings/widgets/update_email_widget.dart @@ -56,7 +56,7 @@ class _UpdateEmailDialogState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - "Enter the new email address to be updated: ".toText16(textAlign: TextAlign.start, isBold: true), + LocaleKeys.updateEmailAddressTitle.tr().toText16(textAlign: TextAlign.start, isBold: true), SizedBox(height: 12.h), TextInputWidget( labelText: LocaleKeys.email.tr(), diff --git a/lib/presentation/profile_settings/widgets/update_emergency_contact_widget.dart b/lib/presentation/profile_settings/widgets/update_emergency_contact_widget.dart index e1bb59ad..832938da 100644 --- a/lib/presentation/profile_settings/widgets/update_emergency_contact_widget.dart +++ b/lib/presentation/profile_settings/widgets/update_emergency_contact_widget.dart @@ -56,7 +56,7 @@ class _UpdateEmergencyContactDialogState extends State