From 994bf95043e8f5fe3d3efe242594c6332b03b3d5 Mon Sep 17 00:00:00 2001 From: tahaalam Date: Mon, 13 Apr 2026 19:05:54 +0300 Subject: [PATCH] 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