From ffb0824a2263d1e980699f49fa76b52c2f0e0802 Mon Sep 17 00:00:00 2001 From: faizatflutter Date: Wed, 4 Mar 2026 16:46:41 +0300 Subject: [PATCH] darkmode inprogress --- assets/images/svg/dark_mode_icon.svg | 3 + assets/langs/ar-SA.json | 5 +- assets/langs/en-US.json | 7 +- ios/Runner.xcodeproj/project.pbxproj | 40 +- lib/core/app_assets.dart | 1 + lib/core/dependencies.dart | 2 +- lib/core/utils/loading_utils.dart | 2 +- lib/core/utils/utils.dart | 14 +- lib/extensions/string_extensions.dart | 391 ++++++----------- lib/extensions/widget_extensions.dart | 34 +- .../widgets/otp_verification_screen.dart | 2 +- .../widgets/hospital_selection.dart | 4 +- .../models/ui_models/vital_sign_ui_model.dart | 4 +- lib/features/lab/lab_view_model.dart | 8 +- .../profile_settings_view_model.dart | 21 +- lib/generated/locale_keys.g.dart | 1 + lib/main.dart | 56 ++- .../active_medication_page.dart | 18 +- .../allergies/allergies_list_page.dart | 2 +- .../appointment_details_page.dart | 18 +- .../appointment_payment_page.dart | 16 +- .../appointments/appointment_queue_page.dart | 2 +- .../appointments/my_appointments_page.dart | 10 +- .../appointments/my_doctors_page.dart | 8 +- .../widgets/AppointmentFilter.dart | 8 +- .../widgets/appointment_card.dart | 153 ++++--- .../appointment_checkin_bottom_sheet.dart | 2 +- .../widgets/appointment_doctor_card.dart | 4 +- .../facility_selection_item.dart | 4 +- .../facility_type_selection_widget.dart | 2 +- .../hospital_bottom_sheet_body.dart | 2 +- ...l_bottom_sheet_body_for_doctor_filter.dart | 2 +- .../hospital_list_items.dart | 8 +- .../type_selection_widget.dart | 12 +- .../region_bottomsheet/region_list_item.dart | 8 +- .../ask_doctor/ask_doctor_page.dart | 2 +- .../ask_doctor/doctor_response_page.dart | 2 +- lib/presentation/authentication/login.dart | 4 +- lib/presentation/authentication/register.dart | 8 +- .../authentication/register_step2.dart | 2 +- .../blood_donation/blood_donation_page.dart | 14 +- .../widgets/city_list_item.dart | 2 +- .../widgets/select_blood_group_widget.dart | 2 +- .../widgets/select_gender_widget.dart | 2 +- .../book_appointment_page.dart | 6 +- .../doctor_filter/clinic_bottomsheet.dart | 2 +- .../doctor_filter/doctors_filter.dart | 4 +- .../book_appointment/doctor_profile_page.dart | 2 +- .../laser/laser_appointment.dart | 2 +- .../laser/widgets/body_type_listing.dart | 12 +- .../immediate_livecare_payment_details.dart | 8 +- .../immediate_livecare_payment_page.dart | 16 +- ...mediate_livecare_pending_request_page.dart | 2 +- ...select_immediate_livecare_clinic_page.dart | 2 +- .../widgets/select_livecare_call_type.dart | 2 +- .../search_doctor_by_name.dart | 12 +- .../book_appointment/select_clinic_page.dart | 2 +- .../book_appointment/select_doctor_page.dart | 12 +- .../select_livecare_clinic_page.dart | 2 +- .../waiting_appointment_info.dart | 2 +- ...ting_appointment_online_checkin_sheet.dart | 2 +- .../waiting_appointment_payment_page.dart | 16 +- .../widgets/appointment_calendar.dart | 2 +- .../child_vaccine/my_child_vaccine_page.dart | 18 +- .../cmc_selection_review_page.dart | 12 +- .../comprehensive_checkup_page.dart | 4 +- .../widgets/cmc_hospital_list_item.dart | 8 +- lib/presentation/contact_us/contact_us.dart | 2 +- .../contact_us/feedback_page.dart | 2 +- lib/presentation/contact_us/find_us_page.dart | 2 +- .../contact_us/live_chat_page.dart | 4 +- .../contact_us/widgets/find_us_item_card.dart | 2 +- .../covid19test/covid19_landing_page.dart | 2 +- .../covid19test/covid_payment_screen.dart | 12 +- .../covid19test/covid_review_screen.dart | 6 +- .../e_referral/new_e_referral.dart | 2 +- .../e_referral/widget/e-referral_otp.dart | 2 +- .../RRT/rrt_map_screen.dart | 2 +- .../RRT/rrt_request_type_select.dart | 4 +- .../call_ambulance/call_ambulance_page.dart | 2 +- .../call_ambulance/tracking_screen.dart | 8 +- .../call_ambulance/widgets/AddressItem.dart | 2 +- .../widgets/type_selection_widget.dart | 12 +- .../emergency_services_page.dart | 8 +- .../er_online_checkin_home.dart | 2 +- ...r_online_checkin_payment_details_page.dart | 6 +- .../er_online_checkin_payment_page.dart | 16 +- ...e_checkin_select_checkin_bottom_sheet.dart | 2 +- .../history/er_history_listing.dart | 12 +- .../widget/ambulance_history_item.dart | 4 +- .../history/widget/rrt_item.dart | 4 +- .../widgets/location_input_bottom_sheet.dart | 2 +- .../habib_wallet/habib_wallet_page.dart | 4 +- .../habib_wallet/recharge_wallet_page.dart | 33 +- .../wallet_payment_confirm_page.dart | 10 +- .../widgets/hospital_list_item.dart | 4 +- .../widgets/select-medical_file.dart | 2 +- .../widgets/select_hospital_bottom_sheet.dart | 2 +- .../health_calculator_detailed_page.dart | 4 +- .../add_health_tracker_entry_page.dart | 2 +- .../health_tracker_detail_page.dart | 2 +- .../hmg_services/services_page.dart | 67 +-- .../hmg_services/services_view.dart | 21 +- .../home/data/landing_page_data.dart | 350 +++++++-------- .../home/data/service_card_data.dart | 4 +- lib/presentation/home/landing_page.dart | 177 ++++---- .../home/widgets/habib_wallet_card.dart | 58 +-- .../home/widgets/large_service_card.dart | 28 +- .../home/widgets/small_service_card.dart | 32 +- .../home/widgets/welcome_widget.dart | 12 +- .../home_health_care/hhc_procedures_page.dart | 10 +- lib/presentation/lab/lab_orders_page.dart | 2 +- .../LabResultByClinic.dart | 2 +- .../ai_analysis_widget.dart | 10 +- .../lab_ai_analysis_detailed_page.dart | 22 +- .../lab_order_specialResult.dart | 2 +- .../lab/lab_results/lab_result_details.dart | 4 +- .../eye_measurement_details_page.dart | 2 +- .../eye_measurements_appointments_page.dart | 2 +- .../medical_file/medical_file_page.dart | 34 +- .../patient_sickleaves_list_page.dart | 12 +- .../medical_file/vaccine_list_page.dart | 2 +- .../medical_file_appointment_card.dart | 4 +- .../medical_report/medical_reports_page.dart | 24 +- .../monthly_report/monthly_report.dart | 2 +- .../my_family/widget/family_cards.dart | 6 +- .../my_invoices/my_invoices_details_page.dart | 4 +- ...scription_delivery_order_summary_page.dart | 2 +- ...rescription_delivery_orders_list_page.dart | 4 +- .../prescription_detail_page.dart | 2 +- .../prescriptions_list_page.dart | 12 +- .../profile_settings/profile_settings.dart | 172 +++++--- .../radiology/radiology_orders_page.dart | 10 +- .../radiology/radiology_result_page.dart | 2 +- .../rate_appointment_clinic.dart | 2 +- .../services_price_list_page.dart | 4 +- .../health_dashboard/health_dashboard.dart | 2 +- .../smartwatches/smartwatch_home_page.dart | 2 +- .../smartwatch_instructions_page.dart | 2 +- .../widgets/health_metric_card.dart | 2 +- .../organ_selector_screen.dart | 4 +- .../possible_conditions_screen.dart | 6 +- .../symptoms_checker/risk_factors_screen.dart | 2 +- .../symptoms_checker/suggestions_screen.dart | 2 +- .../symptoms_selector_screen.dart | 6 +- .../symptoms_checker/triage_screen.dart | 2 +- .../symptoms_checker/user_info_selection.dart | 72 +-- .../user_info_flow_manager.dart | 2 +- .../widgets/condition_card.dart | 8 +- .../widgets/organ_dot_widget.dart | 2 +- .../widgets/selected_organs_section.dart | 2 +- .../ancillary_order_payment_page.dart | 10 +- .../ancillary_procedures_details_page.dart | 10 +- .../vital_sign/vital_sign_details_page.dart | 2 +- .../vital_sign/vital_sign_page.dart | 6 +- .../water_monitor/water_consumption_page.dart | 2 +- .../water_monitor_settings_page.dart | 2 +- .../widgets/cup_bottomsheet_widgets.dart | 2 +- .../widgets/water_splash_progress_widget.dart | 2 +- lib/routes/app_routes.dart | 7 +- lib/services/dialog_service.dart | 8 +- lib/theme/app_theme.dart | 121 +++-- lib/theme/colors.dart | 414 ++++++++++++++++-- lib/widgets/CustomSwitch.dart | 2 +- lib/widgets/appbar/collapsing_list_view.dart | 54 ++- lib/widgets/appbar/collapsing_toolbar.dart | 6 +- .../bottom_navigation/bottom_navigation.dart | 41 +- .../bottomsheet/exception_bottom_sheet.dart | 2 +- .../bottomsheet/generic_bottom_sheet.dart | 2 +- lib/widgets/buttons/custom_button.dart | 11 +- lib/widgets/chip/app_custom_chip_widget.dart | 79 ++-- .../date_range_calender.dart | 22 +- lib/widgets/dialogs/confirm_dialog.dart | 4 +- lib/widgets/language_switcher.dart | 3 +- lib/widgets/loading_dialog.dart | 2 +- lib/widgets/map/location_map_widget.dart | 8 +- .../order_tracking/request_tracking.dart | 10 +- pubspec.yaml | 2 +- 178 files changed, 1869 insertions(+), 1431 deletions(-) create mode 100644 assets/images/svg/dark_mode_icon.svg diff --git a/assets/images/svg/dark_mode_icon.svg b/assets/images/svg/dark_mode_icon.svg new file mode 100644 index 00000000..501ece9d --- /dev/null +++ b/assets/images/svg/dark_mode_icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json index 3635e650..e663c2bb 100644 --- a/assets/langs/ar-SA.json +++ b/assets/langs/ar-SA.json @@ -873,7 +873,7 @@ "walkin": "زيارة بدون موعد", "laserClinic": "عيادة الليزر", "continueString": "يكمل", - "covid_info": "تجري مستشفيات د. سليمان الحبيب فحص فيروس كورونا المستجد وتصدر شهادات السفر على مدار الساعة، طوال أيام الأسبوع، وبسرعة ودقة عالية. يمكن للراغبين في الاستفادة من هذه الخدمة زيارة أحد فروع مستشفيات د. سليمان الحبيب وإجراء فحص كورونا خلال بضع دقائق والحصول على النتائج خلال عدة ساعات خدمة فحص فيروس كورونا Covid 19 بتقنية PCR للكشف عن الفيروس وفقاً لأعلى المعايير العالمية وبأحدث أجهزة RT-PCR عالية الدقة (GeneXpert الأمريكي وغيره)، وهي طرق معتمدة من قبل هيئة الغذاء والدواء وكذلك من قبل المركز السعودي للوقاية من الأمراض المُعدية", + "covid_info": "تجري مستشفيات د. سليمان الحبيب فحص فيروس كورونا المستجد وتصدر شهادات السفر على مدار الساعة، طوال أيام الأسبوع، وبسرعة ودقة عالية. يمكن للراغبين في الاستفادة من هذه الخدمة زيارة أحد فروع مستشفيات د. سليمان الحبيب وإجراء فحص كورونا خلال بضع دقائق والحصول على النتائج خلال عدة ساعات خدمة فحص فيروس كورونا Covid 19 بتقنية PCR للكشف عن الفيروس وفقاً لأعلى المعايير العالمية وبأحدث أجهزة RT-PCR عالية الدقة (GeneXpert الأمريكي وغيره)، وهي طرق معتمدة من قبل هيئة الغذاء والدواء وكذلك من قبل المركز السعودي للوقاية من الأمراض المُعدية", "appointmentDetails": "تفاصيل الموعد", "checkingDoctorAvailability": "جاري التحقق من توفر الطبيب...", "cancellingAppointmentPleaseWait": "جاري إلغاء الموعد، يرجى الانتظار...", @@ -1581,5 +1581,6 @@ "invalidInsurance": "لا يمكنك إجراء الدفع عبر الإنترنت لأنه ليس لديك تأمين صالح.", "continueCash": "متابعة الدفع نقدًا", "timeFor": "الوقت", - "hmgPolicies": "سياسات مجموعة الحبيب الطبية" + "hmgPolicies": "سياسات مجموعة الحبيب الطبية", + "darkMode": "الوضع الليلي" } diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json index 15d78000..3f5a1e57 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -853,7 +853,7 @@ "setTheDateRange": "Set The Date Range", "historyFlowchart": "History FlowChart", "to": "to", - "startDate" : "Start Date", + "startDate": "Start Date", "endDate": "End Date", "hmgHospitals": "HMG Hospitals", "hmcMedicalClinic": "HMC Medical Centers", @@ -866,7 +866,7 @@ "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...", @@ -1574,5 +1574,6 @@ "invalidInsurance": "You cannot make online payment because you do not have a valid insurance.", "continueCash": "Continue as cash", "timeFor": "Time For", - "hmgPolicies": "HMG Policies" + "hmgPolicies": "HMG Policies", + "darkMode": "Dark Mode" } diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index e031a976..96a3df06 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -17,15 +17,14 @@ 61243B542EC5FA3700D46FA0 /* PenguinPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B442EC5FA3700D46FA0 /* PenguinPlugin.swift */; }; 61243B562EC5FA3700D46FA0 /* PenguinNavigator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B432EC5FA3700D46FA0 /* PenguinNavigator.swift */; }; 61243B572EC5FA3700D46FA0 /* PenguinViewFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B462EC5FA3700D46FA0 /* PenguinViewFactory.swift */; }; + 68D4441D2F3BBBD900995552 /* PenNavUI.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68D4441A2F3BBBD900995552 /* PenNavUI.xcframework */; }; + 68D4441E2F3BBBD900995552 /* PenNavUI.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 68D4441A2F3BBBD900995552 /* PenNavUI.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 68D4441F2F3BBBDA00995552 /* PenguinINRenderer.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68D4441B2F3BBBD900995552 /* PenguinINRenderer.xcframework */; }; + 68D444202F3BBBDA00995552 /* PenguinINRenderer.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 68D4441B2F3BBBD900995552 /* PenguinINRenderer.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 68D444212F3BBBDA00995552 /* Penguin.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68D4441C2F3BBBD900995552 /* Penguin.xcframework */; }; + 68D444222F3BBBDA00995552 /* Penguin.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 68D4441C2F3BBBD900995552 /* Penguin.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 765A5A8C2F35CD8B0003FF7D /* Penguin.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 765A5A802F35CD730003FF7D /* Penguin.xcframework */; }; - 765A5A8D2F35CD8B0003FF7D /* Penguin.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 765A5A802F35CD730003FF7D /* Penguin.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 765A5A8E2F35CD8B0003FF7D /* PenguinINRenderer.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 765A5A812F35CD730003FF7D /* PenguinINRenderer.xcframework */; }; - 765A5A8F2F35CD8B0003FF7D /* PenguinINRenderer.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 765A5A812F35CD730003FF7D /* PenguinINRenderer.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; - 765A5A902F35CD8B0003FF7D /* PenNavUI.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 765A5A822F35CD730003FF7D /* PenNavUI.xcframework */; }; - 765A5A912F35CD8B0003FF7D /* PenNavUI.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 765A5A822F35CD730003FF7D /* PenNavUI.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 76AA18AE2F3B2A4D00DC8DFC /* ring_30Sec.caf in Resources */ = {isa = PBXBuildFile; fileRef = 76AA18AC2F3B2A4D00DC8DFC /* ring_30Sec.caf */; }; - 76AA18AF2F3B2A4D00DC8DFC /* ring_30Sec.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 76AA18AD2F3B2A4D00DC8DFC /* ring_30Sec.mp3 */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; @@ -49,9 +48,9 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 765A5A8F2F35CD8B0003FF7D /* PenguinINRenderer.xcframework in Embed Frameworks */, - 765A5A8D2F35CD8B0003FF7D /* Penguin.xcframework in Embed Frameworks */, - 765A5A912F35CD8B0003FF7D /* PenNavUI.xcframework in Embed Frameworks */, + 68D444222F3BBBDA00995552 /* Penguin.xcframework in Embed Frameworks */, + 68D444202F3BBBDA00995552 /* PenguinINRenderer.xcframework in Embed Frameworks */, + 68D4441E2F3BBBD900995552 /* PenNavUI.xcframework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -72,15 +71,14 @@ 61243B442EC5FA3700D46FA0 /* PenguinPlugin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinPlugin.swift; sourceTree = ""; }; 61243B452EC5FA3700D46FA0 /* PenguinView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinView.swift; sourceTree = ""; }; 61243B462EC5FA3700D46FA0 /* PenguinViewFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinViewFactory.swift; sourceTree = ""; }; + 68D4441A2F3BBBD900995552 /* PenNavUI.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenNavUI.xcframework; path = Frameworks/PenNavUI.xcframework; sourceTree = ""; }; + 68D4441B2F3BBBD900995552 /* PenguinINRenderer.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenguinINRenderer.xcframework; path = Frameworks/PenguinINRenderer.xcframework; sourceTree = ""; }; + 68D4441C2F3BBBD900995552 /* Penguin.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Penguin.xcframework; path = Frameworks/Penguin.xcframework; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7595037DD52211B91157B0F3 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; - 765A5A802F35CD730003FF7D /* Penguin.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = Penguin.xcframework; sourceTree = ""; }; - 765A5A812F35CD730003FF7D /* PenguinINRenderer.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = PenguinINRenderer.xcframework; sourceTree = ""; }; - 765A5A822F35CD730003FF7D /* PenNavUI.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = PenNavUI.xcframework; sourceTree = ""; }; 769C9BF82E6F106D009F68A9 /* RunnerDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerDebug.entitlements; sourceTree = ""; }; 76AA18AC2F3B2A4D00DC8DFC /* ring_30Sec.caf */ = {isa = PBXFileReference; lastKnownFileType = file; path = ring_30Sec.caf; sourceTree = ""; }; - 76AA18AD2F3B2A4D00DC8DFC /* ring_30Sec.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = ring_30Sec.mp3; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 8E12CEEB8E334EE22D5259D7 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; @@ -99,10 +97,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 765A5A8C2F35CD8B0003FF7D /* Penguin.xcframework in Frameworks */, - 765A5A902F35CD8B0003FF7D /* PenNavUI.xcframework in Frameworks */, - 765A5A8E2F35CD8B0003FF7D /* PenguinINRenderer.xcframework in Frameworks */, + 68D444212F3BBBDA00995552 /* Penguin.xcframework in Frameworks */, DE1EF78253E64BE86845D2CC /* Pods_Runner.framework in Frameworks */, + 68D4441F2F3BBBDA00995552 /* PenguinINRenderer.xcframework in Frameworks */, + 68D4441D2F3BBBD900995552 /* PenNavUI.xcframework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -140,9 +138,9 @@ 766D8CB22EC60BE600D05E07 /* Frameworks */ = { isa = PBXGroup; children = ( - 765A5A802F35CD730003FF7D /* Penguin.xcframework */, - 765A5A812F35CD730003FF7D /* PenguinINRenderer.xcframework */, - 765A5A822F35CD730003FF7D /* PenNavUI.xcframework */, + 68D4441C2F3BBBD900995552 /* Penguin.xcframework */, + 68D4441B2F3BBBD900995552 /* PenguinINRenderer.xcframework */, + 68D4441A2F3BBBD900995552 /* PenNavUI.xcframework */, D562310E31D1DDEFA02A6C12 /* Pods_Runner.framework */, ); name = Frameworks; @@ -194,7 +192,6 @@ isa = PBXGroup; children = ( 76AA18AC2F3B2A4D00DC8DFC /* ring_30Sec.caf */, - 76AA18AD2F3B2A4D00DC8DFC /* ring_30Sec.mp3 */, 61243B412EC5FA3700D46FA0 /* Helper */, 61243B472EC5FA3700D46FA0 /* Penguin */, 769C9BF82E6F106D009F68A9 /* RunnerDebug.entitlements */, @@ -307,7 +304,6 @@ buildActionMask = 2147483647; files = ( 76AA18AE2F3B2A4D00DC8DFC /* ring_30Sec.caf in Resources */, - 76AA18AF2F3B2A4D00DC8DFC /* ring_30Sec.mp3 in Resources */, 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 478CFA942E638C8E0064F3D7 /* GoogleService-Info.plist in Resources */, diff --git a/lib/core/app_assets.dart b/lib/core/app_assets.dart index 942eb46b..efe62775 100644 --- a/lib/core/app_assets.dart +++ b/lib/core/app_assets.dart @@ -331,6 +331,7 @@ class AppAssets { static const String doctorResponseIcon = '$svgBasePath/doctor_response_icon.svg'; static const String changeLanguageHomePageIcon = '$svgBasePath/change_language_home_page.svg'; static const String aiOverView = '$svgBasePath/ai_overview.svg'; + static const String darkModeIcon = '$svgBasePath/dark_mode_icon.svg'; // PNGS // static const String hmgLogo = '$pngBasePath/hmg_logo.png'; diff --git a/lib/core/dependencies.dart b/lib/core/dependencies.dart index e7ac0515..1b3bca61 100644 --- a/lib/core/dependencies.dart +++ b/lib/core/dependencies.dart @@ -224,7 +224,7 @@ class AppDependencies { authenticationRepo: getIt(), cacheService: getIt(), navigationService: getIt(), dialogService: getIt(), appState: getIt(), errorHandlerService: getIt(), localAuthService: getIt()), ); - getIt.registerLazySingleton(() => ProfileSettingsViewModel()); + getIt.registerLazySingleton(() => ProfileSettingsViewModel(cacheService: getIt())); getIt.registerLazySingleton(() => DateRangeSelectorRangeViewModel()); diff --git a/lib/core/utils/loading_utils.dart b/lib/core/utils/loading_utils.dart index bd24d30c..1a58a852 100644 --- a/lib/core/utils/loading_utils.dart +++ b/lib/core/utils/loading_utils.dart @@ -25,7 +25,7 @@ class LoadingUtils { showDialog( barrierDismissible: barrierDismissible, context: context, - barrierColor: AppColors.blackColor.withOpacity(0.5), + barrierColor: AppColors.textColor.withOpacity(0.5), useRootNavigator: false, useSafeArea: false, builder: (BuildContext context) { diff --git a/lib/core/utils/utils.dart b/lib/core/utils/utils.dart index 8b5b2849..fa76e46e 100644 --- a/lib/core/utils/utils.dart +++ b/lib/core/utils/utils.dart @@ -91,7 +91,7 @@ class Utils { toastLength: longDuration ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT, gravity: ToastGravity.BOTTOM, timeInSecForIosWeb: 1, - backgroundColor: AppColors.blackColor, + backgroundColor: AppColors.textColor, textColor: AppColors.whiteColor, fontSize: 16.0); } @@ -268,7 +268,7 @@ class Utils { _isLoadingVisible = true; showDialog( context: navigationService.navigatorKey.currentContext!, - barrierColor: AppColors.blackColor, + barrierColor: AppColors.textColor, builder: (BuildContext context) => LoadingDialog(), ) .then((value) { @@ -369,7 +369,7 @@ class Utils { Lottie.asset(AppAnimations.loadingAnimation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 80.h, height: 80.h, fit: BoxFit.fill), SizedBox(height: 8.h), - (loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.blackColor, isCenter: true), + (loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.textColor, isCenter: true), SizedBox(height: 8.h), ], ).center; @@ -382,7 +382,7 @@ class Utils { children: [ Lottie.asset(AppAnimations.checkmark, repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill), SizedBox(height: 8.h), - (loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.blackColor), + (loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.textColor), SizedBox(height: 8.h), ], ).center; @@ -396,7 +396,7 @@ class Utils { Lottie.asset(AppAnimations.errorAnimation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill), SizedBox(height: 8.h), - (loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.blackColor), + (loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.textColor), SizedBox(height: 8.h), ], ).center; @@ -418,7 +418,7 @@ class Utils { Lottie.asset(AppAnimations.warningAnimation, repeat: false, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill), SizedBox(height: 8.h), - (loadingText ?? LocaleKeys.loadingText.tr()).toText15(color: AppColors.blackColor, letterSpacing: 0), + (loadingText ?? LocaleKeys.loadingText.tr()).toText15(color: AppColors.textColor, letterSpacing: 0), SizedBox(height: 16.h), bodyWidget ?? SizedBox.shrink(), SizedBox(height: 16.h), @@ -802,7 +802,7 @@ class Utils { double? letterSpacing, FontWeight? fontWeight, Color iconColor = AppColors.textColor, - Color textColor = AppColors.blackColor, + Color textColor = AppColors.textColor, bool isSaudiCurrency = true, bool isExpanded = true, }) { diff --git a/lib/extensions/string_extensions.dart b/lib/extensions/string_extensions.dart index 792bff50..46fe995e 100644 --- a/lib/extensions/string_extensions.dart +++ b/lib/extensions/string_extensions.dart @@ -5,9 +5,20 @@ import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/dependencies.dart'; import 'package:hmg_patient_app_new/core/enums.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; +import 'package:hmg_patient_app_new/services/navigation_service.dart'; import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:intl/intl.dart'; +/// Global context from the navigator key — available after first route is built. +/// Used by toText* extensions to resolve theme-aware colors. +BuildContext? get _globalContext => getIt.get().context; + +Color get _defaultTextColor { + final ctx = _globalContext; + if (ctx == null) return AppColors.textColor; + return ctx.textColor; +} + extension CapExtension on String { String get toCamelCase => "${this[0].toUpperCase()}${substring(1)}"; @@ -31,61 +42,40 @@ extension EmailValidator on String { fontSize: 8.f, fontStyle: fontStyle ?? FontStyle.normal, fontWeight: fontWeight ?? (isBold ? FontWeight.bold : FontWeight.normal), - color: color ?? AppColors.blackColor, + color: color ?? _defaultTextColor, letterSpacing: 0, ), ); - Widget toText10( - {bool isEnglishOnly = false, - Color? color, - FontWeight? weight, - bool isBold = false, - bool isUnderLine = false, - bool isCenter = false, - int? maxlines, - FontStyle? fontStyle, - TextOverflow? textOverflow, - double letterSpacing = 0}) => - Text( + Widget toText9({Color? color, FontWeight? weight, bool isBold = false, bool isUnderLine = false, bool isCenter = false, int? maxlines, FontStyle? fontStyle, TextOverflow? textOverflow, double letterSpacing = 0}) => Text( this, textAlign: isCenter ? TextAlign.center : null, maxLines: maxlines, overflow: textOverflow, style: TextStyle( - fontSize: 10.f, + fontSize: 9.f, fontStyle: fontStyle ?? FontStyle.normal, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal), - color: color ?? AppColors.blackColor, + color: color ?? _defaultTextColor, letterSpacing: letterSpacing, decoration: isUnderLine ? TextDecoration.underline : null, - fontFamily: isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins', - decorationColor: color ?? AppColors.blackColor), + decorationColor: color ?? _defaultTextColor), ); - Widget toText9( - {Color? color, - FontWeight? weight, - bool isBold = false, - bool isUnderLine = false, - bool isCenter = false, - int? maxlines, - FontStyle? fontStyle, - TextOverflow? textOverflow, - double letterSpacing = 0}) => - Text( + Widget toText10({bool isEnglishOnly = false, Color? color, FontWeight? weight, bool isBold = false, bool isUnderLine = false, bool isCenter = false, int? maxlines, FontStyle? fontStyle, TextOverflow? textOverflow, double letterSpacing = 0}) => Text( this, textAlign: isCenter ? TextAlign.center : null, maxLines: maxlines, overflow: textOverflow, style: TextStyle( - fontSize: 9.f, + fontSize: 10.f, fontStyle: fontStyle ?? FontStyle.normal, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal), - color: color ?? AppColors.blackColor, + color: color ?? _defaultTextColor, letterSpacing: letterSpacing, decoration: isUnderLine ? TextDecoration.underline : null, - decorationColor: color ?? AppColors.blackColor), + fontFamily: isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins', + decorationColor: color ?? _defaultTextColor), ); Widget toText11({Color? color, FontWeight? weight, bool isUnderLine = false, bool isCenter = false, bool isBold = false, int maxLine = 0, double letterSpacing = 0}) => Text( @@ -96,33 +86,23 @@ extension EmailValidator on String { style: TextStyle( fontSize: 11.f, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal), - color: color ?? AppColors.blackColor, + color: color ?? _defaultTextColor, letterSpacing: letterSpacing, decoration: isUnderLine ? TextDecoration.underline : null, ), ); - Widget toText12( - {bool isEnglishOnly = false, Color? color, - bool isUnderLine = false, - TextAlign textAlignment = TextAlign.start, - bool isBold = false, - FontWeight? fontWeight, - bool isCenter = false, - double? height, - double? letterSpacing, - int maxLine = 0}) => - Text( + Widget toText12({bool isEnglishOnly = false, Color? color, bool isUnderLine = false, TextAlign textAlignment = TextAlign.start, bool isBold = false, FontWeight? fontWeight, bool isCenter = false, double? height, double? letterSpacing, int maxLine = 0}) => Text( this, textAlign: isCenter ? TextAlign.center : textAlignment, maxLines: (maxLine > 0) ? maxLine : null, style: TextStyle( fontSize: 12.f, fontWeight: fontWeight ?? (isBold ? FontWeight.bold : FontWeight.normal), - color: color ?? AppColors.blackColor, + color: color ?? _defaultTextColor, letterSpacing: letterSpacing ?? 0, height: height, - decorationColor: isUnderLine ? AppColors.blackColor : null, + decorationColor: isUnderLine ? color ?? _defaultTextColor : null, decoration: isUnderLine ? TextDecoration.underline : null, fontFamily: isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins', ), @@ -136,25 +116,13 @@ extension EmailValidator on String { style: TextStyle( fontSize: 12.f, fontWeight: isBold ? FontWeight.bold : FontWeight.normal, - color: color ?? AppColors.blackColor, + color: color ?? _defaultTextColor, letterSpacing: 0, decoration: isUnderLine ? TextDecoration.underline : null, ), ); - Widget toTextAuto({ - Color? color, - bool isUnderLine = false, - bool isBold = false, - bool isCenter = false, - int maxLine = 0, - double fontSize = 12, - double letterSpacing = 0.64, - double height = 1, - TextOverflow? textOverflow, - FontWeight? fontWeight, - }) => - AutoSizeText( + Widget toTextAuto({Color? color, bool isUnderLine = false, bool isBold = false, bool isCenter = false, int maxLine = 0, double fontSize = 12, double letterSpacing = 0.64, double height = 1, TextOverflow? textOverflow, FontWeight? fontWeight}) => AutoSizeText( this, textAlign: isCenter ? TextAlign.center : null, maxLines: (maxLine > 0) ? maxLine : null, @@ -164,7 +132,7 @@ extension EmailValidator on String { style: TextStyle( fontSize: fontSize, fontWeight: fontWeight ?? (isBold ? FontWeight.bold : FontWeight.normal), - color: color ?? AppColors.blackColor, + color: color ?? _defaultTextColor, letterSpacing: letterSpacing, decoration: isUnderLine ? TextDecoration.underline : null, ), @@ -177,38 +145,25 @@ extension EmailValidator on String { style: TextStyle( fontSize: 13.f, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal), - color: color ?? AppColors.blackColor, + color: color ?? _defaultTextColor, letterSpacing: letterSpacing, decoration: isUnderLine ? TextDecoration.underline : null), ); - Widget toText14({ - bool isEnglishOnly = false, - Color? color, - bool isUnderLine = false, - bool isBold = false, - bool isCenter = false, - FontWeight? weight, - int? maxlines, - double? letterSpacing = 0, - double? height, - String? fontFamily, - TextOverflow? textOverflow, - }) => - Text( + Widget toText14({bool isEnglishOnly = false, Color? color, bool isUnderLine = false, bool isBold = false, bool isCenter = false, FontWeight? weight, int? maxlines, double? letterSpacing = 0, double? height, String? fontFamily, TextOverflow? textOverflow}) => Text( this, textAlign: isCenter ? TextAlign.center : null, maxLines: maxlines, overflow: textOverflow, style: TextStyle( - color: color ?? AppColors.blackColor, + color: color ?? _defaultTextColor, fontSize: 14.f, letterSpacing: letterSpacing, height: height, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal), decoration: isUnderLine ? TextDecoration.underline : null, fontFamily: fontFamily ?? (isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'), - decorationColor: color ?? AppColors.blackColor), + decorationColor: color ?? _defaultTextColor), ); Widget toText15({Color? color, bool isUnderLine = false, bool isBold = false, bool isCenter = false, FontWeight? weight, int? maxlines, double? letterSpacing = -1}) => Text( @@ -216,32 +171,19 @@ extension EmailValidator on String { textAlign: isCenter ? TextAlign.center : null, maxLines: maxlines, style: TextStyle( - color: color ?? AppColors.blackColor, + color: color ?? _defaultTextColor, fontSize: 15.f, letterSpacing: letterSpacing, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal), decoration: isUnderLine ? TextDecoration.underline : null), ); - Widget toText16({bool isEnglishOnly = false, Color? color, - bool isUnderLine = false, - bool isBold = false, - bool isCenter = false, - int? maxlines, - double? height, - TextAlign? textAlign, - FontWeight? weight, - TextOverflow? textOverflow, - String? fontFamily, - double? letterSpacing = -0.4, - Color decorationColor = AppColors.errorColor}) => - Text( + Widget toText16({bool isEnglishOnly = false, Color? color, bool isUnderLine = false, bool isBold = false, bool isCenter = false, int? maxlines, double? height, TextAlign? textAlign, FontWeight? weight, TextOverflow? textOverflow, String? fontFamily, double? letterSpacing = -0.4, Color? decorationColor}) => Text( this, maxLines: maxlines, textAlign: isCenter ? textAlign ?? TextAlign.center : null, - // locale: Locale('en', 'US'), style: TextStyle( - color: color ?? AppColors.blackColor, + color: color ?? _defaultTextColor, fontSize: 16.f, letterSpacing: letterSpacing, height: height, @@ -255,74 +197,93 @@ extension EmailValidator on String { Widget toText17({bool isEnglishOnly = false, Color? color, bool isBold = false, bool isCenter = false}) => Text( this, textAlign: isCenter ? TextAlign.center : null, - style: TextStyle(color: color ?? AppColors.blackColor, fontSize: 17.f, letterSpacing: -1, fontWeight: isBold ? FontWeight.bold : FontWeight.normal, fontFamily: isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'), + style: TextStyle( + color: color ?? _defaultTextColor, + fontSize: 17.f, + letterSpacing: -1, + fontWeight: isBold ? FontWeight.bold : FontWeight.normal, + fontFamily: isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'), ); Widget toText18({Color? color, FontWeight? weight, bool isBold = false, bool isCenter = false, int? maxlines, TextOverflow? textOverflow}) => Text( + this, maxLines: maxlines, textAlign: isCenter ? TextAlign.center : null, - this, overflow: textOverflow, - style: TextStyle(fontSize: 18.f, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal), color: color ?? AppColors.blackColor, letterSpacing: -0.4), + style: TextStyle(fontSize: 18.f, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal), color: color ?? _defaultTextColor, letterSpacing: -0.4), ); Widget toText19({Color? color, bool isBold = false}) => Text( this, - style: TextStyle(fontSize: 19.f, fontWeight: isBold ? FontWeight.bold : FontWeight.normal, color: color ?? AppColors.blackColor, letterSpacing: -0.4), + style: TextStyle(fontSize: 19.f, fontWeight: isBold ? FontWeight.bold : FontWeight.normal, color: color ?? _defaultTextColor, letterSpacing: -0.4), ); - Widget toText20({ - Color? color, - FontWeight? weight, - bool isBold = false, - }) => - Text( + Widget toText20({Color? color, FontWeight? weight, bool isBold = false}) => Text( this, - style: TextStyle(fontSize: 20.f, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal), color: color ?? AppColors.blackColor, letterSpacing: -0.4), + style: TextStyle(fontSize: 20.f, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal), color: color ?? _defaultTextColor, letterSpacing: -0.4), ); Widget toText21({Color? color, bool isBold = false, FontWeight? weight, int? maxlines}) => Text( this, maxLines: maxlines, - style: TextStyle(color: color ?? AppColors.blackColor, fontSize: 21.f, letterSpacing: -1, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal)), + style: TextStyle(color: color ?? _defaultTextColor, fontSize: 21.f, letterSpacing: -1, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal)), ); Widget toText22({Color? color, bool isBold = false, bool isCenter = false}) => Text( this, textAlign: isCenter ? TextAlign.center : null, - style: TextStyle(height: 1, color: color ?? AppColors.blackColor, fontSize: 22.f, letterSpacing: -1, fontWeight: isBold ? FontWeight.bold : FontWeight.normal), + style: TextStyle(height: 1, color: color ?? _defaultTextColor, fontSize: 22.f, letterSpacing: -1, fontWeight: isBold ? FontWeight.bold : FontWeight.normal), ); Widget toText24({Color? color, bool isBold = false, bool isCenter = false, FontWeight? fontWeight, double? letterSpacing}) => Text( this, textAlign: isCenter ? TextAlign.center : null, style: TextStyle( - height: 23 / 24, color: color ?? AppColors.blackColor, fontSize: 24.f, letterSpacing: letterSpacing ?? -1, fontWeight: isBold ? FontWeight.bold : fontWeight ?? FontWeight.normal), + height: 23 / 24, + color: color ?? _defaultTextColor, + fontSize: 24.f, + letterSpacing: letterSpacing ?? -1, + fontWeight: isBold ? FontWeight.bold : fontWeight ?? FontWeight.normal), ); Widget toText26({Color? color, bool isBold = false, double? height, bool isCenter = false, FontWeight? weight, double? letterSpacing}) => Text( this, textAlign: isCenter ? TextAlign.center : null, style: TextStyle( - height: height ?? 23 / 26, color: color ?? AppColors.blackColor, fontSize: 26.f, letterSpacing: letterSpacing ?? -1, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal)), + height: height ?? 23 / 26, + color: color ?? _defaultTextColor, + fontSize: 26.f, + letterSpacing: letterSpacing ?? -1, + fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal)), ); Widget toText28({bool isEnglishOnly = false, Color? color, bool isBold = false, double? height, bool isCenter = false, double? letterSpacing}) => Text( this, textAlign: isCenter ? TextAlign.center : null, - style: TextStyle(height: height ?? 23 / 28, color: color ?? AppColors.blackColor, fontSize: 28.f, letterSpacing: letterSpacing ?? -1, fontWeight: isBold ? FontWeight.bold : FontWeight.normal, fontFamily: isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'), + style: TextStyle( + height: height ?? 23 / 28, + color: color ?? _defaultTextColor, + fontSize: 28.f, + letterSpacing: letterSpacing ?? -1, + fontWeight: isBold ? FontWeight.bold : FontWeight.normal, + fontFamily: isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'), ); Widget toText32({bool isEnglishOnly = false, FontWeight? weight, Color? color, bool isBold = false, bool isCenter = false}) => Text( this, textAlign: isCenter ? TextAlign.center : null, style: TextStyle( - height: 32 / 32, color: color ?? AppColors.blackColor, fontSize: 32.f, letterSpacing: -1, fontFamily: isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins', fontWeight: isBold ? FontWeight.bold : weight ?? FontWeight.normal), + height: 32 / 32, + color: color ?? _defaultTextColor, + fontSize: 32.f, + letterSpacing: -1, + fontFamily: isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins', + fontWeight: isBold ? FontWeight.bold : weight ?? FontWeight.normal), ); Widget toText44({Color? color, bool isBold = false}) => Text( this, - style: TextStyle(height: 32 / 32, color: color ?? AppColors.blackColor, fontSize: 44.f, letterSpacing: -1, fontWeight: isBold ? FontWeight.bold : FontWeight.normal), + style: TextStyle(height: 32 / 32, color: color ?? _defaultTextColor, fontSize: 44.f, letterSpacing: -1, fontWeight: isBold ? FontWeight.bold : FontWeight.normal), ); Widget toSectionHeading({String upperHeading = "", String lowerHeading = ""}) { @@ -331,7 +292,6 @@ extension EmailValidator on String { String heading = this; if (heading.isNotEmpty) { List data = heading.split(" "); - if (data.length > 1) { upper = data[0]; data.removeAt(0); @@ -340,13 +300,8 @@ extension EmailValidator on String { lower = data[0]; } } - if (upperHeading.isNotEmpty) { - upper = upperHeading; - } - if (lowerHeading.isNotEmpty) { - lower = lowerHeading; - } - + if (upperHeading.isNotEmpty) upper = upperHeading; + if (lowerHeading.isNotEmpty) lower = lowerHeading; return Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, @@ -370,32 +325,19 @@ extension EmailValidator on String { String getMonth(int month) { switch (month) { - case 1: - return "January"; - case 2: - return "February"; - case 3: - return "March"; - case 4: - return "April"; - case 5: - return "May"; - case 6: - return "June"; - case 7: - return "July"; - case 8: - return "August"; - case 9: - return "September"; - case 10: - return "October"; - case 11: - return "November"; - case 12: - return "December"; - default: - return ""; + case 1: return "January"; + case 2: return "February"; + case 3: return "March"; + case 4: return "April"; + case 5: return "May"; + case 6: return "June"; + case 7: return "July"; + case 8: return "August"; + case 9: return "September"; + case 10: return "October"; + case 11: return "November"; + case 12: return "December"; + default: return ""; } } @@ -409,24 +351,24 @@ extension EmailValidator on String { } extension DynamicTextStyleExtension on BuildContext { - TextStyle dynamicTextStyle( - {double? fontSize, - FontWeight? fontWeight, - Color? color, - double? letterSpacing, - double? wordSpacing, - double? height, - List? shadows, - Color? backgroundColor, - TextDecoration? decoration, - Color? decorationColor, - TextDecorationStyle? decorationStyle, - double? decorationThickness, - Locale? locale, - TextBaseline? textBaseline, - FontStyle? fontStyle, - String? fontFamily, - bool isLanguageSwitcher = false}) { + TextStyle dynamicTextStyle({ + double? fontSize, + FontWeight? fontWeight, + Color? color, + double? letterSpacing, + double? wordSpacing, + double? height, + List? shadows, + Color? backgroundColor, + TextDecoration? decoration, + Color? decorationColor, + TextDecorationStyle? decorationStyle, + double? decorationThickness, + Locale? locale, + TextBaseline? textBaseline, + FontStyle? fontStyle, + String? fontFamily, + }) { AppState appState = getIt.get(); final family = appState.getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'; return TextStyle( @@ -450,53 +392,32 @@ extension DynamicTextStyleExtension on BuildContext { } } -class FontUtils { - /// Get the appropriate font family based on the current language - static bool getFontFamily(BuildContext context) { - // final projectViewModel = Provider.of(context, listen: false); - return true; - } - - /// Get the appropriate font family for a specific language - static String getFontFamilyForLanguage(bool isArabic) { - return isArabic ? 'GESSTwo' : 'Poppins'; - } -} - extension CountryExtension on CountryEnum { String get displayName { switch (this) { - case CountryEnum.saudiArabia: - return "Kingdom Of Saudi Arabia"; - case CountryEnum.unitedArabEmirates: - return "United Arab Emirates"; + case CountryEnum.saudiArabia: return "Kingdom Of Saudi Arabia"; + case CountryEnum.unitedArabEmirates: return "United Arab Emirates"; } } String get nameArabic { switch (this) { - case CountryEnum.saudiArabia: - return "المملكة العربية السعودية"; - case CountryEnum.unitedArabEmirates: - return "الإمارات العربية المتحدة"; + case CountryEnum.saudiArabia: return "المملكة العربية السعودية"; + case CountryEnum.unitedArabEmirates: return "الإمارات العربية المتحدة"; } } String get iconPath { switch (this) { - case CountryEnum.saudiArabia: - return AppAssets.ksa; - case CountryEnum.unitedArabEmirates: - return AppAssets.uae; + case CountryEnum.saudiArabia: return AppAssets.ksa; + case CountryEnum.unitedArabEmirates: return AppAssets.uae; } } String get countryCode { switch (this) { - case CountryEnum.saudiArabia: - return "966"; - case CountryEnum.unitedArabEmirates: - return "971"; + case CountryEnum.saudiArabia: return "966"; + case CountryEnum.unitedArabEmirates: return "971"; } } @@ -516,30 +437,22 @@ extension CountryExtension on CountryEnum { extension GenderTypeExtension on GenderTypeEnum { String get value => this == GenderTypeEnum.male ? "M" : "F"; - String get type => this == GenderTypeEnum.male ? "Male" : "Female"; - String get typeAr => this == GenderTypeEnum.male ? "ذكر" : "أنثى"; static GenderTypeEnum? fromValue(String? value) { switch (value) { - case "M": - return GenderTypeEnum.male; - case "F": - return GenderTypeEnum.female; - default: - return null; + case "M": return GenderTypeEnum.male; + case "F": return GenderTypeEnum.female; + default: return null; } } static GenderTypeEnum? fromType(String? type) { switch (type) { - case "Male": - return GenderTypeEnum.male; - case "Female": - return GenderTypeEnum.female; - default: - return null; + case "Male": return GenderTypeEnum.male; + case "Female": return GenderTypeEnum.female; + default: return null; } } } @@ -547,70 +460,48 @@ extension GenderTypeExtension on GenderTypeEnum { extension MaritalStatusTypeExtension on MaritalStatusTypeEnum { String get value { switch (this) { - case MaritalStatusTypeEnum.single: - return "U"; - case MaritalStatusTypeEnum.married: - return "M"; - case MaritalStatusTypeEnum.divorced: - return "D"; - case MaritalStatusTypeEnum.widowed: - return "W"; + case MaritalStatusTypeEnum.single: return "U"; + case MaritalStatusTypeEnum.married: return "M"; + case MaritalStatusTypeEnum.divorced: return "D"; + case MaritalStatusTypeEnum.widowed: return "W"; } } String get type { switch (this) { - case MaritalStatusTypeEnum.single: - return "Single"; - case MaritalStatusTypeEnum.married: - return "Married"; - case MaritalStatusTypeEnum.divorced: - return "Divorced"; - case MaritalStatusTypeEnum.widowed: - return "Widowed"; + case MaritalStatusTypeEnum.single: return "Single"; + case MaritalStatusTypeEnum.married: return "Married"; + case MaritalStatusTypeEnum.divorced: return "Divorced"; + case MaritalStatusTypeEnum.widowed: return "Widowed"; } } String get typeAr { switch (this) { - case MaritalStatusTypeEnum.single: - return "أعزب"; - case MaritalStatusTypeEnum.married: - return "متزوج"; - case MaritalStatusTypeEnum.divorced: - return "مطلق"; - case MaritalStatusTypeEnum.widowed: - return "أرمل"; + case MaritalStatusTypeEnum.single: return "أعزب"; + case MaritalStatusTypeEnum.married: return "متزوج"; + case MaritalStatusTypeEnum.divorced: return "مطلق"; + case MaritalStatusTypeEnum.widowed: return "أرمل"; } } static MaritalStatusTypeEnum? fromValue(String? value) { switch (value) { - case "U": - return MaritalStatusTypeEnum.single; - case "M": - return MaritalStatusTypeEnum.married; - case "D": - return MaritalStatusTypeEnum.divorced; - case "W": - return MaritalStatusTypeEnum.widowed; - default: - return null; + case "U": return MaritalStatusTypeEnum.single; + case "M": return MaritalStatusTypeEnum.married; + case "D": return MaritalStatusTypeEnum.divorced; + case "W": return MaritalStatusTypeEnum.widowed; + default: return null; } } static MaritalStatusTypeEnum? fromType(String? type) { switch (type) { - case "Single": - return MaritalStatusTypeEnum.single; - case "Married": - return MaritalStatusTypeEnum.married; - case "Divorced": - return MaritalStatusTypeEnum.divorced; - case "Widowed": - return MaritalStatusTypeEnum.widowed; - default: - return null; + case "Single": return MaritalStatusTypeEnum.single; + case "Married": return MaritalStatusTypeEnum.married; + case "Divorced": return MaritalStatusTypeEnum.divorced; + case "Widowed": return MaritalStatusTypeEnum.widowed; + default: return null; } } } diff --git a/lib/extensions/widget_extensions.dart b/lib/extensions/widget_extensions.dart index 58754dc9..e29706e0 100644 --- a/lib/extensions/widget_extensions.dart +++ b/lib/extensions/widget_extensions.dart @@ -152,26 +152,18 @@ extension SmoothContainerExtension on ShapeBorder { BorderSide? side, BorderRadius? customBorder, bool hasShadow = false, + BuildContext? context, }) { final bgColor = backgroundColor ?? color; + final resolvedSide = side ?? (BorderSide(color: AppColors.dark.cardDarkBorderColor, width: 1)); return ShapeDecoration( - color: isDisabled ? bgColor.withOpacity(0.5) : bgColor, + color: isDisabled ? bgColor.withValues(alpha: 0.5) : bgColor, shape: SmoothRectangleBorder( borderRadius: customBorder ?? BorderRadius.circular(borderRadius ?? 0), smoothness: 1, - side: side ?? BorderSide.none, + side: resolvedSide, ), - shadows: - // hasShadow - // ? [ - // BoxShadow( - // color: const Color(0xff000000).withOpacity(.05), - // blurRadius: 32, - // offset: const Offset(0, 0), - // ) - // ] - // : - [], + shadows: [], ); } } @@ -236,28 +228,28 @@ extension ChipTypeEnumExtension on ChipTypeEnum { case ChipTypeEnum.warning: return AppColors.warningColor; // Replace with your actual color case ChipTypeEnum.lightBg: - return AppColors.chipPrimaryRedBorderColor; // Replace with your actual color + return AppColors.primaryRedColor; // Replace with your actual color case ChipTypeEnum.primaryRed: - return AppColors.chipSecondaryLightRedColor; // Replace with your actual color + return AppColors.secondaryLightRedColor; // Replace with your actual color } } Color get backgroundColor { switch (this) { case ChipTypeEnum.success: - return AppColors.successLightColor; // Replace with your actual color + return AppColors.successColor; // Replace with your actual color case ChipTypeEnum.error: - return AppColors.errorLightColor; // Replace with your actual color + return AppColors.primaryRedColor; // Replace with your actual color case ChipTypeEnum.alert: return AppColors.alertLightColor; // Replace with your actual color case ChipTypeEnum.info: - return AppColors.infoLightColor; // Replace with your actual color + return AppColors.infoColor; // Replace with your actual color case ChipTypeEnum.warning: - return AppColors.warningLightColor; // Replace with your actual color + return AppColors.warningColor; // Replace with your actual color case ChipTypeEnum.lightBg: - return AppColors.chipSecondaryLightRedColor; // Replace with your actual color + return AppColors.secondaryLightRedColor; // Replace with your actual color case ChipTypeEnum.primaryRed: - return AppColors.chipPrimaryRedBorderColor; + return AppColors.primaryRedColor; } } } diff --git a/lib/features/authentication/widgets/otp_verification_screen.dart b/lib/features/authentication/widgets/otp_verification_screen.dart index 7ddccda8..60b12c9b 100644 --- a/lib/features/authentication/widgets/otp_verification_screen.dart +++ b/lib/features/authentication/widgets/otp_verification_screen.dart @@ -357,7 +357,7 @@ class OTPWidgetState extends State with SingleTickerProviderStateMixi } else if (text.length == widget.maxLength) { pinBoxColor = AppColors.successColor; } else if (i < text.length) { - pinBoxColor = AppColors.blackBgColor; + pinBoxColor = AppColors.textColor; } else { pinBoxColor = widget.pinBoxColor; } diff --git a/lib/features/blood_donation/widgets/hospital_selection.dart b/lib/features/blood_donation/widgets/hospital_selection.dart index 9889410c..ad838e40 100644 --- a/lib/features/blood_donation/widgets/hospital_selection.dart +++ b/lib/features/blood_donation/widgets/hospital_selection.dart @@ -55,7 +55,7 @@ class HospitalBottomSheetBodySelection extends StatelessWidget { ), Transform.flip( flipX: appState.isArabic(), - child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.blackColor, width: 40.h, height: 40.h, fit: BoxFit.contain), + child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.textColor, width: 40.h, height: 40.h, fit: BoxFit.contain), ), ], ).paddingSymmetrical(16.h, 16.h), @@ -75,7 +75,7 @@ class HospitalBottomSheetBodySelection extends StatelessWidget { children: [ Utils.buildSvgWithAssets(icon: AppAssets.hmg).paddingOnly(right: 10), Expanded( - child: Text(hospital.projectName ?? "", style: TextStyle(fontWeight: FontWeight.w600, fontSize: 16, color: AppColors.blackColor)), + child: Text(hospital.projectName ?? "", style: TextStyle(fontWeight: FontWeight.w600, fontSize: 16, color: AppColors.textColor)), ) ], ); diff --git a/lib/features/hmg_services/models/ui_models/vital_sign_ui_model.dart b/lib/features/hmg_services/models/ui_models/vital_sign_ui_model.dart index 45b0ab65..baa4dc83 100644 --- a/lib/features/hmg_services/models/ui_models/vital_sign_ui_model.dart +++ b/lib/features/hmg_services/models/ui_models/vital_sign_ui_model.dart @@ -41,9 +41,9 @@ class VitalSignUiModel { if (s.contains('high')) { return const VitalSignUiModel( - iconBg: AppColors.chipSecondaryLightRedColor, + iconBg: AppColors.secondaryLightRedColor, iconFg: AppColors.primaryRedColor, - chipBg: AppColors.chipSecondaryLightRedColor, + chipBg: AppColors.secondaryLightRedColor, chipFg: AppColors.primaryRedColor, ); } diff --git a/lib/features/lab/lab_view_model.dart b/lib/features/lab/lab_view_model.dart index cd062b9e..885c6ad8 100644 --- a/lib/features/lab/lab_view_model.dart +++ b/lib/features/lab/lab_view_model.dart @@ -675,9 +675,9 @@ class LabViewModel extends ChangeNotifier { Color getColor(String flag) { switch (flag) { case 'LCL': - return AppColors.criticalLowAndHigh; + return AppColors.primaryRedColor; case 'CL': - return AppColors.criticalLowAndHigh; + return AppColors.primaryRedColor; case 'L': return AppColors.highAndLow; case 'N': @@ -685,9 +685,9 @@ class LabViewModel extends ChangeNotifier { case 'H': return AppColors.highAndLow; case 'CH': - return AppColors.criticalLowAndHigh; + return AppColors.primaryRedColor; case 'HCH': - return AppColors.criticalLowAndHigh; + return AppColors.primaryRedColor; default: return Colors.grey; } diff --git a/lib/features/profile_settings/profile_settings_view_model.dart b/lib/features/profile_settings/profile_settings_view_model.dart index 61acb260..7fe44978 100644 --- a/lib/features/profile_settings/profile_settings_view_model.dart +++ b/lib/features/profile_settings/profile_settings_view_model.dart @@ -1,8 +1,27 @@ import 'package:flutter/foundation.dart'; +import 'package:hmg_patient_app_new/services/cache_service.dart'; + +const _kDarkModeKey = 'is_dark_mode_enabled'; class ProfileSettingsViewModel extends ChangeNotifier { + final CacheService _cacheService; + + ProfileSettingsViewModel({required CacheService cacheService}) + : _cacheService = cacheService { + _isDarkMode = _cacheService.getBool(key: _kDarkModeKey) ?? false; + } + + bool _isDarkMode = false; + + bool get isDarkMode => _isDarkMode; + + Future toggleDarkMode() async { + _isDarkMode = !_isDarkMode; + await _cacheService.saveBool(key: _kDarkModeKey, value: _isDarkMode); + notifyListeners(); + } - void notify(){ + void notify() { notifyListeners(); } } diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart index 78d7f8a3..7974eaf5 100644 --- a/lib/generated/locale_keys.g.dart +++ b/lib/generated/locale_keys.g.dart @@ -1574,6 +1574,7 @@ abstract class LocaleKeys { static const invalidInsurance = 'invalidInsurance'; static const continueCash = 'continueCash'; static const hmgPolicies = 'hmgPolicies'; + static const darkMode = 'darkMode'; static const timeFor = 'Time for'; } diff --git a/lib/main.dart b/lib/main.dart index cff0d043..b9ae6981 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -10,15 +10,16 @@ import 'package:flutter/services.dart'; import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/dependencies.dart'; import 'package:hmg_patient_app_new/core/utils/utils.dart'; +import 'package:hmg_patient_app_new/features/active_prescriptions/active_prescriptions_view_model.dart'; import 'package:hmg_patient_app_new/features/ask_doctor/ask_doctor_view_model.dart'; import 'package:hmg_patient_app_new/features/authentication/authentication_view_model.dart'; import 'package:hmg_patient_app_new/features/blood_donation/blood_donation_view_model.dart'; -import 'package:hmg_patient_app_new/features/active_prescriptions/active_prescriptions_view_model.dart'; import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart'; import 'package:hmg_patient_app_new/features/contact_us/contact_us_view_model.dart'; import 'package:hmg_patient_app_new/features/doctor_filter/doctor_filter_view_model.dart'; import 'package:hmg_patient_app_new/features/emergency_services/emergency_services_view_model.dart'; import 'package:hmg_patient_app_new/features/habib_wallet/habib_wallet_view_model.dart'; +import 'package:hmg_patient_app_new/features/health_trackers/health_trackers_view_model.dart'; import 'package:hmg_patient_app_new/features/hmg_services/hmg_services_view_model.dart'; import 'package:hmg_patient_app_new/features/immediate_livecare/immediate_livecare_view_model.dart'; import 'package:hmg_patient_app_new/features/insurance/insurance_view_model.dart'; @@ -43,7 +44,6 @@ import 'package:hmg_patient_app_new/features/symptoms_checker/symptoms_checker_v import 'package:hmg_patient_app_new/features/todo_section/todo_section_view_model.dart'; import 'package:hmg_patient_app_new/features/water_monitor/water_monitor_view_model.dart'; import 'package:hmg_patient_app_new/presentation/health_calculators_and_converts/health_calculator_view_model.dart'; -import 'package:hmg_patient_app_new/features/health_trackers/health_trackers_view_model.dart'; import 'package:hmg_patient_app_new/routes/app_routes.dart'; import 'package:hmg_patient_app_new/services/logger_service.dart'; import 'package:hmg_patient_app_new/services/navigation_service.dart'; @@ -228,7 +228,10 @@ void main() async { ), ChangeNotifierProvider( create: (_) => getIt.get(), - ) + ), + ChangeNotifierProvider( + create: (_) => getIt.get(), + ), ], child: MyApp()), ), // Wrap your app ); @@ -240,34 +243,39 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return SafeArea( - top: false, // Set to true if you want to avoid the notch area as well + top: false, bottom: Platform.isIOS ? false : true, child: LayoutBuilder( builder: (context, constraints) { return Sizer( builder: (context, orientation, deviceType) { - // SizeConfig().init(constraints, orientation); - return MaterialApp( - // title: 'Dr. AlHabib', - title: 'Dr. AlHabib Beta', - builder: (context, mchild) { - return MediaQuery( - data: MediaQuery.of(context).copyWith( - textScaler: TextScaler.noScaling, - alwaysUse24HourFormat: true, - ), - child: mchild!, + final isArabic = EasyLocalization.of(context)?.locale.languageCode == "ar"; + return Consumer( + builder: (context, profileVm, _) { + return MaterialApp( + title: 'Dr. AlHabib Beta', + builder: (context, mchild) { + return MediaQuery( + data: MediaQuery.of(context).copyWith( + textScaler: TextScaler.noScaling, + alwaysUse24HourFormat: true, + ), + child: mchild!, + ); + }, + showSemanticsDebugger: false, + debugShowCheckedModeBanner: false, + localizationsDelegates: context.localizationDelegates, + supportedLocales: context.supportedLocales, + locale: context.locale, + initialRoute: AppRoutes.initialRoute, + routes: AppRoutes.routes, + theme: AppTheme.getTheme(isArabic), + darkTheme: AppTheme.getDarkTheme(isArabic), + themeMode: profileVm.isDarkMode ? ThemeMode.dark : ThemeMode.light, + navigatorKey: getIt.get().navigatorKey, ); }, - showSemanticsDebugger: false, - debugShowCheckedModeBanner: false, - localizationsDelegates: context.localizationDelegates, - supportedLocales: context.supportedLocales, - locale: context.locale, - initialRoute: AppRoutes.initialRoute, - routes: AppRoutes.routes, - theme: AppTheme.getTheme(EasyLocalization.of(context)?.locale.languageCode == "ar"), - navigatorKey: getIt.get().navigatorKey, ); }, ); diff --git a/lib/presentation/active_medication/active_medication_page.dart b/lib/presentation/active_medication/active_medication_page.dart index be6b82a6..3c857aec 100644 --- a/lib/presentation/active_medication/active_medication_page.dart +++ b/lib/presentation/active_medication/active_medication_page.dart @@ -193,7 +193,7 @@ class _ActiveMedicationPageState extends State { ), Text(LocaleKeys.medications.tr(), style: TextStyle( - color: AppColors.primaryRedBorderColor, + color: AppColors.primaryRedColor, fontSize: 12.f, fontWeight: FontWeight.w500)), SizedBox(height: 16.h), @@ -467,7 +467,7 @@ class _ActiveMedicationPageState extends State { decoration: BoxDecoration( shape: BoxShape.circle, color: value - ? AppColors.textGreenColor + ? AppColors.successColor : AppColors.greyTextColor, ), ), @@ -528,7 +528,7 @@ class _ActiveMedicationPageState extends State { height: 24.h, width: 24.h, iconColor: - AppColors.blackBgColor, + AppColors.textColor, ), ), ], @@ -539,7 +539,7 @@ class _ActiveMedicationPageState extends State { itemCount: doses, itemBuilder: (context, doseIndex) { final badgeColor = [ - AppColors.textGreenColor, + AppColors.successColor, AppColors.infoColor, AppColors.labelColorYellow, AppColors.mainPurple @@ -702,11 +702,11 @@ class _ActiveMedicationPageState extends State { decoration: BoxDecoration( borderRadius: BorderRadius.circular(12), color: isSelected - ? AppColors.secondaryLightRedBorderColor + ? AppColors.secondaryLightRedColor : Colors.transparent, border: Border.all( color: isSelected - ? AppColors.primaryRedBorderColor + ? AppColors.primaryRedColor : AppColors.spacerLineColor, width: 1, ), @@ -720,7 +720,7 @@ class _ActiveMedicationPageState extends State { date.day == currentDate.day ? "Today" : label, style: TextStyle( color: isSelected - ? AppColors.primaryRedBorderColor + ? AppColors.primaryRedColor : AppColors.greyTextColor, fontSize: 11.f, fontWeight: FontWeight.w500), @@ -731,7 +731,7 @@ class _ActiveMedicationPageState extends State { fontSize: 16.f, fontWeight: FontWeight.bold, color: isSelected - ? AppColors.primaryRedBorderColor + ? AppColors.primaryRedColor : AppColors.textColor)) ]), ), @@ -859,7 +859,7 @@ class _ReminderTimerDialogState extends State { height: 24.h, width: 24.h, iconColor: - AppColors.blackBgColor, + AppColors.textColor, ),), ], ), diff --git a/lib/presentation/allergies/allergies_list_page.dart b/lib/presentation/allergies/allergies_list_page.dart index adb63f02..3ee2de40 100644 --- a/lib/presentation/allergies/allergies_list_page.dart +++ b/lib/presentation/allergies/allergies_list_page.dart @@ -21,7 +21,7 @@ class AllergiesListPage extends StatelessWidget { Widget build(BuildContext context) { medicalFileViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.allergies.tr(), child: SingleChildScrollView( diff --git a/lib/presentation/appointments/appointment_details_page.dart b/lib/presentation/appointments/appointment_details_page.dart index e5961e30..8d01b2b4 100644 --- a/lib/presentation/appointments/appointment_details_page.dart +++ b/lib/presentation/appointments/appointment_details_page.dart @@ -89,7 +89,7 @@ class _AppointmentDetailsPageState extends State { labViewModel = Provider.of(context, listen: false); radiologyViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Column( children: [ Expanded( @@ -438,7 +438,7 @@ class _AppointmentDetailsPageState extends State { children: [ MedicalFileCard( label: LocaleKeys.labResults.tr(context: context), - textColor: AppColors.blackColor, + textColor: AppColors.textColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.lab_result_icon, isLargeText: true, @@ -471,7 +471,7 @@ class _AppointmentDetailsPageState extends State { }), MedicalFileCard( label: "${LocaleKeys.radiology.tr(context: context)} ${LocaleKeys.radiologySubtitle.tr(context: context)}", - textColor: AppColors.blackColor, + textColor: AppColors.textColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.radiology_icon, isLargeText: true, @@ -498,7 +498,7 @@ class _AppointmentDetailsPageState extends State { }), MedicalFileCard( label: LocaleKeys.prescriptions.tr(context: context), - textColor: AppColors.blackColor, + textColor: AppColors.textColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.prescription_item_icon, isLargeText: true, @@ -654,7 +654,7 @@ class _AppointmentDetailsPageState extends State { // // flipX: appState.isArabic(), // // child: Utils.buildSvgWithAssets( // // icon: AppAssets.forward_arrow_icon, - // // iconColor: AppColors.blackColor, + // // iconColor: AppColors.textColor, // // width: 18.w, // // height: 13.h, // // fit: BoxFit.contain, @@ -790,7 +790,7 @@ class _AppointmentDetailsPageState extends State { LocaleKeys.amountBeforeTax.tr(context: context).toText18(isBold: true), Utils.getPaymentAmountWithSymbol( widget.patientAppointmentHistoryResponseModel.patientShare!.toString().toText16(isBold: true), - AppColors.blackColor, + AppColors.textColor, 13, isSaudiCurrency: true), ], @@ -820,7 +820,7 @@ class _AppointmentDetailsPageState extends State { children: [ Utils.getPaymentAmountWithSymbol( widget.patientAppointmentHistoryResponseModel.patientShareWithTax!.toString().toText24(isBold: true), - AppColors.blackColor, + AppColors.textColor, 17, isSaudiCurrency: true), ], @@ -928,8 +928,8 @@ class _AppointmentDetailsPageState extends State { ); }); }, - backgroundColor: AppColors.chipSecondaryLightRedColor, - borderColor: AppColors.chipSecondaryLightRedColor, + backgroundColor: AppColors.secondaryLightRedColor, + borderColor: AppColors.secondaryLightRedColor, textColor: AppColors.primaryRedColor, fontSize: 16.f, fontWeight: FontWeight.w500, diff --git a/lib/presentation/appointments/appointment_payment_page.dart b/lib/presentation/appointments/appointment_payment_page.dart index e70ddf49..f3f5766f 100644 --- a/lib/presentation/appointments/appointment_payment_page.dart +++ b/lib/presentation/appointments/appointment_payment_page.dart @@ -84,7 +84,7 @@ class _AppointmentPaymentPageState extends State { myAppointmentsViewModel = Provider.of(context); payfortViewModel = Provider.of(context); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Consumer(builder: (context, myAppointmentsVM, child) { return Column( children: [ @@ -120,7 +120,7 @@ class _AppointmentPaymentPageState extends State { flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 18.h, height: 13.h, fit: BoxFit.contain, @@ -164,7 +164,7 @@ class _AppointmentPaymentPageState extends State { flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 18.h, height: 13.h, fit: BoxFit.contain, @@ -204,7 +204,7 @@ class _AppointmentPaymentPageState extends State { flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 18.h, height: 13.h, fit: BoxFit.contain, @@ -239,7 +239,7 @@ class _AppointmentPaymentPageState extends State { ? Container( height: 50.h, decoration: ShapeDecoration( - color: AppColors.secondaryLightRedBorderColor, + color: AppColors.secondaryLightRedColor, shape: SmoothRectangleBorder( borderRadius: BorderRadius.only(topLeft: Radius.circular(24), topRight: Radius.circular(24)), smoothness: 1, @@ -261,7 +261,7 @@ class _AppointmentPaymentPageState extends State { ); }, backgroundColor: AppColors.primaryRedColor, - borderColor: AppColors.secondaryLightRedBorderColor, + borderColor: AppColors.secondaryLightRedColor, textColor: AppColors.whiteColor, fontSize: 10.f, fontWeight: FontWeight.w500, @@ -282,7 +282,7 @@ class _AppointmentPaymentPageState extends State { LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true), Utils.getPaymentAmountWithSymbol( myAppointmentsVM.patientAppointmentShareResponseModel!.patientShare!.toString().toText16(isBold: true), - AppColors.blackColor, + AppColors.textColor, 13, isSaudiCurrency: true), ], @@ -307,7 +307,7 @@ class _AppointmentPaymentPageState extends State { "".toText14(isBold: true), Utils.getPaymentAmountWithSymbol( myAppointmentsVM.patientAppointmentShareResponseModel!.patientShareWithTax!.toString().toText24(isBold: true), - AppColors.blackColor, + AppColors.textColor, 17, isSaudiCurrency: true), ], diff --git a/lib/presentation/appointments/appointment_queue_page.dart b/lib/presentation/appointments/appointment_queue_page.dart index f205aeb9..495f7c94 100644 --- a/lib/presentation/appointments/appointment_queue_page.dart +++ b/lib/presentation/appointments/appointment_queue_page.dart @@ -26,7 +26,7 @@ class AppointmentQueuePage extends StatelessWidget { Widget build(BuildContext context) { appState = getIt.get(); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Consumer(builder: (context, myAppointmentsVM, child) { return Column( children: [ diff --git a/lib/presentation/appointments/my_appointments_page.dart b/lib/presentation/appointments/my_appointments_page.dart index c9e70487..cbbf5eb3 100644 --- a/lib/presentation/appointments/my_appointments_page.dart +++ b/lib/presentation/appointments/my_appointments_page.dart @@ -54,7 +54,7 @@ class _MyAppointmentsPageState extends State { myAppointmentsViewModel = Provider.of(context, listen: false); bookAppointmentsViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.appointmentsList.tr(context: context), child: SingleChildScrollView( @@ -105,9 +105,9 @@ class _MyAppointmentsPageState extends State { onPressed: () { myAppointmentsVM.setIsAppointmentsSortByClinic(true); }, - backgroundColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.bgRedLightColor : AppColors.whiteColor, + backgroundColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.secondaryLightRedColor : AppColors.whiteColor, borderColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withValues(alpha: 0.2), - textColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor, + textColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.primaryRedColor : AppColors.textColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, @@ -120,9 +120,9 @@ class _MyAppointmentsPageState extends State { onPressed: () { myAppointmentsVM.setIsAppointmentsSortByClinic(false); }, - backgroundColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.whiteColor : AppColors.bgRedLightColor, + backgroundColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.whiteColor : AppColors.secondaryLightRedColor, borderColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.textColor.withValues(alpha: 0.2) : AppColors.primaryRedColor, - textColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor, + textColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.textColor : AppColors.primaryRedColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, diff --git a/lib/presentation/appointments/my_doctors_page.dart b/lib/presentation/appointments/my_doctors_page.dart index fc7798f8..1954f75a 100644 --- a/lib/presentation/appointments/my_doctors_page.dart +++ b/lib/presentation/appointments/my_doctors_page.dart @@ -76,9 +76,9 @@ class _MyDoctorsPageState extends State { expandedIndex = null; }); }, - backgroundColor: isSortByClinic ? AppColors.bgRedLightColor : AppColors.whiteColor, + backgroundColor: isSortByClinic ? AppColors.secondaryLightRedColor : AppColors.whiteColor, borderColor: isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withValues(alpha: 0.2), - textColor: isSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor, + textColor: isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, @@ -96,9 +96,9 @@ class _MyDoctorsPageState extends State { expandedIndex = null; }); }, - backgroundColor: isSortByClinic ? AppColors.whiteColor : AppColors.bgRedLightColor, + backgroundColor: isSortByClinic ? AppColors.whiteColor : AppColors.secondaryLightRedColor, borderColor: isSortByClinic ? AppColors.textColor.withValues(alpha: 0.2) : AppColors.primaryRedColor, - textColor: isSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor, + textColor: isSortByClinic ? AppColors.textColor : AppColors.primaryRedColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, diff --git a/lib/presentation/appointments/widgets/AppointmentFilter.dart b/lib/presentation/appointments/widgets/AppointmentFilter.dart index 6546c650..4c60b4be 100644 --- a/lib/presentation/appointments/widgets/AppointmentFilter.dart +++ b/lib/presentation/appointments/widgets/AppointmentFilter.dart @@ -21,14 +21,14 @@ class AppointmentFilters extends StatelessWidget { @override Widget build(BuildContext context) { return AppCustomChipWidget( - backgroundColor: selectedFilter?.contains(item) == true?AppColors.chipSecondaryLightRedColor:AppColors.whiteColor, + backgroundColor: selectedFilter?.contains(item) == true?AppColors.secondaryLightRedColor:AppColors.whiteColor, icon: item.leadingIcon, textColor: selectedFilter?.contains(item) == true - ? AppColors.chipPrimaryRedBorderColor: AppColors.blackColor, + ? AppColors.primaryRedColor: AppColors.textColor, labelText: item.labelText.isNotEmpty?item.labelText.tr():"", iconHasColor: true, iconColor: selectedFilter?.contains(item) == true - ? AppColors.chipPrimaryRedBorderColor:AppColors.blackColor, + ? AppColors.primaryRedColor:AppColors.textColor, iconSize: 16, deleteIcon: item.trailingIcon, labelPadding: EdgeInsetsDirectional.only(start: 8.h, end: 0.h), @@ -39,7 +39,7 @@ class AppointmentFilters extends StatelessWidget { smoothness: 10.h, side: BorderSide( color: selectedFilter?.contains(item) == true - ? AppColors.chipPrimaryRedBorderColor + ? AppColors.primaryRedColor : AppColors.borderGrayColor, width: 1), )).onPress(onClicked); diff --git a/lib/presentation/appointments/widgets/appointment_card.dart b/lib/presentation/appointments/widgets/appointment_card.dart index 971e9ca8..af16e438 100644 --- a/lib/presentation/appointments/widgets/appointment_card.dart +++ b/lib/presentation/appointments/widgets/appointment_card.dart @@ -1,3 +1,5 @@ +import 'dart:ui' as ui; + import 'package:easy_localization/easy_localization.dart'; import 'package:flutter/material.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart'; @@ -26,7 +28,6 @@ import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart'; import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart'; import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart'; import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart'; -import 'dart:ui' as ui; class AppointmentCard extends StatelessWidget { final PatientAppointmentHistoryResponseModel patientAppointmentHistoryResponseModel; @@ -41,36 +42,44 @@ class AppointmentCard extends StatelessWidget { final BookAppointmentsViewModel bookAppointmentsViewModel; final bool isForRate; - const AppointmentCard( - {super.key, - required this.patientAppointmentHistoryResponseModel, - required this.myAppointmentsViewModel, - required this.bookAppointmentsViewModel, - this.isLoading = false, - this.isFromHomePage = false, - this.isFromMedicalReport = false, - this.isForEyeMeasurements = false, - this.isForFeedback = false, - this.medicalFileViewModel, - this.contactUsViewModel, - this.isForRate = false}); + const AppointmentCard({ + super.key, + required this.patientAppointmentHistoryResponseModel, + required this.myAppointmentsViewModel, + required this.bookAppointmentsViewModel, + this.isLoading = false, + this.isFromHomePage = false, + this.isFromMedicalReport = false, + this.isForEyeMeasurements = false, + this.isForFeedback = false, + this.medicalFileViewModel, + this.contactUsViewModel, + this.isForRate = false, + }); @override Widget build(BuildContext context) { final appState = getIt.get(); - return InkWell( - onTap: () => _goToDetails(context), - child: Padding( - padding: EdgeInsets.all(14.h), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - isForRate ? SizedBox() : _buildHeader(context, appState), - SizedBox(height: 16.h), - _buildDoctorRow(context), - SizedBox(height: 16.h), - isForRate ? SizedBox() : _buildActionArea(context, appState), - ], + return Container( + decoration: RoundedRectangleBorder().toSmoothCornerDecoration( + color: Colors.transparent, + borderRadius: 24.r, + context: context, + ), + child: InkWell( + onTap: () => _goToDetails(context), + child: Padding( + padding: EdgeInsets.all(14.h), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + isForRate ? SizedBox() : _buildHeader(context, appState), + SizedBox(height: 16.h), + _buildDoctorRow(context), + SizedBox(height: 16.h), + isForRate ? SizedBox() : _buildActionArea(context, appState), + ], + ), ), ), ); @@ -96,14 +105,19 @@ class AppointmentCard extends StatelessWidget { children: [ 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 ? 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), + iconColor: isLoading ? context.iconColor : (isLiveCare ? AppColors.whiteColor : context.iconColor), + labelText: isLoading + ? LocaleKeys.walkin.tr(context: context) + : (isLiveCare ? LocaleKeys.livecare.tr(context: context) : LocaleKeys.walkin.tr(context: context)), + backgroundColor: isLoading ? context.chipBgColor : (isLiveCare ? AppColors.successColor : context.chipBgColor), + textColor: isLoading ? context.textColor : (isLiveCare ? AppColors.whiteColor : context.textColor), ).toShimmer2(isShow: isLoading), AppCustomChipWidget( - labelText: - isLoading ? 'OutPatient' : (appState.isArabic() ? patientAppointmentHistoryResponseModel.isInOutPatientDescriptionN! : patientAppointmentHistoryResponseModel.isInOutPatientDescription!), + labelText: isLoading + ? 'OutPatient' + : (appState.isArabic() + ? patientAppointmentHistoryResponseModel.isInOutPatientDescriptionN! + : patientAppointmentHistoryResponseModel.isInOutPatientDescription!), backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.1), textColor: AppColors.primaryRedColor, ).toShimmer2(isShow: isLoading), @@ -124,7 +138,9 @@ class AppointmentCard extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ Image.network( - isLoading ? 'https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png' : patientAppointmentHistoryResponseModel.doctorImageURL!, + isLoading + ? 'https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png' + : patientAppointmentHistoryResponseModel.doctorImageURL!, width: 63.h, height: 63.h, fit: BoxFit.cover, @@ -135,12 +151,9 @@ class AppointmentCard extends StatelessWidget { width: 40.w, height: 40.h, decoration: BoxDecoration( - color: AppColors.whiteColor, - shape: BoxShape.circle, // Makes the container circular - border: Border.all( - color: AppColors.scaffoldBgColor, // Color of the border - width: 1.5.w, // Width of the border - ), + color: context.cardBaseColor, + shape: BoxShape.circle, + border: Border.all(color: context.scaffoldBgColor, width: 1.5.w), ), child: Column( mainAxisAlignment: MainAxisAlignment.center, @@ -148,8 +161,8 @@ class AppointmentCard extends StatelessWidget { Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h), SizedBox(height: 2.h), (isFoldable || isTablet) - ? "${patientAppointmentHistoryResponseModel.decimalDoctorRate}".toText9(isBold: true, color: AppColors.textColor) - : "${patientAppointmentHistoryResponseModel.decimalDoctorRate ?? "0.0"}".toText11(isBold: true, color: AppColors.textColor), + ? "${patientAppointmentHistoryResponseModel.decimalDoctorRate}".toText9(isBold: true, color: context.textColor) + : "${patientAppointmentHistoryResponseModel.decimalDoctorRate ?? "0.0"}".toText11(isBold: true, color: context.textColor), ], ), ).circle(100).toShimmer2(isShow: isLoading), @@ -161,8 +174,10 @@ class AppointmentCard extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - (isLoading ? 'John Doe' : "${patientAppointmentHistoryResponseModel.doctorTitle} ${patientAppointmentHistoryResponseModel.doctorNameObj!}") - .toText16(isBold: true, maxlines: 1) + (isLoading + ? 'John Doe' + : "${patientAppointmentHistoryResponseModel.doctorTitle} ${patientAppointmentHistoryResponseModel.doctorNameObj!}") + .toText16(isBold: true, maxlines: 1, color: context.textColor) .toShimmer2(isShow: isLoading), SizedBox(height: 8.h), Wrap( @@ -192,7 +207,7 @@ class AppointmentCard extends StatelessWidget { richText: isLoading ? 'Cardiology'.toText10().toShimmer2(isShow: isLoading) : "${DateUtil.formatDateToDate(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate), false)} ${DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate), false)}" - .toText10(isEnglishOnly: true), + .toText10(isEnglishOnly: true, color: context.textColor, weight: FontWeight.w500), ).toShimmer2(isShow: isLoading), ), @@ -253,17 +268,16 @@ class AppointmentCard extends StatelessWidget { }); } }, - backgroundColor: AppColors.secondaryLightRedColor, - borderColor: AppColors.secondaryLightRedColor, - textColor: AppColors.primaryRedColor, + backgroundColor: context.secondaryLightRedColor, + borderColor: context.secondaryLightRedColor, + textColor: context.primaryRedColor, fontSize: (isFoldable || isTablet) ? 12.f : 14.f, fontWeight: FontWeight.w500, borderRadius: 12.r, padding: EdgeInsets.symmetric(horizontal: 10.w), - // height: isTablet || isFoldable ? 46.h : 40.h, height: 40.h, icon: isFromMedicalReport ? AppAssets.checkmark_icon : null, - iconColor: AppColors.primaryRedColor, + iconColor: context.primaryRedColor, iconSize: 16.h, ); } else { @@ -281,17 +295,16 @@ class AppointmentCard extends StatelessWidget { } Navigator.pop(context, false); }, - backgroundColor: AppColors.secondaryLightRedColor, - borderColor: AppColors.secondaryLightRedColor, - textColor: AppColors.primaryRedColor, + backgroundColor: context.secondaryLightRedColor, + borderColor: context.secondaryLightRedColor, + textColor: context.primaryRedColor, fontSize: (isFoldable || isTablet) ? 12.f : 14.f, fontWeight: FontWeight.w500, borderRadius: 12.r, padding: EdgeInsets.symmetric(horizontal: 10.w), - // height: isTablet || isFoldable ? 46.h : 40.h, height: 40.h, icon: AppAssets.checkmark_icon, - iconColor: AppColors.primaryRedColor, + iconColor: context.primaryRedColor, iconSize: 16.h, ); } @@ -306,8 +319,10 @@ class AppointmentCard extends StatelessWidget { : CustomButton( text: AppointmentType.getNextActionText(patientAppointmentHistoryResponseModel.nextAction), onPressed: () => _goToDetails(context), - backgroundColor: AppointmentType.getNextActionButtonColor(patientAppointmentHistoryResponseModel.nextAction).withValues(alpha: 0.15), - borderColor: AppointmentType.getNextActionButtonColor(patientAppointmentHistoryResponseModel.nextAction).withValues(alpha: 0.01), + backgroundColor: + AppointmentType.getNextActionButtonColor(patientAppointmentHistoryResponseModel.nextAction).withValues(alpha: 0.15), + borderColor: + AppointmentType.getNextActionButtonColor(patientAppointmentHistoryResponseModel.nextAction).withValues(alpha: 0.01), textColor: AppointmentType.getNextActionTextColor(patientAppointmentHistoryResponseModel.nextAction), fontSize: (isFoldable || isTablet) ? 12.f : 14.f, fontWeight: FontWeight.w500, @@ -325,12 +340,12 @@ class AppointmentCard extends StatelessWidget { flex: 1, child: Container( height: (isFoldable || isTablet) ? 50.h : 40.h, - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.textColor, borderRadius: 10.h), + decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: context.serviceCardButtonColor, borderRadius: 10.h), child: Transform.flip( flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon, - iconColor: AppColors.whiteColor, + iconColor: Colors.white, width: 24.w, height: 24.h, fit: BoxFit.contain, @@ -379,17 +394,16 @@ class AppointmentCard extends StatelessWidget { } }); }, - backgroundColor: AppColors.secondaryLightRedColor, - borderColor: AppColors.secondaryLightRedColor, - textColor: AppColors.primaryRedColor, + backgroundColor: context.secondaryLightRedColor, + borderColor: context.secondaryLightRedColor, + textColor: context.primaryRedColor, fontSize: (isFoldable || isTablet) ? 12.f : 14.f, fontWeight: FontWeight.w500, borderRadius: 12.r, padding: EdgeInsets.symmetric(horizontal: 10.w), - // height: isTablet || isFoldable ? 46.h : 40.h, height: 40.h, icon: AppAssets.ask_doctor_icon, - iconColor: AppColors.primaryRedColor, + iconColor: context.primaryRedColor, iconSize: 16.h, ); } @@ -397,16 +411,16 @@ class AppointmentCard extends StatelessWidget { return CustomButton( text: LocaleKeys.rebookSameDoctor.tr(context: context), onPressed: () => openDoctorScheduleCalendar(context), - backgroundColor: AppColors.greyColor, - borderColor: AppColors.greyColor, - textColor: AppColors.blackColor, + backgroundColor: context.chipBgColor, + borderColor: context.chipBgColor, + textColor: context.textColor, fontSize: (isFoldable || isTablet) ? 12.f : 14.f, fontWeight: FontWeight.w500, borderRadius: 12.r, padding: EdgeInsets.symmetric(horizontal: 10.w), height: 40.h, icon: AppAssets.rebook_appointment_icon, - iconColor: AppColors.blackColor, + iconColor: context.iconColor, iconSize: 16.h, ); } @@ -420,7 +434,8 @@ class AppointmentCard extends StatelessWidget { ), ); } else { - bookAppointmentsViewModel.getAppointmentNearestGate(projectID: patientAppointmentHistoryResponseModel.projectID, clinicID: patientAppointmentHistoryResponseModel.clinicID); + bookAppointmentsViewModel.getAppointmentNearestGate( + projectID: patientAppointmentHistoryResponseModel.projectID, clinicID: patientAppointmentHistoryResponseModel.clinicID); Navigator.of(context) .push( CustomPageRoute( diff --git a/lib/presentation/appointments/widgets/appointment_checkin_bottom_sheet.dart b/lib/presentation/appointments/widgets/appointment_checkin_bottom_sheet.dart index 95fc09b8..0cca7cf2 100644 --- a/lib/presentation/appointments/widgets/appointment_checkin_bottom_sheet.dart +++ b/lib/presentation/appointments/widgets/appointment_checkin_bottom_sheet.dart @@ -128,7 +128,7 @@ class AppointmentCheckinBottomSheet extends StatelessWidget { flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 18.h, height: 13.h, fit: BoxFit.contain, diff --git a/lib/presentation/appointments/widgets/appointment_doctor_card.dart b/lib/presentation/appointments/widgets/appointment_doctor_card.dart index 467ba640..501b9a0b 100644 --- a/lib/presentation/appointments/widgets/appointment_doctor_card.dart +++ b/lib/presentation/appointments/widgets/appointment_doctor_card.dart @@ -171,14 +171,14 @@ class AppointmentDoctorCard extends StatelessWidget { }, backgroundColor: AppColors.greyColor, borderColor: AppColors.greyColor, - textColor: AppColors.blackColor, + textColor: AppColors.textColor, fontSize: 12.f, fontWeight: FontWeight.w500, borderRadius: 12.r, padding: EdgeInsets.fromLTRB(10.w, 0, 10.w, 0), height: 40.h, icon: AppAssets.rebook_appointment_icon, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, iconSize: 14.h, ) : SizedBox.shrink(); diff --git a/lib/presentation/appointments/widgets/faculity_selection/facility_selection_item.dart b/lib/presentation/appointments/widgets/faculity_selection/facility_selection_item.dart index 2f5589c8..b6363318 100644 --- a/lib/presentation/appointments/widgets/faculity_selection/facility_selection_item.dart +++ b/lib/presentation/appointments/widgets/faculity_selection/facility_selection_item.dart @@ -47,7 +47,7 @@ class FacilitySelectionItem extends StatelessWidget { flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 18, height: 13, fit: BoxFit.contain, @@ -72,7 +72,7 @@ class FacilitySelectionItem extends StatelessWidget { style: TextStyle( fontSize: 16.h, fontWeight: FontWeight.w600, - color: AppColors.blackColor, + color: AppColors.textColor, ), ), ), diff --git a/lib/presentation/appointments/widgets/faculity_selection/facility_type_selection_widget.dart b/lib/presentation/appointments/widgets/faculity_selection/facility_type_selection_widget.dart index b6366dbf..77ed349b 100644 --- a/lib/presentation/appointments/widgets/faculity_selection/facility_type_selection_widget.dart +++ b/lib/presentation/appointments/widgets/faculity_selection/facility_type_selection_widget.dart @@ -32,7 +32,7 @@ class FacilityTypeSelectionWidget extends StatelessWidget { style: TextStyle( fontSize: 21, fontWeight: FontWeight.w600, - color: AppColors.blackColor, + color: AppColors.textColor, ), ), Text( diff --git a/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body.dart b/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body.dart index f3301f0c..95b0a1c1 100644 --- a/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body.dart +++ b/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body.dart @@ -36,7 +36,7 @@ import '../../../emergency_services/call_ambulance/widgets/type_selection_widget // style: TextStyle( // fontSize: 21, // fontWeight: FontWeight.w600, -// color: AppColors.blackColor, +// color: AppColors.textColor, // ), // ), // Text( diff --git a/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body_for_doctor_filter.dart b/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body_for_doctor_filter.dart index a2d22cda..b6e0bbec 100644 --- a/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body_for_doctor_filter.dart +++ b/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body_for_doctor_filter.dart @@ -30,7 +30,7 @@ class HospitalBottomSheetBodyForDoctorFilter extends StatelessWidget { style: TextStyle( fontSize: 21, fontWeight: FontWeight.w600, - color: AppColors.blackColor, + color: AppColors.textColor, ), ), SizedBox(height: 24.h), diff --git a/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart b/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart index 5d9ed8db..59420fe7 100644 --- a/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart +++ b/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart @@ -41,7 +41,7 @@ class HospitalListItem extends StatelessWidget { flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 18.h, height: 13.h, fit: BoxFit.contain, @@ -63,7 +63,7 @@ class HospitalListItem extends StatelessWidget { style: TextStyle( fontWeight: FontWeight.w600, fontSize: 16, - color: AppColors.blackColor, + color: AppColors.textColor, ), ), ) @@ -89,7 +89,7 @@ class HospitalListItem extends StatelessWidget { children: [ AppCustomChipWidget( labelText: "Distance not available", - textColor: AppColors.blackColor, + textColor: AppColors.textColor, ), // SizedBox( // width: 8.h, @@ -102,7 +102,7 @@ class HospitalListItem extends StatelessWidget { labelText: "Location turned off", deleteIcon: AppAssets.location_unavailable, deleteIconSize: Size(9.w, 12.h), - textColor: AppColors.blackColor, + textColor: AppColors.textColor, )), ], ); diff --git a/lib/presentation/appointments/widgets/hospital_bottom_sheet/type_selection_widget.dart b/lib/presentation/appointments/widgets/hospital_bottom_sheet/type_selection_widget.dart index e9a5e363..5eb8f91f 100644 --- a/lib/presentation/appointments/widgets/hospital_bottom_sheet/type_selection_widget.dart +++ b/lib/presentation/appointments/widgets/hospital_bottom_sheet/type_selection_widget.dart @@ -28,7 +28,7 @@ class TypeSelectionWidget extends StatelessWidget { side: BorderSide( color: data.currentlySelectedFacility == FacilitySelection.ALL ? AppColors.errorColor - : AppColors.chipBorderColorOpacity20, + : AppColors.borderGrayColor, width: 1, ), borderRadius: BorderRadius.circular(10)), @@ -38,7 +38,7 @@ class TypeSelectionWidget extends StatelessWidget { : AppColors.whiteColor, textColor: data.currentlySelectedFacility == FacilitySelection.ALL ? AppColors.errorColor - : AppColors.blackColor, + : AppColors.textColor, ).onPress((){ data.setSelectedFacility(FacilitySelection.ALL); }), @@ -50,7 +50,7 @@ class TypeSelectionWidget extends StatelessWidget { side: BorderSide( color: data.currentlySelectedFacility == FacilitySelection.HMG ? AppColors.errorColor - : AppColors.chipBorderColorOpacity20, + : AppColors.borderGrayColor, width: 1, ), borderRadius: BorderRadius.circular(10)), @@ -60,7 +60,7 @@ class TypeSelectionWidget extends StatelessWidget { : AppColors.whiteColor, textColor: data.currentlySelectedFacility == FacilitySelection.HMG ? AppColors.errorColor - : AppColors.blackColor, + : AppColors.textColor, ).onPress((){ data.setSelectedFacility(FacilitySelection.HMG); }), @@ -72,7 +72,7 @@ class TypeSelectionWidget extends StatelessWidget { side: BorderSide( color: data.currentlySelectedFacility == FacilitySelection.HMC ? AppColors.errorColor - : AppColors.chipBorderColorOpacity20, + : AppColors.borderGrayColor, width: 1, ), borderRadius: BorderRadius.circular(10)), @@ -82,7 +82,7 @@ class TypeSelectionWidget extends StatelessWidget { : AppColors.whiteColor, textColor: data.currentlySelectedFacility == FacilitySelection.HMC ? AppColors.errorColor - : AppColors.blackColor, + : AppColors.textColor, ).onPress((){ data.setSelectedFacility(FacilitySelection.HMC); }), diff --git a/lib/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart b/lib/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart index 969e23af..f863039c 100644 --- a/lib/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart +++ b/lib/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart @@ -45,7 +45,7 @@ class RegionListItem extends StatelessWidget { flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 18, height: 13, fit: BoxFit.contain, @@ -66,8 +66,8 @@ class RegionListItem extends StatelessWidget { richText: RichText( text: TextSpan( text: count, - style: TextStyle(fontSize: 12.h, fontWeight: FontWeight.w700, color: AppColors.blackColor), - children: [TextSpan(text: title, style: TextStyle(fontSize: 12.h, fontWeight: FontWeight.w500, color: AppColors.blackColor))])), + style: TextStyle(fontSize: 12.h, fontWeight: FontWeight.w700, color: AppColors.textColor), + children: [TextSpan(text: title, style: TextStyle(fontSize: 12.h, fontWeight: FontWeight.w500, color: AppColors.textColor))])), ); } @@ -82,7 +82,7 @@ class RegionListItem extends StatelessWidget { style: TextStyle( fontSize: 16.h, fontWeight: FontWeight.w600, - color: AppColors.blackColor, + color: AppColors.textColor, ), ), ), diff --git a/lib/presentation/ask_doctor/ask_doctor_page.dart b/lib/presentation/ask_doctor/ask_doctor_page.dart index 4c2c267f..6b045408 100644 --- a/lib/presentation/ask_doctor/ask_doctor_page.dart +++ b/lib/presentation/ask_doctor/ask_doctor_page.dart @@ -32,7 +32,7 @@ class _AskDoctorPageState extends State { Widget build(BuildContext context) { myAppointmentsViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Consumer( builder: (context, askDoctorVM, child) { return CollapsingListView( diff --git a/lib/presentation/ask_doctor/doctor_response_page.dart b/lib/presentation/ask_doctor/doctor_response_page.dart index 9cd19ef6..94e35d2d 100644 --- a/lib/presentation/ask_doctor/doctor_response_page.dart +++ b/lib/presentation/ask_doctor/doctor_response_page.dart @@ -36,7 +36,7 @@ class _DoctorResponsePageState extends State { Widget build(BuildContext context) { myAppointmentsViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.doctorResponses.tr(context: context), child: SingleChildScrollView( diff --git a/lib/presentation/authentication/login.dart b/lib/presentation/authentication/login.dart index 9f64bde4..c7bb4e0a 100644 --- a/lib/presentation/authentication/login.dart +++ b/lib/presentation/authentication/login.dart @@ -47,7 +47,7 @@ class LoginScreenState extends State { Widget build(BuildContext context) { AuthenticationViewModel authVm = context.read(); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, appBar: CustomAppBar( onBackPressed: () { Navigator.of(context).pop(); @@ -187,7 +187,7 @@ class LoginScreenState extends State { } }, backgroundColor: AppColors.primaryRedColor, - borderColor: AppColors.primaryRedBorderColor, + borderColor: AppColors.primaryRedColor, textColor: AppColors.whiteColor, icon: AppAssets.message, ), diff --git a/lib/presentation/authentication/register.dart b/lib/presentation/authentication/register.dart index 2a26a726..96bdcb32 100644 --- a/lib/presentation/authentication/register.dart +++ b/lib/presentation/authentication/register.dart @@ -48,7 +48,7 @@ class _RegisterNew extends State { AuthenticationViewModel authVm = context.read(); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, appBar: CustomAppBar( onBackPressed: () { Navigator.of(context).pop(); @@ -149,7 +149,7 @@ class _RegisterNew extends State { decoration: BoxDecoration( color: isTermsAccepted ? AppColors.primaryRedColor : Colors.transparent, borderRadius: BorderRadius.circular(6), - border: Border.all(color: isTermsAccepted ? AppColors.primaryRedBorderColor : AppColors.greyColor, width: 2.h), + border: Border.all(color: isTermsAccepted ? AppColors.primaryRedColor : AppColors.greyColor, width: 2.h), ), child: isTermsAccepted ? Icon(Icons.check, size: 16.f, color: Colors.white) : null, ); @@ -176,7 +176,7 @@ class _RegisterNew extends State { fontWeight: FontWeight.w500, color: AppColors.primaryRedColor, decoration: TextDecoration.underline, - decorationColor: AppColors.primaryRedBorderColor, + decorationColor: AppColors.primaryRedColor, ), ), ), @@ -292,7 +292,7 @@ class _RegisterNew extends State { } }, backgroundColor: AppColors.primaryRedColor, - borderColor: AppColors.primaryRedBorderColor, + borderColor: AppColors.primaryRedColor, textColor: AppColors.whiteColor, icon: AppAssets.message, ), diff --git a/lib/presentation/authentication/register_step2.dart b/lib/presentation/authentication/register_step2.dart index c4bdf0f9..1c2f7273 100644 --- a/lib/presentation/authentication/register_step2.dart +++ b/lib/presentation/authentication/register_step2.dart @@ -49,7 +49,7 @@ class _RegisterNew extends State { ? ("${appState.getNHICUserData.firstNameEn!.toUpperCase()} ${appState.getNHICUserData.lastNameEn!.toUpperCase()}") : ("${appState.getNHICUserData.firstNameAr!.toUpperCase()} ${appState.getNHICUserData.lastNameAr!.toUpperCase()}"); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, appBar: CustomAppBar( onBackPressed: () { Navigator.of(context).pop(); diff --git a/lib/presentation/blood_donation/blood_donation_page.dart b/lib/presentation/blood_donation/blood_donation_page.dart index 7c6c625f..af0461fe 100644 --- a/lib/presentation/blood_donation/blood_donation_page.dart +++ b/lib/presentation/blood_donation/blood_donation_page.dart @@ -48,7 +48,7 @@ class _BloodDonationPageState extends State { Widget build(BuildContext context) { appState = getIt(); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Consumer(builder: (context, bloodDonationVM, child) { return Column( children: [ @@ -79,7 +79,7 @@ class _BloodDonationPageState extends State { children: [ Lottie.asset(AppAnimations.errorAnimation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill), SizedBox(height: 8.h), - (LocaleKeys.loginToUseService.tr()).toText16(color: AppColors.blackColor), + (LocaleKeys.loginToUseService.tr()).toText16(color: AppColors.textColor), SizedBox(height: 16.h), Row( children: [ @@ -122,8 +122,8 @@ class _BloodDonationPageState extends State { ); } }, - backgroundColor: AppColors.bgRedLightColor, - borderColor: AppColors.bgRedLightColor, + backgroundColor: AppColors.secondaryLightRedColor, + borderColor: AppColors.secondaryLightRedColor, textColor: AppColors.primaryRedColor, padding: EdgeInsetsGeometry.symmetric(vertical: 0.h, horizontal: 20.h)), child: Padding( @@ -253,7 +253,7 @@ class _BloodDonationPageState extends State { decoration: BoxDecoration( color: isTermsAccepted ? AppColors.primaryRedColor : Colors.transparent, borderRadius: BorderRadius.circular(6), - border: Border.all(color: isTermsAccepted ? AppColors.primaryRedBorderColor : AppColors.greyColor, width: 2.h), + border: Border.all(color: isTermsAccepted ? AppColors.primaryRedColor : AppColors.greyColor, width: 2.h), ), child: isTermsAccepted ? Icon(Icons.check, size: 16.f, color: Colors.white) : null, ); @@ -285,7 +285,7 @@ class _BloodDonationPageState extends State { fontWeight: FontWeight.w500, color: AppColors.primaryRedColor, decoration: TextDecoration.underline, - decorationColor: AppColors.primaryRedBorderColor, + decorationColor: AppColors.primaryRedColor, ), ), ), @@ -317,7 +317,7 @@ class _BloodDonationPageState extends State { children: [ Lottie.asset(AppAnimations.errorAnimation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill), SizedBox(height: 8.h), - (LocaleKeys.loginToUseService.tr()).toText16(color: AppColors.blackColor), + (LocaleKeys.loginToUseService.tr()).toText16(color: AppColors.textColor), SizedBox(height: 16.h), Row( children: [ diff --git a/lib/presentation/blood_donation/widgets/city_list_item.dart b/lib/presentation/blood_donation/widgets/city_list_item.dart index 408fb26b..493c4971 100644 --- a/lib/presentation/blood_donation/widgets/city_list_item.dart +++ b/lib/presentation/blood_donation/widgets/city_list_item.dart @@ -39,7 +39,7 @@ class CityListItem extends StatelessWidget { flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 40.h, height: 40.h, fit: BoxFit.contain, diff --git a/lib/presentation/blood_donation/widgets/select_blood_group_widget.dart b/lib/presentation/blood_donation/widgets/select_blood_group_widget.dart index a5ac071c..536b6cd8 100644 --- a/lib/presentation/blood_donation/widgets/select_blood_group_widget.dart +++ b/lib/presentation/blood_donation/widgets/select_blood_group_widget.dart @@ -43,7 +43,7 @@ class SelectBloodGroupWidget extends StatelessWidget { flipX: isArabic, child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 40.h, height: 40.h, fit: BoxFit.contain, diff --git a/lib/presentation/blood_donation/widgets/select_gender_widget.dart b/lib/presentation/blood_donation/widgets/select_gender_widget.dart index 0d360a80..f6d4a84b 100644 --- a/lib/presentation/blood_donation/widgets/select_gender_widget.dart +++ b/lib/presentation/blood_donation/widgets/select_gender_widget.dart @@ -44,7 +44,7 @@ class SelectGenderWidget extends StatelessWidget { flipX: isArabic, child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 40.h, height: 40.h, fit: BoxFit.contain, diff --git a/lib/presentation/book_appointment/book_appointment_page.dart b/lib/presentation/book_appointment/book_appointment_page.dart index 03de8332..3277f978 100644 --- a/lib/presentation/book_appointment/book_appointment_page.dart +++ b/lib/presentation/book_appointment/book_appointment_page.dart @@ -74,7 +74,7 @@ class _BookAppointmentPageState extends State { regionalViewModel = Provider.of(context, listen: true); getSelectedTabData(bookAppointmentsViewModel.selectedTabIndex); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Column( children: [ Expanded( @@ -673,8 +673,8 @@ class _BookAppointmentPageState extends State { onPressed: () { context.pop(); }, - backgroundColor: AppColors.chipSecondaryLightRedColor, - borderColor: AppColors.chipSecondaryLightRedColor, + backgroundColor: AppColors.secondaryLightRedColor, + borderColor: AppColors.secondaryLightRedColor, textColor: AppColors.primaryRedColor, fontSize: 16.f, fontWeight: FontWeight.w500, diff --git a/lib/presentation/book_appointment/doctor_filter/clinic_bottomsheet.dart b/lib/presentation/book_appointment/doctor_filter/clinic_bottomsheet.dart index 982fc54d..c49e2868 100644 --- a/lib/presentation/book_appointment/doctor_filter/clinic_bottomsheet.dart +++ b/lib/presentation/book_appointment/doctor_filter/clinic_bottomsheet.dart @@ -32,7 +32,7 @@ class ClinicBottomSheet extends StatelessWidget { style: TextStyle( fontSize: 21, fontWeight: FontWeight.w600, - color: AppColors.blackColor, + color: AppColors.textColor, ), ), SizedBox(height: 24.h), diff --git a/lib/presentation/book_appointment/doctor_filter/doctors_filter.dart b/lib/presentation/book_appointment/doctor_filter/doctors_filter.dart index d9aa9e5e..7ecf1712 100644 --- a/lib/presentation/book_appointment/doctor_filter/doctors_filter.dart +++ b/lib/presentation/book_appointment/doctor_filter/doctors_filter.dart @@ -30,9 +30,9 @@ class DoctorsFilters extends StatelessWidget{ @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, appBar: AppBar( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, automaticallyImplyLeading: false, centerTitle: false, diff --git a/lib/presentation/book_appointment/doctor_profile_page.dart b/lib/presentation/book_appointment/doctor_profile_page.dart index c62404ab..6c41f27e 100644 --- a/lib/presentation/book_appointment/doctor_profile_page.dart +++ b/lib/presentation/book_appointment/doctor_profile_page.dart @@ -31,7 +31,7 @@ class DoctorProfilePage extends StatelessWidget { bookAppointmentsViewModel = Provider.of(context, listen: false); appState = getIt.get(); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Column( children: [ Expanded( diff --git a/lib/presentation/book_appointment/laser/laser_appointment.dart b/lib/presentation/book_appointment/laser/laser_appointment.dart index 3b94b0ec..f026c567 100644 --- a/lib/presentation/book_appointment/laser/laser_appointment.dart +++ b/lib/presentation/book_appointment/laser/laser_appointment.dart @@ -23,7 +23,7 @@ class LaserAppointment extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, bottomNavigationBar: DecoratedBox( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( diff --git a/lib/presentation/book_appointment/laser/widgets/body_type_listing.dart b/lib/presentation/book_appointment/laser/widgets/body_type_listing.dart index baf72d26..e18e946d 100644 --- a/lib/presentation/book_appointment/laser/widgets/body_type_listing.dart +++ b/lib/presentation/book_appointment/laser/widgets/body_type_listing.dart @@ -33,16 +33,16 @@ class BodyTypeListing extends StatelessWidget { ), itemBuilder: (_, index) => AppCustomChipWidget( backgroundColor: index == selectedBodyAreaIndex - ? AppColors.chipSecondaryLightRedColor + ? AppColors.secondaryLightRedColor : AppColors.whiteColor, textColor: index == selectedBodyAreaIndex - ? AppColors.chipPrimaryRedBorderColor - : AppColors.blackColor, + ? AppColors.primaryRedColor + : AppColors.textColor, labelText: availableBodyArea[index].title.tr(), iconHasColor: false, iconColor: index == selectedBodyAreaIndex - ? AppColors.chipPrimaryRedBorderColor - : AppColors.blackColor, + ? AppColors.primaryRedColor + : AppColors.textColor, iconSize: 16, labelPadding: EdgeInsetsDirectional.only(start: 8.w, end: 8.w), padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 12.w), @@ -52,7 +52,7 @@ class BodyTypeListing extends StatelessWidget { smoothness: 10, side: BorderSide( color: index == selectedBodyAreaIndex - ? AppColors.chipPrimaryRedBorderColor + ? AppColors.primaryRedColor : AppColors.borderGrayColor, width: 1), )).onPress( diff --git a/lib/presentation/book_appointment/livecare/immediate_livecare_payment_details.dart b/lib/presentation/book_appointment/livecare/immediate_livecare_payment_details.dart index fb6ebe72..3280b9cc 100644 --- a/lib/presentation/book_appointment/livecare/immediate_livecare_payment_details.dart +++ b/lib/presentation/book_appointment/livecare/immediate_livecare_payment_details.dart @@ -144,7 +144,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget { ? Container( height: 50.h, decoration: ShapeDecoration( - color: AppColors.secondaryLightRedBorderColor, + color: AppColors.secondaryLightRedColor, shape: SmoothRectangleBorder( borderRadius: BorderRadius.only(topLeft: Radius.circular(24), topRight: Radius.circular(24)), smoothness: 1, @@ -164,7 +164,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget { ); }, backgroundColor: AppColors.primaryRedColor, - borderColor: AppColors.secondaryLightRedBorderColor, + borderColor: AppColors.secondaryLightRedColor, textColor: AppColors.whiteColor, fontSize: 10, fontWeight: FontWeight.w500, @@ -183,7 +183,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true), - Utils.getPaymentAmountWithSymbol(immediateLiveCareVM.liveCareImmediateAppointmentFeesList.amount!.toText16(isBold: true), AppColors.blackColor, 13, + Utils.getPaymentAmountWithSymbol(immediateLiveCareVM.liveCareImmediateAppointmentFeesList.amount!.toText16(isBold: true), AppColors.textColor, 13, isSaudiCurrency: immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar" || immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "ريال"), ], @@ -203,7 +203,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ SizedBox(width: 150.h, child: Utils.getPaymentMethods()), - Utils.getPaymentAmountWithSymbol(immediateLiveCareVM.liveCareImmediateAppointmentFeesList.total!.toText24(isBold: true), AppColors.blackColor, 17, + Utils.getPaymentAmountWithSymbol(immediateLiveCareVM.liveCareImmediateAppointmentFeesList.total!.toText24(isBold: true), AppColors.textColor, 17, isSaudiCurrency: (immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar" || immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "ريال")), ], diff --git a/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart b/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart index 73da69f5..aa87ea79 100644 --- a/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart +++ b/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart @@ -78,7 +78,7 @@ class _ImmediateLiveCarePaymentPageState extends State(context, listen: false); payfortViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Consumer(builder: (context, myAppointmentsVM, child) { return Column( children: [ @@ -113,7 +113,7 @@ class _ImmediateLiveCarePaymentPageState extends State(context, listen: false); appState = getIt.get(); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Consumer(builder: (context, immediateLiveCareVM, child) { return Column( children: [ diff --git a/lib/presentation/book_appointment/livecare/select_immediate_livecare_clinic_page.dart b/lib/presentation/book_appointment/livecare/select_immediate_livecare_clinic_page.dart index a83dfa05..7274346f 100644 --- a/lib/presentation/book_appointment/livecare/select_immediate_livecare_clinic_page.dart +++ b/lib/presentation/book_appointment/livecare/select_immediate_livecare_clinic_page.dart @@ -59,7 +59,7 @@ class _SelectImmediateLiveCareClinicPageState extends State(context, listen: false); appState = getIt.get(); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.selectLiveCareClinic.tr(), child: SingleChildScrollView( diff --git a/lib/presentation/book_appointment/livecare/widgets/select_livecare_call_type.dart b/lib/presentation/book_appointment/livecare/widgets/select_livecare_call_type.dart index e0f6c5c0..17e40122 100644 --- a/lib/presentation/book_appointment/livecare/widgets/select_livecare_call_type.dart +++ b/lib/presentation/book_appointment/livecare/widgets/select_livecare_call_type.dart @@ -79,7 +79,7 @@ class SelectLiveCareCallType extends StatelessWidget { flipX: getIt.get().isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 18.h, height: 13.h, fit: BoxFit.contain, diff --git a/lib/presentation/book_appointment/search_doctor_by_name.dart b/lib/presentation/book_appointment/search_doctor_by_name.dart index fa871f50..05ec8a9c 100644 --- a/lib/presentation/book_appointment/search_doctor_by_name.dart +++ b/lib/presentation/book_appointment/search_doctor_by_name.dart @@ -47,7 +47,7 @@ class _SearchDoctorByNameState extends State { Widget build(BuildContext context) { bookAppointmentsViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Column( children: [ Expanded( @@ -150,9 +150,9 @@ class _SearchDoctorByNameState extends State { onPressed: () { bookAppointmentsVM.sortFilteredDoctorList(true); }, - backgroundColor: bookAppointmentsVM.isSortByClinic ? AppColors.bgRedLightColor : AppColors.whiteColor, + backgroundColor: bookAppointmentsVM.isSortByClinic ? AppColors.secondaryLightRedColor : AppColors.whiteColor, borderColor: bookAppointmentsVM.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withOpacity(0.2), - textColor: bookAppointmentsVM.isSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor, + textColor: bookAppointmentsVM.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, @@ -165,9 +165,9 @@ class _SearchDoctorByNameState extends State { onPressed: () { bookAppointmentsVM.sortFilteredDoctorList(false); }, - backgroundColor: bookAppointmentsVM.isSortByClinic ? AppColors.whiteColor : AppColors.bgRedLightColor, + backgroundColor: bookAppointmentsVM.isSortByClinic ? AppColors.whiteColor : AppColors.secondaryLightRedColor, borderColor: bookAppointmentsVM.isSortByClinic ? AppColors.textColor.withOpacity(0.2) : AppColors.primaryRedColor, - textColor: bookAppointmentsVM.isSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor, + textColor: bookAppointmentsVM.isSortByClinic ? AppColors.textColor : AppColors.primaryRedColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, @@ -232,7 +232,7 @@ class _SearchDoctorByNameState extends State { onPressed: () {}, backgroundColor: AppColors.greyColor, borderColor: AppColors.greyColor, - textColor: AppColors.blackColor, + textColor: AppColors.textColor, fontSize: 10, fontWeight: FontWeight.w500, borderRadius: 8, diff --git a/lib/presentation/book_appointment/select_clinic_page.dart b/lib/presentation/book_appointment/select_clinic_page.dart index aebb90fd..6deb07bf 100644 --- a/lib/presentation/book_appointment/select_clinic_page.dart +++ b/lib/presentation/book_appointment/select_clinic_page.dart @@ -101,7 +101,7 @@ class _SelectClinicPageState extends State { ); } else { return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: bookAppointmentsViewModel.isLiveCareSchedule ? LocaleKeys.selectLiveCareClinic.tr(context: context) : LocaleKeys.selectClinic.tr(context: context), child: SingleChildScrollView( diff --git a/lib/presentation/book_appointment/select_doctor_page.dart b/lib/presentation/book_appointment/select_doctor_page.dart index 1fc9d9ad..fdd6ba80 100644 --- a/lib/presentation/book_appointment/select_doctor_page.dart +++ b/lib/presentation/book_appointment/select_doctor_page.dart @@ -73,7 +73,7 @@ class _SelectDoctorPageState extends State { bookAppointmentsViewModel = Provider.of(context, listen: false); appState = getIt.get(); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.chooseDoctor.tr(context: context), // bottomChild: Container( @@ -193,9 +193,9 @@ class _SelectDoctorPageState extends State { onPressed: () { bookAppointmentsVM.setIsSortByClinic(true); }, - backgroundColor: bookAppointmentsVM.isSortByClinic ? AppColors.bgRedLightColor : AppColors.whiteColor, + backgroundColor: bookAppointmentsVM.isSortByClinic ? AppColors.secondaryLightRedColor : AppColors.whiteColor, borderColor: bookAppointmentsVM.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withOpacity(0.2), - textColor: bookAppointmentsVM.isSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor, + textColor: bookAppointmentsVM.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, @@ -208,9 +208,9 @@ class _SelectDoctorPageState extends State { onPressed: () { bookAppointmentsVM.setIsSortByClinic(false); }, - backgroundColor: bookAppointmentsVM.isSortByClinic ? AppColors.whiteColor : AppColors.bgRedLightColor, + backgroundColor: bookAppointmentsVM.isSortByClinic ? AppColors.whiteColor : AppColors.secondaryLightRedColor, borderColor: bookAppointmentsVM.isSortByClinic ? AppColors.textColor.withOpacity(0.2) : AppColors.primaryRedColor, - textColor: bookAppointmentsVM.isSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor, + textColor: bookAppointmentsVM.isSortByClinic ? AppColors.textColor : AppColors.primaryRedColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, @@ -299,7 +299,7 @@ class _SelectDoctorPageState extends State { onPressed: () {}, backgroundColor: AppColors.greyColor, borderColor: AppColors.greyColor, - textColor: AppColors.blackColor, + textColor: AppColors.textColor, fontSize: 10, fontWeight: FontWeight.w500, borderRadius: 8, diff --git a/lib/presentation/book_appointment/select_livecare_clinic_page.dart b/lib/presentation/book_appointment/select_livecare_clinic_page.dart index 87ab0eb5..e7c7ebda 100644 --- a/lib/presentation/book_appointment/select_livecare_clinic_page.dart +++ b/lib/presentation/book_appointment/select_livecare_clinic_page.dart @@ -33,7 +33,7 @@ class SelectLivecareClinicPage extends StatelessWidget { Widget build(BuildContext context) { immediateLiveCareViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Column( children: [ Expanded( diff --git a/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_info.dart b/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_info.dart index 19d0fb41..cfa237e5 100644 --- a/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_info.dart +++ b/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_info.dart @@ -23,7 +23,7 @@ class WaitingAppointmentInfo extends StatelessWidget { Widget build(BuildContext context) { bookAppointmentsViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Column( children: [ Expanded( diff --git a/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_online_checkin_sheet.dart b/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_online_checkin_sheet.dart index 6f3a773a..93aea262 100644 --- a/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_online_checkin_sheet.dart +++ b/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_online_checkin_sheet.dart @@ -119,7 +119,7 @@ class WaitingAppointmentOnlineCheckinSheet extends StatelessWidget { flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 18.h, height: 13.h, fit: BoxFit.contain, diff --git a/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_payment_page.dart b/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_payment_page.dart index abd8d102..30320d92 100644 --- a/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_payment_page.dart +++ b/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_payment_page.dart @@ -88,7 +88,7 @@ class _WaitingAppointmentPaymentPageState extends State(context); payfortViewModel = Provider.of(context); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Consumer(builder: (context, bookAppointmentsVM, child) { return Column( children: [ @@ -123,7 +123,7 @@ class _WaitingAppointmentPaymentPageState extends State { children: [ Lottie.asset(AppAnimations.errorAnimation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill), SizedBox(height: 8.h), - (LocaleKeys.loginToUseService.tr(context: context)).toText16(color: AppColors.blackColor), + (LocaleKeys.loginToUseService.tr(context: context)).toText16(color: AppColors.textColor), SizedBox(height: 16.h), Row( children: [ diff --git a/lib/presentation/child_vaccine/my_child_vaccine_page.dart b/lib/presentation/child_vaccine/my_child_vaccine_page.dart index 6a226ab4..0d43035d 100644 --- a/lib/presentation/child_vaccine/my_child_vaccine_page.dart +++ b/lib/presentation/child_vaccine/my_child_vaccine_page.dart @@ -48,7 +48,7 @@ // Widget build(BuildContext context) { // appState = getIt(); // return Scaffold( -// backgroundColor: AppColors.bgScaffoldColor, +// backgroundColor: AppColors.scaffoldBgColor, // body: Consumer(builder: (context, bloodDonationVM, child) { // return Column( // children: [ @@ -59,8 +59,8 @@ // icon: AppAssets.add_icon, // text: "Add Child", // onPressed: () {}, -// backgroundColor: AppColors.bgRedLightColor, -// borderColor: AppColors.bgRedLightColor, +// backgroundColor: AppColors.secondaryLightRedColor, +// borderColor: AppColors.secondaryLightRedColor, // textColor: AppColors.primaryRedColor, // iconColor: AppColors.primaryRedColor, // padding: EdgeInsetsGeometry.symmetric(vertical: 0.h, horizontal: 10.h)), @@ -233,7 +233,7 @@ class _MyChildVaccinePageState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Column( children: [ Expanded( @@ -243,8 +243,8 @@ class _MyChildVaccinePageState extends State { icon: AppAssets.add_icon, text: "Add Child", onPressed: () {}, - backgroundColor: AppColors.bgRedLightColor, - borderColor: AppColors.bgRedLightColor, + backgroundColor: AppColors.secondaryLightRedColor, + borderColor: AppColors.secondaryLightRedColor, textColor: AppColors.primaryRedColor, iconColor: AppColors.primaryRedColor, padding: EdgeInsets.symmetric(vertical: 0.h, horizontal: 10.w), @@ -292,7 +292,7 @@ class _MyChildVaccinePageState extends State { child: Container( padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 8.h), decoration: BoxDecoration( - color: isSelected ? AppColors.bgRedLightColor : AppColors.whiteColor, + color: isSelected ? AppColors.secondaryLightRedColor : AppColors.whiteColor, borderRadius: BorderRadius.circular(12.r), border: Border.all( color: isSelected ? AppColors.primaryRedColor : AppColors.borderOnlyColor.withValues(alpha: 0.1), @@ -335,7 +335,7 @@ class _MyChildVaccinePageState extends State { Container( padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 8.h), decoration: BoxDecoration( - color: AppColors.bgScaffoldColor, + color: AppColors.scaffoldBgColor, borderRadius: BorderRadius.circular(8.r), ), child: Row( @@ -362,7 +362,7 @@ class _MyChildVaccinePageState extends State { CustomButton( text: "Send via email", onPressed: () {}, - backgroundColor: AppColors.bgRedLightColor, + backgroundColor: AppColors.secondaryLightRedColor, borderColor: Colors.transparent, textColor: AppColors.primaryRedColor, icon: AppAssets.email, diff --git a/lib/presentation/comprehensive_checkup/cmc_selection_review_page.dart b/lib/presentation/comprehensive_checkup/cmc_selection_review_page.dart index 840d38cf..2b11b899 100644 --- a/lib/presentation/comprehensive_checkup/cmc_selection_review_page.dart +++ b/lib/presentation/comprehensive_checkup/cmc_selection_review_page.dart @@ -94,7 +94,7 @@ class _CmcSelectionReviewPageState extends State { style: TextStyle( fontSize: 16.f, fontWeight: FontWeight.w700, - color: AppColors.blackColor, + color: AppColors.textColor, letterSpacing: -0.5, ), ), @@ -117,7 +117,7 @@ class _CmcSelectionReviewPageState extends State { child: Container( padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 14.h), decoration: BoxDecoration( - color: AppColors.bgScaffoldColor, + color: AppColors.scaffoldBgColor, borderRadius: BorderRadius.circular(12.r), border: Border.all( color: AppColors.greyColor.withAlpha(51), @@ -137,7 +137,7 @@ class _CmcSelectionReviewPageState extends State { style: TextStyle( fontSize: 14.f, fontWeight: isLocationSelected ? FontWeight.w600 : FontWeight.w400, - color: isLocationSelected ? AppColors.blackColor : AppColors.greyTextColor, + color: isLocationSelected ? AppColors.textColor : AppColors.greyTextColor, letterSpacing: -0.4, ), ), @@ -198,7 +198,7 @@ class _CmcSelectionReviewPageState extends State { SizedBox(height: 6.h), Row( children: [ - Expanded(child: serviceName.toText16(weight: FontWeight.w700, color: AppColors.blackColor, letterSpacing: -0.5)), + Expanded(child: serviceName.toText16(weight: FontWeight.w700, color: AppColors.textColor, letterSpacing: -0.5)), ], ), ], @@ -237,7 +237,7 @@ class _CmcSelectionReviewPageState extends State { LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true), Utils.getPaymentAmountWithSymbol( amountBeforeTax.toString().toText16(isBold: true), - AppColors.blackColor, + AppColors.textColor, 13, isSaudiCurrency: true, ), @@ -265,7 +265,7 @@ class _CmcSelectionReviewPageState extends State { "".toText14(isBold: true), Utils.getPaymentAmountWithSymbol( totalAmount.toString().toText24(isBold: true), - AppColors.blackColor, + AppColors.textColor, 17, isSaudiCurrency: true, ), diff --git a/lib/presentation/comprehensive_checkup/comprehensive_checkup_page.dart b/lib/presentation/comprehensive_checkup/comprehensive_checkup_page.dart index da926cd2..55e978a7 100644 --- a/lib/presentation/comprehensive_checkup/comprehensive_checkup_page.dart +++ b/lib/presentation/comprehensive_checkup/comprehensive_checkup_page.dart @@ -239,7 +239,7 @@ class _ComprehensiveCheckupPageState extends State { style: TextStyle( fontSize: 20.h, fontWeight: FontWeight.w700, - color: AppColors.blackColor, + color: AppColors.textColor, letterSpacing: -0.8, ), ).paddingOnly(left: 16.w, right: 16.w), @@ -259,7 +259,7 @@ class _ComprehensiveCheckupPageState extends State { subtitleWidget: Utils.getPaymentAmountWithSymbol( isExpanded: false, price.toString().toText14(), - AppColors.blackColor, + AppColors.textColor, 14, isSaudiCurrency: true, ), diff --git a/lib/presentation/comprehensive_checkup/widgets/cmc_hospital_list_item.dart b/lib/presentation/comprehensive_checkup/widgets/cmc_hospital_list_item.dart index 25cd5068..086dc23d 100644 --- a/lib/presentation/comprehensive_checkup/widgets/cmc_hospital_list_item.dart +++ b/lib/presentation/comprehensive_checkup/widgets/cmc_hospital_list_item.dart @@ -55,7 +55,7 @@ class CmcHospitalListItem extends StatelessWidget { flipX: isArabic, child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 18.h, height: 13.h, fit: BoxFit.contain, @@ -79,7 +79,7 @@ class CmcHospitalListItem extends StatelessWidget { style: TextStyle( fontWeight: FontWeight.w600, fontSize: 16, - color: AppColors.blackColor, + color: AppColors.textColor, ), ), ) @@ -108,7 +108,7 @@ class CmcHospitalListItem extends StatelessWidget { visible: (hospital.distanceInKilometers == null || hospital.distanceInKilometers == 0), child: AppCustomChipWidget( labelText: " Distance not available", - textColor: AppColors.blackColor, + textColor: AppColors.textColor, ), ), // Visibility( @@ -117,7 +117,7 @@ class CmcHospitalListItem extends StatelessWidget { // labelText: "Location turned off".needTranslation, // deleteIcon: AppAssets.location_unavailable, // deleteIconSize: Size(9.w, 12.h), - // textColor: AppColors.blackColor, + // textColor: AppColors.textColor, // ), // ), ], diff --git a/lib/presentation/contact_us/contact_us.dart b/lib/presentation/contact_us/contact_us.dart index fd0a439b..7ab856fd 100644 --- a/lib/presentation/contact_us/contact_us.dart +++ b/lib/presentation/contact_us/contact_us.dart @@ -113,7 +113,7 @@ class ContactUs extends StatelessWidget { flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 18.h, height: 13.h, fit: BoxFit.contain, diff --git a/lib/presentation/contact_us/feedback_page.dart b/lib/presentation/contact_us/feedback_page.dart index 93954af9..7dcad836 100644 --- a/lib/presentation/contact_us/feedback_page.dart +++ b/lib/presentation/contact_us/feedback_page.dart @@ -45,7 +45,7 @@ class FeedbackPage extends StatelessWidget { medicalFileViewModel = Provider.of(context, listen: false); appState = getIt.get(); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Consumer(builder: (context, contactUsVM, child) { return Column( children: [ diff --git a/lib/presentation/contact_us/find_us_page.dart b/lib/presentation/contact_us/find_us_page.dart index 5957bb83..eecbaef1 100644 --- a/lib/presentation/contact_us/find_us_page.dart +++ b/lib/presentation/contact_us/find_us_page.dart @@ -26,7 +26,7 @@ class FindUsPage extends StatelessWidget { contactUsViewModel = Provider.of(context); appState = getIt.get(); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.location.tr(), child: Consumer(builder: (context, contactUsVM, child) { diff --git a/lib/presentation/contact_us/live_chat_page.dart b/lib/presentation/contact_us/live_chat_page.dart index a602eb14..9e4f651c 100644 --- a/lib/presentation/contact_us/live_chat_page.dart +++ b/lib/presentation/contact_us/live_chat_page.dart @@ -36,7 +36,7 @@ class LiveChatPage extends StatelessWidget { appState = getIt.get(); authVm = context.read(); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Consumer(builder: (context, contactUsVM, child) { return Column( children: [ @@ -185,7 +185,7 @@ class LiveChatPage extends StatelessWidget { children: [ Lottie.asset(AppAnimations.errorAnimation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill), SizedBox(height: 8.h), - (LocaleKeys.loginToUseService.tr(context: context)).toText16(color: AppColors.blackColor), + (LocaleKeys.loginToUseService.tr(context: context)).toText16(color: AppColors.textColor), SizedBox(height: 16.h), Row( children: [ diff --git a/lib/presentation/contact_us/widgets/find_us_item_card.dart b/lib/presentation/contact_us/widgets/find_us_item_card.dart index 1774404d..efde664f 100644 --- a/lib/presentation/contact_us/widgets/find_us_item_card.dart +++ b/lib/presentation/contact_us/widgets/find_us_item_card.dart @@ -59,7 +59,7 @@ class FindUsItemCard extends StatelessWidget { style: TextStyle( fontWeight: FontWeight.w600, fontSize: 16, - color: AppColors.blackColor, + color: AppColors.textColor, ), ), ) diff --git a/lib/presentation/covid19test/covid19_landing_page.dart b/lib/presentation/covid19test/covid19_landing_page.dart index a241da60..b9a26a27 100644 --- a/lib/presentation/covid19test/covid19_landing_page.dart +++ b/lib/presentation/covid19test/covid19_landing_page.dart @@ -41,7 +41,7 @@ class _Covid19LandingPageState extends State { Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Column( children: [ Expanded( diff --git a/lib/presentation/covid19test/covid_payment_screen.dart b/lib/presentation/covid19test/covid_payment_screen.dart index e395a426..e760903d 100644 --- a/lib/presentation/covid19test/covid_payment_screen.dart +++ b/lib/presentation/covid19test/covid_payment_screen.dart @@ -87,7 +87,7 @@ class _CovidPaymentScreenState extends State { payfortViewModel = Provider.of(context); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: widget.title, bottomChild: Container( @@ -106,7 +106,7 @@ class _CovidPaymentScreenState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true), - Utils.getPaymentAmountWithSymbol(( (widget.amount - widget.taxAmount).toString()).toText16(isBold: true), AppColors.blackColor, 13, isSaudiCurrency: true), + Utils.getPaymentAmountWithSymbol(( (widget.amount - widget.taxAmount).toString()).toText16(isBold: true), AppColors.textColor, 13, isSaudiCurrency: true), ], ).paddingSymmetrical(24.h, 0.h), Row( @@ -122,7 +122,7 @@ class _CovidPaymentScreenState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ "".toText14(isBold: true), - Utils.getPaymentAmountWithSymbol(widget.amount.toString().toText24(isBold: true), AppColors.blackColor, 17, isSaudiCurrency: true), + Utils.getPaymentAmountWithSymbol(widget.amount.toString().toText24(isBold: true), AppColors.textColor, 17, isSaudiCurrency: true), ], ).paddingSymmetrical(24.h, 0.h), @@ -221,7 +221,7 @@ class _CovidPaymentScreenState extends State { flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 18.h, height: 13.h, fit: BoxFit.contain, @@ -266,7 +266,7 @@ class _CovidPaymentScreenState extends State { flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 18.h, height: 13.h, fit: BoxFit.contain, @@ -321,7 +321,7 @@ class _CovidPaymentScreenState extends State { flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 18.h, height: 13.h, fit: BoxFit.contain, diff --git a/lib/presentation/covid19test/covid_review_screen.dart b/lib/presentation/covid19test/covid_review_screen.dart index 34401298..43a11d20 100644 --- a/lib/presentation/covid19test/covid_review_screen.dart +++ b/lib/presentation/covid19test/covid_review_screen.dart @@ -78,7 +78,7 @@ class _CovidReviewScreenState extends State { LocaleKeys.amountBeforeTax.tr(context: context).toText18(isBold: true), Utils.getPaymentAmountWithSymbol( (info.patientShareField ?? 0).toString().toText16(isBold: true), - AppColors.blackColor, + AppColors.textColor, 13, isSaudiCurrency: true), ], @@ -90,7 +90,7 @@ class _CovidReviewScreenState extends State { LocaleKeys.vat15.tr(context: context).toText14(isBold: true), Utils.getPaymentAmountWithSymbol( (info.patientTaxAmountField ?? 0).toString().toText16(isBold: true), - AppColors.blackColor, + AppColors.textColor, 13, isSaudiCurrency: true) ], @@ -108,7 +108,7 @@ class _CovidReviewScreenState extends State { children: [ Utils.getPaymentAmountWithSymbol( (info.patientShareWithTaxField ?? 0).toString().toText24(isBold: true), - AppColors.blackColor, + AppColors.textColor, 17, isSaudiCurrency: true), ], diff --git a/lib/presentation/e_referral/new_e_referral.dart b/lib/presentation/e_referral/new_e_referral.dart index 02881730..7951a398 100644 --- a/lib/presentation/e_referral/new_e_referral.dart +++ b/lib/presentation/e_referral/new_e_referral.dart @@ -157,7 +157,7 @@ class _NewReferralPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.eReferral.tr(context: context), isClose: false, diff --git a/lib/presentation/e_referral/widget/e-referral_otp.dart b/lib/presentation/e_referral/widget/e-referral_otp.dart index 390fc71f..0dfb1a55 100644 --- a/lib/presentation/e_referral/widget/e-referral_otp.dart +++ b/lib/presentation/e_referral/widget/e-referral_otp.dart @@ -89,7 +89,7 @@ class OTPService { } }, backgroundColor: AppColors.primaryRedColor, - borderColor: AppColors.primaryRedBorderColor, + borderColor: AppColors.primaryRedColor, textColor: AppColors.whiteColor, icon: AppAssets.message, ), diff --git a/lib/presentation/emergency_services/RRT/rrt_map_screen.dart b/lib/presentation/emergency_services/RRT/rrt_map_screen.dart index 530152b1..08ff5622 100644 --- a/lib/presentation/emergency_services/RRT/rrt_map_screen.dart +++ b/lib/presentation/emergency_services/RRT/rrt_map_screen.dart @@ -440,7 +440,7 @@ class RrtMapScreen extends StatelessWidget { fontWeight: FontWeight.w600, color: AppColors.textColor, letterSpacing: -2), - AppColors.blackColor, + AppColors.textColor, 17.h) // Utils.getPaymentAmountWithSymbol2(context.read().selectedTransportOption?.priceTotal??"0", letterSpacing: -2) diff --git a/lib/presentation/emergency_services/RRT/rrt_request_type_select.dart b/lib/presentation/emergency_services/RRT/rrt_request_type_select.dart index 91db0ded..5e7f4061 100644 --- a/lib/presentation/emergency_services/RRT/rrt_request_type_select.dart +++ b/lib/presentation/emergency_services/RRT/rrt_request_type_select.dart @@ -80,7 +80,7 @@ class RrtRequestTypeSelect extends StatelessWidget { Utils.getPaymentAmountWithSymbol( (Utils.formatNumberToInternationalFormat(context.read().selectedRRTProcedure?.patientShare ?? 0)) .toText24(fontWeight: FontWeight.w600, color: AppColors.textColor, letterSpacing: -2), - AppColors.blackColor, + AppColors.textColor, 17.h) ], ), @@ -140,7 +140,7 @@ class RrtRequestTypeSelect extends StatelessWidget { Utils.getPaymentAmountWithSymbol( (Utils.formatNumberToInternationalFormat(context.read().selectedRRTProcedure?.patientShareWithTax ?? 0)) .toText24(fontWeight: FontWeight.w600, color: AppColors.textColor, letterSpacing: -2), - AppColors.blackColor, + AppColors.textColor, 17.h), ], ) diff --git a/lib/presentation/emergency_services/call_ambulance/call_ambulance_page.dart b/lib/presentation/emergency_services/call_ambulance/call_ambulance_page.dart index 5a368a3b..19a61a8e 100644 --- a/lib/presentation/emergency_services/call_ambulance/call_ambulance_page.dart +++ b/lib/presentation/emergency_services/call_ambulance/call_ambulance_page.dart @@ -448,7 +448,7 @@ class CallAmbulancePage extends StatelessWidget { Utils.getPaymentAmountWithSymbol( (Utils.formatNumberToInternationalFormat(context.read().getTotalPrice() ?? 0)) .toText24(fontWeight: FontWeight.w600, color: AppColors.textColor, letterSpacing: -2), - AppColors.blackColor, + AppColors.textColor, 17.h) // Utils.getPaymentAmountWithSymbol2(context.read().selectedTransportOption?.priceTotal??"0", letterSpacing: -2) diff --git a/lib/presentation/emergency_services/call_ambulance/tracking_screen.dart b/lib/presentation/emergency_services/call_ambulance/tracking_screen.dart index 9a49dd06..b6b9215c 100644 --- a/lib/presentation/emergency_services/call_ambulance/tracking_screen.dart +++ b/lib/presentation/emergency_services/call_ambulance/tracking_screen.dart @@ -476,11 +476,11 @@ class TrackingScreen extends StatelessWidget { spacing: 8.h, children: [ Flexible(child: - chip(order?.pickupLocation??"", AppAssets.location_pickup, AppColors.blackBgColor), + chip(order?.pickupLocation??"", AppAssets.location_pickup, AppColors.textColor), ), Flexible(child: - chip(order?.dropOffLocation??"", AppAssets.hospital, AppColors.blackBgColor), + chip(order?.dropOffLocation??"", AppAssets.hospital, AppColors.textColor), ) ], @@ -492,11 +492,11 @@ class TrackingScreen extends StatelessWidget { // spacing: 8.h, // children: [ // Flexible(child: - // chip(rrtOrder?.pickupLocation??"", AppAssets.location_pickup, AppColors.blackBgColor), + // chip(rrtOrder?.pickupLocation??"", AppAssets.location_pickup, AppColors.textColor), // // ), // // Flexible(child: - // // chip(rrtOrder?.??"", AppAssets.hospital, AppColors.blackBgColor), + // // chip(rrtOrder?.??"", AppAssets.hospital, AppColors.textColor), // // // // ) // ], diff --git a/lib/presentation/emergency_services/call_ambulance/widgets/AddressItem.dart b/lib/presentation/emergency_services/call_ambulance/widgets/AddressItem.dart index 13e32561..80f821c0 100644 --- a/lib/presentation/emergency_services/call_ambulance/widgets/AddressItem.dart +++ b/lib/presentation/emergency_services/call_ambulance/widgets/AddressItem.dart @@ -36,7 +36,7 @@ class AddressItem extends StatelessWidget { child: CircleAvatar( radius: 70.h, backgroundColor: - isSelected ? AppColors.errorLightColor : Colors.transparent, + isSelected ? AppColors.primaryRedColor : Colors.transparent, ).paddingAll(3.h), ), ), diff --git a/lib/presentation/emergency_services/call_ambulance/widgets/type_selection_widget.dart b/lib/presentation/emergency_services/call_ambulance/widgets/type_selection_widget.dart index 3ae93d0d..b3be6c30 100644 --- a/lib/presentation/emergency_services/call_ambulance/widgets/type_selection_widget.dart +++ b/lib/presentation/emergency_services/call_ambulance/widgets/type_selection_widget.dart @@ -34,7 +34,7 @@ class TypeSelectionWidget extends StatelessWidget { side: BorderSide( color: selectedFacility == FacilitySelection.ALL ? AppColors.errorColor - : AppColors.chipBorderColorOpacity20, + : AppColors.borderGrayColor, width: 1, ), borderRadius: BorderRadius.circular(10)), @@ -42,7 +42,7 @@ class TypeSelectionWidget extends StatelessWidget { selectedFacility == FacilitySelection.ALL ?AppColors.secondaryLightRedColor: AppColors.whiteColor, textColor: selectedFacility == FacilitySelection.ALL - ? AppColors.errorColor:AppColors.blackColor + ? AppColors.errorColor:AppColors.textColor , ).onPress((){ onitemClicked(FacilitySelection.ALL); @@ -57,7 +57,7 @@ class TypeSelectionWidget extends StatelessWidget { side: BorderSide( color: selectedFacility == FacilitySelection.HMG ? AppColors.errorColor - : AppColors.chipBorderColorOpacity20, + : AppColors.borderGrayColor, width: 1, ), borderRadius: BorderRadius.circular(10)), @@ -66,7 +66,7 @@ class TypeSelectionWidget extends StatelessWidget { ?AppColors.secondaryLightRedColor: AppColors.whiteColor, textColor: selectedFacility == FacilitySelection.HMG ? AppColors.errorColor - : AppColors.blackColor, + : AppColors.textColor, ).onPress((){ onitemClicked(FacilitySelection.HMG); }), @@ -81,7 +81,7 @@ class TypeSelectionWidget extends StatelessWidget { side: BorderSide( color: selectedFacility == FacilitySelection.HMC ? AppColors.errorColor - : AppColors.chipBorderColorOpacity20, + : AppColors.borderGrayColor, width: 1, ), borderRadius: BorderRadius.circular(10)), @@ -90,7 +90,7 @@ class TypeSelectionWidget extends StatelessWidget { ?AppColors.secondaryLightRedColor: AppColors.whiteColor, textColor: selectedFacility == FacilitySelection.HMC ? AppColors.errorColor - : AppColors.blackColor, + : AppColors.textColor, ).onPress((){ onitemClicked(FacilitySelection.HMC); }), diff --git a/lib/presentation/emergency_services/emergency_services_page.dart b/lib/presentation/emergency_services/emergency_services_page.dart index a5281ca0..61d09d90 100644 --- a/lib/presentation/emergency_services/emergency_services_page.dart +++ b/lib/presentation/emergency_services/emergency_services_page.dart @@ -59,7 +59,7 @@ class EmergencyServicesPage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - LocaleKeys.callAmbulance.tr().toText16(isBold: true, color: AppColors.blackColor), + LocaleKeys.callAmbulance.tr().toText16(isBold: true, color: AppColors.textColor), LocaleKeys.requestAmbulanceInEmergency.tr() .toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500), ], @@ -146,7 +146,7 @@ class EmergencyServicesPage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - LocaleKeys.nearester.tr(context: context).toText16(isBold: true, color: AppColors.blackColor), + LocaleKeys.nearester.tr(context: context).toText16(isBold: true, color: AppColors.textColor), LocaleKeys.getDetailsOfNearestBranch.tr() .toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500), ], @@ -175,7 +175,7 @@ class EmergencyServicesPage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - LocaleKeys.rapidResponseTeam.tr(context: context).toText16(isBold: true, color: AppColors.blackColor), + LocaleKeys.rapidResponseTeam.tr(context: context).toText16(isBold: true, color: AppColors.textColor), "Comprehensive medical service for all sorts of urgent and stable cases" .toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500), ], @@ -274,7 +274,7 @@ class EmergencyServicesPage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - LocaleKeys.emergencyCheckIn.tr(context: context).toText16(isBold: true, color: AppColors.blackColor), + LocaleKeys.emergencyCheckIn.tr(context: context).toText16(isBold: true, color: AppColors.textColor), LocaleKeys.priorERCheckInToSkipLine.tr() .toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500), ], diff --git a/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_home.dart b/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_home.dart index 7f206c17..abb4a04e 100644 --- a/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_home.dart +++ b/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_home.dart @@ -36,7 +36,7 @@ class ErOnlineCheckinHome extends StatelessWidget { _supportsNFC = (value == NFCAvailability.available); }); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Column( children: [ Expanded( diff --git a/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_payment_details_page.dart b/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_payment_details_page.dart index 463121d9..418917a4 100644 --- a/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_payment_details_page.dart +++ b/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_payment_details_page.dart @@ -29,7 +29,7 @@ class ErOnlineCheckinPaymentDetailsPage extends StatelessWidget { appState = getIt.get(); emergencyServicesViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Column( children: [ Expanded( @@ -109,7 +109,7 @@ class ErOnlineCheckinPaymentDetailsPage extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ LocaleKeys.amountBeforeTax.tr().toText18(isBold: true), - Utils.getPaymentAmountWithSymbol(emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShare.toString().toText16(isBold: true), AppColors.blackColor, 13, + Utils.getPaymentAmountWithSymbol(emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShare.toString().toText16(isBold: true), AppColors.textColor, 13, isSaudiCurrency: true), ], ), @@ -135,7 +135,7 @@ class ErOnlineCheckinPaymentDetailsPage extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Utils.getPaymentAmountWithSymbol( - emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax.toString().toText24(isBold: true), AppColors.blackColor, 17, + emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax.toString().toText24(isBold: true), AppColors.textColor, 17, isSaudiCurrency: true), ], ), diff --git a/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_payment_page.dart b/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_payment_page.dart index 26456794..e3eef7ec 100644 --- a/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_payment_page.dart +++ b/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_payment_page.dart @@ -76,7 +76,7 @@ class _ErOnlineCheckinPaymentPageState extends State payfortViewModel = Provider.of(context, listen: false); emergencyServicesViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Column( children: [ Expanded( @@ -109,7 +109,7 @@ class _ErOnlineCheckinPaymentPageState extends State flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 40.h, height: 40.h, fit: BoxFit.contain, @@ -151,7 +151,7 @@ class _ErOnlineCheckinPaymentPageState extends State flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 40.h, height: 40.h, fit: BoxFit.contain, @@ -188,7 +188,7 @@ class _ErOnlineCheckinPaymentPageState extends State flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 40.h, height: 40.h, fit: BoxFit.contain, @@ -221,7 +221,7 @@ class _ErOnlineCheckinPaymentPageState extends State ? Container( height: 50.h, decoration: ShapeDecoration( - color: AppColors.secondaryLightRedBorderColor, + color: AppColors.secondaryLightRedColor, shape: SmoothRectangleBorder( borderRadius: BorderRadius.only(topLeft: Radius.circular(24), topRight: Radius.circular(24)), smoothness: 1, @@ -241,7 +241,7 @@ class _ErOnlineCheckinPaymentPageState extends State ); }, backgroundColor: AppColors.primaryRedColor, - borderColor: AppColors.secondaryLightRedBorderColor, + borderColor: AppColors.secondaryLightRedColor, textColor: AppColors.whiteColor, fontSize: 10, fontWeight: FontWeight.w500, @@ -260,7 +260,7 @@ class _ErOnlineCheckinPaymentPageState extends State mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true), - Utils.getPaymentAmountWithSymbol(emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShare.toString().toText16(isBold: true), AppColors.blackColor, 13, + Utils.getPaymentAmountWithSymbol(emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShare.toString().toText16(isBold: true), AppColors.textColor, 13, isSaudiCurrency: true), ], ).paddingSymmetrical(24.h, 0.h), @@ -278,7 +278,7 @@ class _ErOnlineCheckinPaymentPageState extends State mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ "".toText14(isBold: true), - Utils.getPaymentAmountWithSymbol(emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax.toString().toText24(isBold: true), AppColors.blackColor, 17, + Utils.getPaymentAmountWithSymbol(emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax.toString().toText24(isBold: true), AppColors.textColor, 17, isSaudiCurrency: true), ], ).paddingSymmetrical(24.h, 0.h), diff --git a/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_select_checkin_bottom_sheet.dart b/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_select_checkin_bottom_sheet.dart index 3b2dc8ae..487dcfb0 100644 --- a/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_select_checkin_bottom_sheet.dart +++ b/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_select_checkin_bottom_sheet.dart @@ -117,7 +117,7 @@ class ErOnlineCheckinSelectCheckinBottomSheet extends StatelessWidget { flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 18.h, height: 13.h, fit: BoxFit.contain, diff --git a/lib/presentation/emergency_services/history/er_history_listing.dart b/lib/presentation/emergency_services/history/er_history_listing.dart index a60d4556..4756f6b6 100644 --- a/lib/presentation/emergency_services/history/er_history_listing.dart +++ b/lib/presentation/emergency_services/history/er_history_listing.dart @@ -97,12 +97,12 @@ class ErHistoryListing extends StatelessWidget { labelText: LocaleKeys.allFacilities.tr(context: context), shape: RoundedRectangleBorder( side: BorderSide( - color: value == OrderDislpay.ALL ? AppColors.errorColor : AppColors.chipBorderColorOpacity20, + color: value == OrderDislpay.ALL ? AppColors.errorColor : AppColors.borderGrayColor, width: 1, ), borderRadius: BorderRadius.circular(10)), backgroundColor: value == OrderDislpay.ALL ? AppColors.secondaryLightRedColor : AppColors.whiteColor, - textColor: value == OrderDislpay.ALL ? AppColors.errorColor : AppColors.blackColor, + textColor: value == OrderDislpay.ALL ? AppColors.errorColor : AppColors.textColor, ).onPress(() { context.read().changeOrderDisplayItems(OrderDislpay.ALL); }).toShimmer2(isShow: isLoading), @@ -115,12 +115,12 @@ class ErHistoryListing extends StatelessWidget { icon: AppAssets.ambulance, shape: RoundedRectangleBorder( side: BorderSide( - color: value == OrderDislpay.AMBULANCE ? AppColors.errorColor : AppColors.chipBorderColorOpacity20, + color: value == OrderDislpay.AMBULANCE ? AppColors.errorColor : AppColors.borderGrayColor, width: 1, ), borderRadius: BorderRadius.circular(10)), backgroundColor: value == OrderDislpay.AMBULANCE ? AppColors.secondaryLightRedColor : AppColors.whiteColor, - textColor: value == OrderDislpay.AMBULANCE ? AppColors.errorColor : AppColors.blackColor, + textColor: value == OrderDislpay.AMBULANCE ? AppColors.errorColor : AppColors.textColor, ).toShimmer2(isShow: isLoading).onPress(() { context.read().changeOrderDisplayItems(OrderDislpay.AMBULANCE); }), @@ -134,12 +134,12 @@ class ErHistoryListing extends StatelessWidget { icon: AppAssets.ic_rrt_vehicle, shape: RoundedRectangleBorder( side: BorderSide( - color: value == OrderDislpay.RRT ? AppColors.errorColor : AppColors.chipBorderColorOpacity20, + color: value == OrderDislpay.RRT ? AppColors.errorColor : AppColors.borderGrayColor, width: 1, ), borderRadius: BorderRadius.circular(10)), backgroundColor: value == OrderDislpay.RRT ? AppColors.secondaryLightRedColor : AppColors.whiteColor, - textColor: value == OrderDislpay.RRT ? AppColors.errorColor : AppColors.blackColor, + textColor: value == OrderDislpay.RRT ? AppColors.errorColor : AppColors.textColor, ).toShimmer2(isShow: isLoading).onPress(() { context.read().changeOrderDisplayItems(OrderDislpay.RRT); }), diff --git a/lib/presentation/emergency_services/history/widget/ambulance_history_item.dart b/lib/presentation/emergency_services/history/widget/ambulance_history_item.dart index 7b17eab8..2331393e 100644 --- a/lib/presentation/emergency_services/history/widget/ambulance_history_item.dart +++ b/lib/presentation/emergency_services/history/widget/ambulance_history_item.dart @@ -41,8 +41,8 @@ class AmbulanceHistoryItem extends StatelessWidget { Row( spacing: 4.w, children: [ - chip( Utils.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.time)), AppAssets.calendar, AppColors.blackBgColor), - chip(LocaleKeys.ambulancerequest.tr(context: context), AppAssets.ambulance, AppColors.blackBgColor), + chip( Utils.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.time)), AppAssets.calendar, AppColors.textColor), + chip(LocaleKeys.ambulancerequest.tr(context: context), AppAssets.ambulance, AppColors.textColor), ], ), Row( diff --git a/lib/presentation/emergency_services/history/widget/rrt_item.dart b/lib/presentation/emergency_services/history/widget/rrt_item.dart index d345e2df..f5130134 100644 --- a/lib/presentation/emergency_services/history/widget/rrt_item.dart +++ b/lib/presentation/emergency_services/history/widget/rrt_item.dart @@ -41,8 +41,8 @@ class RRTItem extends StatelessWidget { Row( spacing: 4.w, children: [ - chip( Utils.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.time)), AppAssets.calendar, AppColors.blackBgColor), - chip(LocaleKeys.rapidResponseTeam.tr(context: context), AppAssets.ic_rrt_vehicle, AppColors.blackBgColor), + chip( Utils.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.time)), AppAssets.calendar, AppColors.textColor), + chip(LocaleKeys.rapidResponseTeam.tr(context: context), AppAssets.ic_rrt_vehicle, AppColors.textColor), ], ), SizedBox(height: 4.h), diff --git a/lib/presentation/emergency_services/widgets/location_input_bottom_sheet.dart b/lib/presentation/emergency_services/widgets/location_input_bottom_sheet.dart index db45654a..eac1426d 100644 --- a/lib/presentation/emergency_services/widgets/location_input_bottom_sheet.dart +++ b/lib/presentation/emergency_services/widgets/location_input_bottom_sheet.dart @@ -87,7 +87,7 @@ class LocationInputBottomSheet extends StatelessWidget { Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 20.h, height: 15.h, fit: BoxFit.contain, diff --git a/lib/presentation/habib_wallet/habib_wallet_page.dart b/lib/presentation/habib_wallet/habib_wallet_page.dart index c90003a8..5015629e 100644 --- a/lib/presentation/habib_wallet/habib_wallet_page.dart +++ b/lib/presentation/habib_wallet/habib_wallet_page.dart @@ -31,7 +31,7 @@ class _HabibWalletState extends State { habibWalletVM = Provider.of(context, listen: false); AppState _appState = getIt.get(); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.myWallet.tr(), child: Padding( @@ -44,7 +44,7 @@ class _HabibWalletState extends State { width: double.infinity, height: 180.h, decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.blackBgColor, + color: AppColors.textColor, borderRadius: 24, ), child: Padding( diff --git a/lib/presentation/habib_wallet/recharge_wallet_page.dart b/lib/presentation/habib_wallet/recharge_wallet_page.dart index c4587bf9..51f7b300 100644 --- a/lib/presentation/habib_wallet/recharge_wallet_page.dart +++ b/lib/presentation/habib_wallet/recharge_wallet_page.dart @@ -13,8 +13,8 @@ import 'package:hmg_patient_app_new/features/habib_wallet/habib_wallet_view_mode import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/presentation/habib_wallet/wallet_payment_confirm_page.dart'; import 'package:hmg_patient_app_new/presentation/habib_wallet/widgets/select_hospital_bottom_sheet.dart'; -import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/theme/colors.dart'; +import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart'; import 'package:hmg_patient_app_new/widgets/input_widget.dart'; @@ -41,7 +41,9 @@ class _RechargeWalletPageState extends State { @override void initState() { scheduleMicrotask(() { - habibWalletVM.setDepositorDetails(appState.getAuthenticatedUser()!.patientId.toString(), "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}", + habibWalletVM.setDepositorDetails( + appState.getAuthenticatedUser()!.patientId.toString(), + "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}", appState.getAuthenticatedUser()!.mobileNumber!); habibWalletVM.setSelectedRechargeType(0); habibWalletVM.getProjectsList(); @@ -54,7 +56,7 @@ class _RechargeWalletPageState extends State { habibWalletVM = Provider.of(context, listen: false); appState = getIt.get(); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -138,7 +140,8 @@ class _RechargeWalletPageState extends State { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - (habibWalletVM.getSelectedRechargeTypeValue()).toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500), + (habibWalletVM.getSelectedRechargeTypeValue()) + .toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500), "${LocaleKeys.medicalFile.tr(context: context)}: ${habibWalletVM.fileNumber}" .toText14(color: AppColors.textColor, weight: FontWeight.w500, letterSpacing: -0.2), ], @@ -164,7 +167,7 @@ class _RechargeWalletPageState extends State { }), callBackFunc: () {}, isFullScreen: false, isCloseButtonVisible: true); }), SizedBox(height: 16.h), - Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.1), height: 1.h), + Divider(color: AppColors.textColor.withValues(alpha: 0.1), height: 1.h), SizedBox(height: 16.h), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, @@ -176,10 +179,14 @@ class _RechargeWalletPageState extends State { Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - LocaleKeys.hospital.tr(context: context).toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500), + LocaleKeys.hospital + .tr(context: context) + .toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500), SizedBox( width: MediaQuery.of(context).size.width * 0.55, - child: (habibWalletVM.selectedHospital != null ? habibWalletVM.selectedHospital!.name : LocaleKeys.selectHospital.tr(context: context))! + child: (habibWalletVM.selectedHospital != null + ? habibWalletVM.selectedHospital!.name + : LocaleKeys.selectHospital.tr(context: context))! .toText14(color: AppColors.textColor, weight: FontWeight.w500), ), ], @@ -190,10 +197,13 @@ class _RechargeWalletPageState extends State { ], ).onPress(() { showCommonBottomSheetWithoutHeight(context, - title: LocaleKeys.selectHospital.tr(context: context), isDismissible: false, child: SelectHospitalBottomSheet(), callBackFunc: () {}); + title: LocaleKeys.selectHospital.tr(context: context), + isDismissible: false, + child: SelectHospitalBottomSheet(), + callBackFunc: () {}); }), SizedBox(height: 16.h), - Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.1), height: 1.h), + Divider(color: AppColors.textColor.withValues(alpha: 0.1), height: 1.h), SizedBox(height: 16.h), Row( children: [ @@ -203,13 +213,14 @@ class _RechargeWalletPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ LocaleKeys.email.tr(context: context).toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500), - "${appState.getAuthenticatedUser()!.emailAddress}".toText14(color: AppColors.textColor, weight: FontWeight.w500, letterSpacing: -0.2), + "${appState.getAuthenticatedUser()!.emailAddress}" + .toText14(color: AppColors.textColor, weight: FontWeight.w500, letterSpacing: -0.2), ], ), ], ), SizedBox(height: 16.h), - Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.1), height: 1.h), + Divider(color: AppColors.textColor.withValues(alpha: 0.1), height: 1.h), SizedBox(height: 16.h), TextInputWidget( labelText: LocaleKeys.notes.tr(context: context), diff --git a/lib/presentation/habib_wallet/wallet_payment_confirm_page.dart b/lib/presentation/habib_wallet/wallet_payment_confirm_page.dart index 4585b7d0..73460ce0 100644 --- a/lib/presentation/habib_wallet/wallet_payment_confirm_page.dart +++ b/lib/presentation/habib_wallet/wallet_payment_confirm_page.dart @@ -56,7 +56,7 @@ class _WalletPaymentConfirmPageState extends State { habibWalletVM = Provider.of(context, listen: false); payfortViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -91,7 +91,7 @@ class _WalletPaymentConfirmPageState extends State { flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 18.h, height: 13.h, fit: BoxFit.contain, @@ -133,7 +133,7 @@ class _WalletPaymentConfirmPageState extends State { flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 18.h, height: 13.h, fit: BoxFit.contain, @@ -175,13 +175,13 @@ class _WalletPaymentConfirmPageState extends State { ], ).paddingSymmetrical(24.h, 0.h), SizedBox(height: 16.h), - Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.1), height: 1.h).paddingSymmetrical(24.h, 0.h), + Divider(color: AppColors.textColor.withValues(alpha: 0.1), height: 1.h).paddingSymmetrical(24.h, 0.h), SizedBox(height: 16.h), Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ LocaleKeys.totalAmountToPay.tr(context: context).toText16(isBold: true), - Utils.getPaymentAmountWithSymbol(habibWalletVM.walletRechargeAmount.toString().toText24(isBold: true), AppColors.blackColor, 15.h, isSaudiCurrency: true), + Utils.getPaymentAmountWithSymbol(habibWalletVM.walletRechargeAmount.toString().toText24(isBold: true), AppColors.textColor, 15.h, isSaudiCurrency: true), ], ).paddingSymmetrical(24.h, 0.h), SizedBox(height: 12.h), diff --git a/lib/presentation/habib_wallet/widgets/hospital_list_item.dart b/lib/presentation/habib_wallet/widgets/hospital_list_item.dart index a46f79db..a21d3624 100644 --- a/lib/presentation/habib_wallet/widgets/hospital_list_item.dart +++ b/lib/presentation/habib_wallet/widgets/hospital_list_item.dart @@ -39,7 +39,7 @@ class HospitalListItemAdvancePayment extends StatelessWidget { flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 40.h, height: 40.h, fit: BoxFit.contain, @@ -61,7 +61,7 @@ class HospitalListItemAdvancePayment extends StatelessWidget { style: TextStyle( fontWeight: FontWeight.w600, fontSize: 16, - color: AppColors.blackColor, + color: AppColors.textColor, ), ), ) diff --git a/lib/presentation/habib_wallet/widgets/select-medical_file.dart b/lib/presentation/habib_wallet/widgets/select-medical_file.dart index 6fed6522..a0fae91c 100644 --- a/lib/presentation/habib_wallet/widgets/select-medical_file.dart +++ b/lib/presentation/habib_wallet/widgets/select-medical_file.dart @@ -116,7 +116,7 @@ class _MultiPageBottomSheetState extends State { onError: (error) {}); }, backgroundColor: AppColors.primaryRedColor, - borderColor: AppColors.primaryRedBorderColor, + borderColor: AppColors.primaryRedColor, textColor: AppColors.whiteColor, ), ], diff --git a/lib/presentation/habib_wallet/widgets/select_hospital_bottom_sheet.dart b/lib/presentation/habib_wallet/widgets/select_hospital_bottom_sheet.dart index da374a04..79aa2a73 100644 --- a/lib/presentation/habib_wallet/widgets/select_hospital_bottom_sheet.dart +++ b/lib/presentation/habib_wallet/widgets/select_hospital_bottom_sheet.dart @@ -26,7 +26,7 @@ class SelectHospitalBottomSheet extends StatelessWidget { // style: TextStyle( // fontSize: 21, // fontWeight: FontWeight.w600, - // color: AppColors.blackColor, + // color: AppColors.textColor, // ), // ), Text( diff --git a/lib/presentation/health_calculators_and_converts/health_calculator_detailed_page.dart b/lib/presentation/health_calculators_and_converts/health_calculator_detailed_page.dart index 8cccf031..2d0f0091 100644 --- a/lib/presentation/health_calculators_and_converts/health_calculator_detailed_page.dart +++ b/lib/presentation/health_calculators_and_converts/health_calculator_detailed_page.dart @@ -69,8 +69,8 @@ class _HealthCalculatorDetailedPageState extends State { FocusScope.of(context).unfocus(); }, child: Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: _getPageTitle(), bottomChild: Container( diff --git a/lib/presentation/health_trackers/health_tracker_detail_page.dart b/lib/presentation/health_trackers/health_tracker_detail_page.dart index b5f41dae..123fce10 100644 --- a/lib/presentation/health_trackers/health_tracker_detail_page.dart +++ b/lib/presentation/health_trackers/health_tracker_detail_page.dart @@ -1248,7 +1248,7 @@ class _HealthTrackerDetailPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( sendEmail: () async => onSendEmailPressed(context), title: _getPageTitle(), diff --git a/lib/presentation/hmg_services/services_page.dart b/lib/presentation/hmg_services/services_page.dart index 4458b75a..0ea83c4f 100644 --- a/lib/presentation/hmg_services/services_page.dart +++ b/lib/presentation/hmg_services/services_page.dart @@ -19,7 +19,6 @@ import 'package:hmg_patient_app_new/features/hospital/hospital_selection_view_mo import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart'; import 'package:hmg_patient_app_new/features/water_monitor/water_monitor_view_model.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; -import 'package:hmg_patient_app_new/presentation/blood_donation/blood_donation_page.dart'; import 'package:hmg_patient_app_new/presentation/contact_us/contact_us.dart'; import 'package:hmg_patient_app_new/presentation/emergency_services/emergency_services_page.dart'; import 'package:hmg_patient_app_new/presentation/habib_wallet/habib_wallet_page.dart'; @@ -53,7 +52,14 @@ class ServicesPage extends StatelessWidget { late MedicalFileViewModel medicalFileViewModel; late final List hmgServices = [ - HmgServicesComponentModel(11, LocaleKeys.emergencyServices.tr(), "", AppAssets.emergency_services_icon, bgColor: AppColors.primaryRedColor, true, route: null, onTap: () async { + HmgServicesComponentModel( + 11, + LocaleKeys.emergencyServices.tr(), + "", + AppAssets.emergency_services_icon, + bgColor: AppColors.primaryRedColor, + true, + route: null, onTap: () async { if (getIt.get().isAuthenticated) { getIt.get().flushData(); getIt.get().getTransportationOrders( @@ -81,7 +87,8 @@ class ServicesPage extends StatelessWidget { true, route: AppRoutes.bookAppointmentPage, ), - HmgServicesComponentModel(5, LocaleKeys.completeCheckup.tr(), "", AppAssets.comprehensiveCheckup, bgColor: AppColors.bgGreenColor, true, route: null, onTap: () async { + HmgServicesComponentModel( + 5, LocaleKeys.completeCheckup.tr(), "", AppAssets.comprehensiveCheckup, bgColor: AppColors.bgGreenColor, true, route: null, onTap: () async { if (getIt.get().isAuthenticated) { getIt.get().pushPageRoute(AppRoutes.comprehensiveCheckupPage); } else { @@ -133,7 +140,8 @@ class ServicesPage extends StatelessWidget { ); }, ), - HmgServicesComponentModel(11, LocaleKeys.eReferralServices.tr(), "", AppAssets.eReferral, bgColor: AppColors.eReferralCardColor, true, route: null, onTap: () async { + HmgServicesComponentModel( + 11, LocaleKeys.eReferralServices.tr(), "", AppAssets.eReferral, bgColor: AppColors.eReferralCardColor, true, route: null, onTap: () async { if (getIt.get().isAuthenticated) { getIt.get().pushPageRoute(AppRoutes.eReferralPage); } else { @@ -312,7 +320,7 @@ class ServicesPage extends StatelessWidget { hmgServices.removeWhere((element) => Utils.havePrivilege(element.action) == false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.exploreServices.tr(), isLeading: showBackIcon, @@ -343,7 +351,7 @@ class ServicesPage extends StatelessWidget { height: 350.h, child: ListView.separated( scrollDirection: Axis.horizontal, - itemCount: LandingPageData.getServiceCardsList.length, + itemCount: LandingPageData.getServiceCards(context).length, shrinkWrap: true, padding: EdgeInsets.symmetric(horizontal: 24.w), itemBuilder: (context, index) { @@ -354,11 +362,11 @@ class ServicesPage extends StatelessWidget { horizontalOffset: 100.0, child: FadeInAnimation( child: LargeServiceCard( - serviceCardData: LandingPageData.getServiceCardsList[index], - image: LandingPageData.getServiceCardsList[index].icon, - title: LandingPageData.getServiceCardsList[index].title, - subtitle: LandingPageData.getServiceCardsList[index].subtitle, - icon: LandingPageData.getServiceCardsList[index].largeCardIcon, + serviceCardData: LandingPageData.getServiceCards(context)[index], + image: LandingPageData.getServiceCards(context)[index].icon, + title: LandingPageData.getServiceCards(context)[index].title, + subtitle: LandingPageData.getServiceCards(context)[index].subtitle, + icon: LandingPageData.getServiceCards(context)[index].largeCardIcon, ), ), ), @@ -378,7 +386,7 @@ class ServicesPage extends StatelessWidget { width: 183.h, padding: EdgeInsets.all(16.w), decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, + color: context.greyColor, borderRadius: 20.r, hasShadow: false, ), @@ -397,23 +405,28 @@ class ServicesPage extends StatelessWidget { Spacer(), getIt.get().isAuthenticated ? Consumer(builder: (context, habibWalletVM, child) { - return Utils.getPaymentAmountWithSymbol2(habibWalletVM.habibWalletAmount, isExpanded: false) - .toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.r, width: 80.w, height: 24.h); + return Utils.getPaymentAmountWithSymbol2( + habibWalletVM.habibWalletAmount, + isExpanded: false, + iconColor: context.iconColor, + textColor: context.textColor, + ).toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.r, width: 80.w, height: 24.h); }) : LocaleKeys.loginToViewWalletBalance.tr().toText12(fontWeight: FontWeight.w500, maxLine: 2), Spacer(), getIt.get().isAuthenticated ? CustomButton( + isIconOnEnd: true, height: 40.h, icon: AppAssets.recharge_icon, iconSize: 24.w, - iconColor: AppColors.infoColor, - textColor: AppColors.infoColor, + iconColor: AppColors.whiteColor, + textColor: AppColors.whiteColor, text: LocaleKeys.recharge.tr(), borderWidth: 0.w, fontWeight: FontWeight.w500, borderColor: Colors.transparent, - backgroundColor: Color(0xff45A2F8).withValues(alpha: 0.08), + backgroundColor: AppColors.infoColor, padding: EdgeInsets.all(8.w), fontSize: 14.f, onPressed: () { @@ -438,7 +451,7 @@ class ServicesPage extends StatelessWidget { width: 183.h, padding: EdgeInsets.all(16.w), decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, + color: context.greyColor, borderRadius: 20.r, hasShadow: false, ), @@ -564,7 +577,7 @@ class ServicesPage extends StatelessWidget { Expanded( child: Container( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, + color: context.greyColor, borderRadius: 12.h, hasShadow: false, ), @@ -593,7 +606,7 @@ class ServicesPage extends StatelessWidget { Expanded( child: Container( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, + color: context.greyColor, borderRadius: 12.h, hasShadow: false, ), @@ -632,7 +645,7 @@ class ServicesPage extends StatelessWidget { Expanded( child: Container( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, + color: context.greyColor, borderRadius: 12.h, hasShadow: false, ), @@ -661,7 +674,7 @@ class ServicesPage extends StatelessWidget { Expanded( child: Container( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, + color: context.greyColor, borderRadius: 12.h, hasShadow: false, ), @@ -700,7 +713,7 @@ class ServicesPage extends StatelessWidget { Expanded( child: Container( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, + color: context.greyColor, borderRadius: 12.h, hasShadow: false, ), @@ -708,7 +721,8 @@ class ServicesPage extends StatelessWidget { padding: EdgeInsets.all(16.h), child: Row( children: [ - Utils.buildSvgWithAssets(icon: AppAssets.privacy_terms, width: 32.w, height: 32.h, fit: BoxFit.contain, iconColor: AppColors.blackColor), + Utils.buildSvgWithAssets( + icon: AppAssets.privacy_terms, width: 32.w, height: 32.h, fit: BoxFit.contain, iconColor: AppColors.textColor), SizedBox(width: 8.w), Expanded(child: LocaleKeys.termsConditoins.tr().toText14(weight: FontWeight.w500)) ], @@ -724,7 +738,7 @@ class ServicesPage extends StatelessWidget { Expanded( child: Container( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, + color: context.greyColor, borderRadius: 12.h, hasShadow: false, ), @@ -732,7 +746,8 @@ class ServicesPage extends StatelessWidget { padding: EdgeInsets.all(16.h), child: Row( children: [ - Utils.buildSvgWithAssets(icon: AppAssets.privacy_terms, width: 32.w, height: 32.h, fit: BoxFit.contain, iconColor: AppColors.blackColor), + Utils.buildSvgWithAssets( + icon: AppAssets.privacy_terms, width: 32.w, height: 32.h, fit: BoxFit.contain, iconColor: AppColors.textColor), SizedBox(width: 8.w), Expanded(child: LocaleKeys.privacyPolicy.tr().toText14(weight: FontWeight.w500)) ], diff --git a/lib/presentation/hmg_services/services_view.dart b/lib/presentation/hmg_services/services_view.dart index 3dd5c462..8e64ad0b 100644 --- a/lib/presentation/hmg_services/services_view.dart +++ b/lib/presentation/hmg_services/services_view.dart @@ -18,13 +18,21 @@ class ServiceGridViewItem extends StatelessWidget { final Function? onTap; const ServiceGridViewItem( - this.hmgServiceComponentModel, this.index, this.isHomePage, - {super.key, this.isLocked = false, required this.isHealthToolIcon, this.onTap}); + this.hmgServiceComponentModel, + this.index, + this.isHomePage, { + super.key, + this.isLocked = false, + required this.isHealthToolIcon, + this.onTap, + }); @override Widget build(BuildContext context) { return InkWell( - onTap: () => hmgServiceComponentModel.route != null ? getIt.get().pushPageRoute(hmgServiceComponentModel.route!) : hmgServiceComponentModel.onTap!(), + onTap: () => hmgServiceComponentModel.route != null + ? getIt.get().pushPageRoute(hmgServiceComponentModel.route!) + : hmgServiceComponentModel.onTap!(), // onTap: () => hmgServiceComponentModel.isExternalLink // ? _openLink(hmgServiceComponentModel.route!) // : getIt @@ -38,9 +46,10 @@ class ServiceGridViewItem extends StatelessWidget { height: 48.h, width: 48.h, decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: hmgServiceComponentModel.bgColor, + color: (Theme.of(context).brightness == Brightness.dark && isHealthToolIcon) ? context.greyColor : hmgServiceComponentModel.bgColor, borderRadius: 12.r, hasShadow: false, + context: context, ), child: Padding( padding: EdgeInsets.all(12.h), @@ -51,10 +60,10 @@ class ServiceGridViewItem extends StatelessWidget { ), ), ), - SizedBox(height: 4.h), + SizedBox(height: 6.h), hmgServiceComponentModel.title.toText12( fontWeight: FontWeight.w500, - color: AppColors.textColor, + color: context.textColor, maxLine: 2, ), ], diff --git a/lib/presentation/home/data/landing_page_data.dart b/lib/presentation/home/data/landing_page_data.dart index c52d5e19..0914e884 100644 --- a/lib/presentation/home/data/landing_page_data.dart +++ b/lib/presentation/home/data/landing_page_data.dart @@ -1,184 +1,184 @@ -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/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/presentation/home/data/service_card_data.dart'; import 'package:hmg_patient_app_new/theme/colors.dart'; class LandingPageData { - static List getNotLoggedInServiceCardsList = [ - ServiceCardData( - serviceName: "emergency", - icon: AppAssets.emergency_services_icon, - title: LocaleKeys.emergency, - subtitle: LocaleKeys.services2, - backgroundColor: AppColors.primaryRedColor, - iconColor: AppColors.whiteColor, - textColor: AppColors.whiteColor, - isBold: true, - ), - ServiceCardData( - serviceName: "indoor_navigation", - icon: AppAssets.indoor_nav_icon, - title: LocaleKeys.indoor, - subtitle: LocaleKeys.navigation, - backgroundColor: AppColors.whiteColor, - iconColor: AppColors.blackColor, - textColor: AppColors.blackColor, - isBold: false, - ), - ServiceCardData( - serviceName: "search_doctor", - icon: AppAssets.search_doctor_icon, - title: LocaleKeys.search, - subtitle: LocaleKeys.doctor, - backgroundColor: AppColors.whiteColor, - iconColor: AppColors.blackColor, - textColor: AppColors.blackColor, - isBold: false, - ), - ServiceCardData( - serviceName: "health_calculators_and_converts", - icon: AppAssets.health_calculators_icon, - title: LocaleKeys.health, - subtitle: LocaleKeys.calculators, - backgroundColor: AppColors.whiteColor, - iconColor: AppColors.blackColor, - textColor: AppColors.blackColor, - isBold: false, - ), - ServiceCardData( - serviceName: "health_converters", - icon: AppAssets.health_converters_icon, - title: LocaleKeys.health, - subtitle: LocaleKeys.converters, - backgroundColor: AppColors.whiteColor, - iconColor: AppColors.blackColor, - textColor: AppColors.blackColor, - isBold: false, - ), - ServiceCardData( - serviceName: "parking_guide", - icon: AppAssets.car_parking_icon, - title: LocaleKeys.parking, - subtitle: LocaleKeys.guide, - backgroundColor: AppColors.whiteColor, - iconColor: AppColors.blackColor, - textColor: AppColors.blackColor, - isBold: false, - ), - ]; + static List getNotLoggedInServiceCards(BuildContext context) => [ + ServiceCardData( + serviceName: "emergency", + icon: AppAssets.emergency_services_icon, + title: LocaleKeys.emergency, + subtitle: LocaleKeys.services2, + backgroundColor: context.primaryRedColor, + iconColor: AppColors.whiteColor, + textColor: AppColors.whiteColor, + isBold: true, + ), + ServiceCardData( + serviceName: "indoor_navigation", + icon: AppAssets.indoor_nav_icon, + title: LocaleKeys.indoor, + subtitle: LocaleKeys.navigation, + backgroundColor: context.greyColor, + iconColor: context.iconColor, + textColor: context.textColor, + isBold: false, + ), + ServiceCardData( + serviceName: "search_doctor", + icon: AppAssets.search_doctor_icon, + title: LocaleKeys.search, + subtitle: LocaleKeys.doctor, + backgroundColor: context.greyColor, + iconColor: context.iconColor, + textColor: context.textColor, + isBold: false, + ), + ServiceCardData( + serviceName: "health_calculators_and_converts", + icon: AppAssets.health_calculators_icon, + title: LocaleKeys.health, + subtitle: LocaleKeys.calculators, + backgroundColor: context.greyColor, + iconColor: context.iconColor, + textColor: context.textColor, + isBold: false, + ), + ServiceCardData( + serviceName: "health_converters", + icon: AppAssets.health_converters_icon, + title: LocaleKeys.health, + subtitle: LocaleKeys.converters, + backgroundColor: context.greyColor, + iconColor: context.iconColor, + textColor: context.textColor, + isBold: false, + ), + ServiceCardData( + serviceName: "parking_guide", + icon: AppAssets.car_parking_icon, + title: LocaleKeys.parking, + subtitle: LocaleKeys.guide, + backgroundColor: context.greyColor, + iconColor: context.iconColor, + textColor: context.textColor, + isBold: false, + ), + ]; - static List getLoggedInServiceCardsList = [ - ServiceCardData( - serviceName: "emergency", - icon: AppAssets.emergency_services_icon, - title: LocaleKeys.emergency, - subtitle: LocaleKeys.services2, - backgroundColor: AppColors.primaryRedColor, - iconColor: AppColors.whiteColor, - textColor: AppColors.whiteColor, - isBold: true, - ), - ServiceCardData( - serviceName: "lab_results", - icon: AppAssets.home_lab_result_icon, - title: LocaleKeys.lab, - subtitle: LocaleKeys.labSubtitle, - backgroundColor: AppColors.whiteColor, - iconColor: AppColors.blackColor, - textColor: AppColors.blackColor, - isBold: false, - ), - ServiceCardData( - serviceName: "radiology_results", - icon: AppAssets.my_radiology_icon, - title: LocaleKeys.radiology, - subtitle: LocaleKeys.radiologySubtitle, - backgroundColor: AppColors.whiteColor, - iconColor: AppColors.blackColor, - textColor: AppColors.blackColor, - isBold: false, - ), - ServiceCardData( - serviceName: "prescriptions", - icon: AppAssets.my_prescription_icon, - title: LocaleKeys.medicinesSubtitle, - subtitle: LocaleKeys.details, - backgroundColor: AppColors.whiteColor, - iconColor: AppColors.blackColor, - textColor: AppColors.blackColor, - isBold: false, - ), - ServiceCardData( - serviceName: "insurance_update", - icon: AppAssets.insurance_update_icon, - title: LocaleKeys.insurance, - subtitle: LocaleKeys.details, - backgroundColor: AppColors.whiteColor, - iconColor: AppColors.blackColor, - textColor: AppColors.blackColor, - isBold: false, - ), - ServiceCardData( - serviceName: "my_doctors", - icon: AppAssets.my_doctors_icon, - title: "My", - subtitle: "Doctors", - backgroundColor: AppColors.whiteColor, - iconColor: AppColors.blackColor, - textColor: AppColors.blackColor, - isBold: false, - ), - ServiceCardData( - serviceName: "sick_leaves", - icon: AppAssets.my_sick_leave_icon, - title: LocaleKeys.sick, - subtitle: LocaleKeys.sickSubtitle, - backgroundColor: AppColors.whiteColor, - iconColor: AppColors.blackColor, - textColor: AppColors.blackColor, - isBold: false, - ), - ]; + static List getLoggedInServiceCards(BuildContext context) => [ + ServiceCardData( + serviceName: "emergency", + icon: AppAssets.emergency_services_icon, + title: LocaleKeys.emergency, + subtitle: LocaleKeys.services2, + backgroundColor: context.primaryRedColor, + iconColor: AppColors.whiteColor, + textColor: AppColors.whiteColor, + isBold: true, + ), + ServiceCardData( + serviceName: "lab_results", + icon: AppAssets.home_lab_result_icon, + title: LocaleKeys.lab, + subtitle: LocaleKeys.labSubtitle, + backgroundColor: context.greyColor, + iconColor: context.iconColor, + textColor: context.textColor, + isBold: false, + ), + ServiceCardData( + serviceName: "radiology_results", + icon: AppAssets.my_radiology_icon, + title: LocaleKeys.radiology, + subtitle: LocaleKeys.radiologySubtitle, + backgroundColor: context.greyColor, + iconColor: context.iconColor, + textColor: context.textColor, + isBold: false, + ), + ServiceCardData( + serviceName: "prescriptions", + icon: AppAssets.my_prescription_icon, + title: LocaleKeys.medicinesSubtitle, + subtitle: LocaleKeys.details, + backgroundColor: context.greyColor, + iconColor: context.iconColor, + textColor: context.textColor, + isBold: false, + ), + ServiceCardData( + serviceName: "insurance_update", + icon: AppAssets.insurance_update_icon, + title: LocaleKeys.insurance, + subtitle: LocaleKeys.details, + backgroundColor: context.greyColor, + iconColor: context.iconColor, + textColor: context.textColor, + isBold: false, + ), + ServiceCardData( + serviceName: "my_doctors", + icon: AppAssets.my_doctors_icon, + title: "My", + subtitle: "Doctors", + backgroundColor: context.greyColor, + iconColor: context.iconColor, + textColor: context.textColor, + isBold: false, + ), + ServiceCardData( + serviceName: "sick_leaves", + icon: AppAssets.my_sick_leave_icon, + title: LocaleKeys.sick, + subtitle: LocaleKeys.sickSubtitle, + backgroundColor: context.greyColor, + iconColor: context.iconColor, + textColor: context.textColor, + isBold: false, + ), + ]; - static List getServiceCardsList = [ - ServiceCardData( - serviceName: "livecare", - icon: AppAssets.small_livecare_icon, - title: LocaleKeys.liveCare, - subtitle: LocaleKeys.liveCareServiceDesc, - largeCardIcon: AppAssets.liveCareService, - backgroundColor: AppColors.successColor, - iconColor: AppColors.whiteColor, - isBold: false, - ), - // ServiceCardData( - // icon: AppAssets.homeBottom, - // title: "Dermatology", - // subtitle: "Explore our app, View our services and offers", - // largeCardIcon: AppAssets.homeBottom, - // backgroundColor: AppColors.primaryRedColor, - // isBold: false, - // ), - ServiceCardData( - serviceName: "home_health_care", - icon: AppAssets.homeBottom, - title: LocaleKeys.homeHealthCare, - subtitle: LocaleKeys.liveCareServiceDesc, - largeCardIcon: AppAssets.homeHealthCareService, - backgroundColor: AppColors.primaryRedColor, - iconColor: AppColors.whiteColor, - isBold: false, - ), - ServiceCardData( - serviceName: "pharmacy", - icon: AppAssets.pharmacy_icon, //359846 - title: LocaleKeys.hmgPharmacy, - subtitle: LocaleKeys.liveCareServiceDesc, - largeCardIcon: AppAssets.pharmacyService, - backgroundColor: AppColors.pharmacyBGColor, - iconColor: null, - isBold: true, - ), - ]; + static List getServiceCards(BuildContext context) => [ + ServiceCardData( + serviceName: "livecare", + icon: AppAssets.small_livecare_icon, + title: LocaleKeys.liveCare, + subtitle: LocaleKeys.liveCareServiceDesc, + largeCardIcon: AppAssets.liveCareService, + backgroundColor: AppColors.successColor, + iconColor: AppColors.whiteColor, + isBold: false, + ), + ServiceCardData( + serviceName: "home_health_care", + icon: AppAssets.homeBottom, + title: LocaleKeys.homeHealthCare, + subtitle: LocaleKeys.liveCareServiceDesc, + largeCardIcon: AppAssets.homeHealthCareService, + backgroundColor: context.primaryRedColor, + iconColor: AppColors.whiteColor, + isBold: false, + ), + ServiceCardData( + serviceName: "pharmacy", + icon: AppAssets.pharmacy_icon, + title: LocaleKeys.hmgPharmacy, + subtitle: LocaleKeys.liveCareServiceDesc, + largeCardIcon: AppAssets.pharmacyService, + backgroundColor: AppColors.pharmacyBGColor, + iconColor: null, + isBold: true, + ), + ]; + +// // ── backwards-compat aliases (keep old callers compiling) ───────────────── +// @Deprecated('Use getNotLoggedInServiceCards(context) instead') +// static List getNotLoggedInServiceCardsList = []; +// @Deprecated('Use getLoggedInServiceCards(context) instead') +// static List getLoggedInServiceCardsList = []; +// @Deprecated('Use getServiceCards(context) instead') +// static List getServiceCardsList = []; } diff --git a/lib/presentation/home/data/service_card_data.dart b/lib/presentation/home/data/service_card_data.dart index 3bc22d7c..a71a6c22 100644 --- a/lib/presentation/home/data/service_card_data.dart +++ b/lib/presentation/home/data/service_card_data.dart @@ -20,8 +20,8 @@ class ServiceCardData { this.subtitle = "", this.largeCardIcon = "", this.backgroundColor = AppColors.whiteColor, - this.iconColor = AppColors.blackColor, - this.textColor = AppColors.blackColor, + this.iconColor = AppColors.textColor, + this.textColor = AppColors.textColor, this.isBold = false }); } diff --git a/lib/presentation/home/landing_page.dart b/lib/presentation/home/landing_page.dart index e8482bf0..2c5828f2 100644 --- a/lib/presentation/home/landing_page.dart +++ b/lib/presentation/home/landing_page.dart @@ -52,7 +52,6 @@ import 'package:hmg_patient_app_new/presentation/todo_section/ancillary_procedur import 'package:hmg_patient_app_new/presentation/todo_section/widgets/ancillary_orders_list.dart'; import 'package:hmg_patient_app_new/routes/app_routes.dart'; import 'package:hmg_patient_app_new/services/cache_service.dart'; -import 'package:hmg_patient_app_new/services/zoom_service.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'; @@ -158,7 +157,7 @@ class _LandingPageState extends State { return PopScope( canPop: false, child: Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: context.scaffoldBgColor, body: SingleChildScrollView( padding: EdgeInsets.only(top: kToolbarHeight + 0.h, bottom: 24), child: Column( @@ -190,9 +189,9 @@ class _LandingPageState extends State { // // arguments: CallArguments("SmallDailyStandup9875", "123", "Patient", "40", "0", false, int.parse(widget.incomingCallData!.appointmentNo!)), // ); }, - backgroundColor: AppColors.secondaryLightRedColor, - borderColor: AppColors.secondaryLightRedColor, - textColor: AppColors.primaryRedColor, + backgroundColor: context.secondaryLightRedColor, + borderColor: context.secondaryLightRedColor, + textColor: context.primaryRedColor, fontSize: 14.f, fontWeight: FontWeight.w500, borderRadius: 12.r, @@ -206,20 +205,17 @@ class _LandingPageState extends State { children: [ Stack(children: [ if (appState.isAuthenticated) - Utils.buildSvgWithAssets(icon: AppAssets.bell, height: 24.h, width: 24.h).onPress(() async { - if (appState.isAuthenticated) { - notificationsViewModel.setNotificationStatusID(2); - notificationsViewModel.getAllNotifications(); - Navigator.of(context).push( - CustomPageRoute( - page: NotificationsListPage(), - // page: LoginScreen(), - ), - ); - } else { - await authVM.onLoginPressed(); - } - }), + Utils.buildSvgWithAssets(icon: AppAssets.bell, height: 24.h, width: 24.h, iconColor: context.iconColor).onPress( + () async { + if (appState.isAuthenticated) { + notificationsViewModel.setNotificationStatusID(2); + notificationsViewModel.getAllNotifications(); + Navigator.of(context).push(CustomPageRoute(page: NotificationsListPage())); + } else { + await authVM.onLoginPressed(); + } + }, + ), (appState.isAuthenticated && (int.parse(todoSectionVM.notificationsCount ?? "0") > 0)) ? Positioned( right: 0, @@ -229,7 +225,7 @@ class _LandingPageState extends State { height: 8.h, padding: EdgeInsets.all(4), decoration: BoxDecoration( - color: AppColors.primaryRedColor, + color: context.primaryRedColor, borderRadius: BorderRadius.circular(20.r), ), child: Text( @@ -244,10 +240,11 @@ class _LandingPageState extends State { ) : SizedBox.shrink(), ]), - Utils.buildSvgWithAssets(icon: AppAssets.indoor_nav_icon, height: 24.h, width: 24.w).onPress(() { + Utils.buildSvgWithAssets(icon: AppAssets.indoor_nav_icon, height: 24.h, width: 24.h, iconColor: context.iconColor) + .onPress(() { openIndoorNavigationBottomSheet(context); }), - Utils.buildSvgWithAssets(icon: AppAssets.contact_icon, height: 24.h, width: 24.h).onPress(() { + Utils.buildSvgWithAssets(icon: AppAssets.contact_icon, height: 24.h, width: 24.h, iconColor: context.iconColor).onPress(() { showCommonBottomSheetWithoutHeight( context, title: LocaleKeys.contactUs.tr(), @@ -269,7 +266,7 @@ class _LandingPageState extends State { !appState.isAuthenticated ? Container( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, + color: context.cardBaseColor, borderRadius: 24.r, hasShadow: false, ), @@ -298,7 +295,7 @@ class _LandingPageState extends State { padding: EdgeInsetsGeometry.zero, backgroundColor: Color(0xFF2B353E), borderColor: Color(0xFF2B353E), - textColor: AppColors.whiteColor, + textColor: context.cardBaseColor, fontSize: 14.f, fontWeight: FontWeight.w600, borderRadius: 12.r, @@ -318,12 +315,12 @@ class _LandingPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - LocaleKeys.appointmentsAndVisits.tr(context: context).toText16(weight: FontWeight.w600), + LocaleKeys.appointmentsAndVisits.tr(context: context).toText16(weight: FontWeight.w600, color: context.textColor), Row( children: [ - LocaleKeys.viewAll.tr(context: context).toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500), + LocaleKeys.viewAll.tr(context: context).toText14(color: context.primaryRedColor, weight: FontWeight.w500), SizedBox(width: 2.h), - Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 14.h), + Icon(Icons.arrow_forward_ios, color: context.primaryRedColor, size: 14.h), ], ), ], @@ -336,7 +333,7 @@ class _LandingPageState extends State { return myAppointmentsVM.isMyAppointmentsLoading ? Container( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, + color: context.cardBaseColor, borderRadius: 24.r, hasShadow: true, ), @@ -352,7 +349,7 @@ class _LandingPageState extends State { ? myAppointmentsVM.patientAppointmentsHistoryList.length == 1 ? Container( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, + color: context.cardBaseColor, borderRadius: 24.r, hasShadow: true, ), @@ -414,7 +411,7 @@ class _LandingPageState extends State { pagination: SwiperPagination( alignment: Alignment.bottomCenter, margin: EdgeInsets.only(top: 240.h + 8 + 24), - builder: DotSwiperPaginationBuilder(color: Color(0xffD9D9D9), activeColor: AppColors.blackBgColor), + builder: DotSwiperPaginationBuilder(color: Color(0xffD9D9D9), activeColor: context.textColor), ), itemBuilder: (BuildContext context, int index) { return getIndexSwiperCard(index); @@ -422,7 +419,8 @@ class _LandingPageState extends State { ) : Container( width: double.infinity, - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r, hasShadow: true), + decoration: RoundedRectangleBorder() + .toSmoothCornerDecoration(color: context.cardBaseColor, borderRadius: 24.r, hasShadow: true), child: Padding( padding: EdgeInsets.all(16.h), child: Column( @@ -444,7 +442,7 @@ class _LandingPageState extends State { fontWeight: FontWeight.w500, padding: EdgeInsets.fromLTRB(10.h, 0, 10.h, 0), icon: AppAssets.add_icon, - iconColor: AppColors.primaryRedColor, + iconColor: context.primaryRedColor, height: 40.h, ), ], @@ -463,10 +461,10 @@ class _LandingPageState extends State { SizedBox(height: 16.h), Container( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, + color: context.cardBaseColor, borderRadius: 20.r, hasShadow: true, - side: BorderSide(color: AppColors.primaryRedColor, width: 3.h), + side: BorderSide(color: context.primaryRedColor, width: 3.h), ), width: double.infinity, child: Padding( @@ -479,10 +477,14 @@ class _LandingPageState extends State { children: [ AppCustomChipWidget( labelText: LocaleKeys.erOnlineCheckInRequest.tr(context: context), - backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.10), - textColor: AppColors.primaryRedColor, + backgroundColor: context.primaryRedColor.withValues(alpha: 0.10), + textColor: context.primaryRedColor, ), - Utils.buildSvgWithAssets(icon: AppAssets.appointment_checkin_icon, width: 24.h, height: 24.h, iconColor: AppColors.primaryRedColor), + Utils.buildSvgWithAssets( + icon: AppAssets.appointment_checkin_icon, + width: 24.h, + height: 24.h, + iconColor: context.primaryRedColor), ], ), SizedBox(height: 8.h), @@ -494,7 +496,7 @@ class _LandingPageState extends State { flipX: getIt.get().isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: context.iconColor, width: 20.h, height: 15.h, fit: BoxFit.contain, @@ -519,12 +521,12 @@ class _LandingPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - LocaleKeys.quickLinks.tr(context: context).toText16(weight: FontWeight.w600), + LocaleKeys.quickLinks.tr(context: context).toText16(weight: FontWeight.w600, color: context.textColor), Row( children: [ - LocaleKeys.viewMedicalFile.tr(context: context).toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500), + LocaleKeys.viewMedicalFile.tr(context: context).toText12(color: context.primaryRedColor, fontWeight: FontWeight.w500), SizedBox(width: 2.h), - Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 14.h), + Icon(Icons.arrow_forward_ios, color: context.primaryRedColor, size: 14.h), ], ), ], @@ -534,7 +536,10 @@ class _LandingPageState extends State { SizedBox(height: 16.h), Container( // height: 121.h, - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r), + decoration: RoundedRectangleBorder().toSmoothCornerDecoration( + color: context.cardBaseColor, + borderRadius: 24.r, + ), child: Column( children: [ SizedBox( @@ -543,15 +548,18 @@ class _LandingPageState extends State { controller: _horizontalScrollController, thumbVisibility: true, radius: Radius.circular(10.0), - thumbColor: AppColors.primaryRedColor, + thumbColor: context.primaryRedColor, trackVisibility: true, trackColor: Color(0xffD9D9D9), trackBorderColor: Colors.transparent, trackRadius: Radius.circular(10.0), - padding: EdgeInsets.only(top: 92.h + 32.h, left: MediaQuery.sizeOf(context).width / 2 - 35, right: MediaQuery.sizeOf(context).width / 2 - 35), + padding: EdgeInsets.only( + top: 92.h + 32.h, + left: MediaQuery.sizeOf(context).width / 2 - 35, + right: MediaQuery.sizeOf(context).width / 2 - 35), child: ListView.separated( scrollDirection: Axis.horizontal, - itemCount: LandingPageData.getLoggedInServiceCardsList.length, + itemCount: LandingPageData.getLoggedInServiceCards(context).length, shrinkWrap: true, controller: _horizontalScrollController, padding: EdgeInsets.only(left: 16.h, right: 16.h, top: 16.h, bottom: 12.h), @@ -563,14 +571,14 @@ class _LandingPageState extends State { horizontalOffset: 100.0, child: FadeInAnimation( child: SmallServiceCard( - icon: LandingPageData.getLoggedInServiceCardsList[index].icon, - title: LandingPageData.getLoggedInServiceCardsList[index].title, - subtitle: LandingPageData.getLoggedInServiceCardsList[index].subtitle, - iconColor: LandingPageData.getLoggedInServiceCardsList[index].iconColor!, - textColor: LandingPageData.getLoggedInServiceCardsList[index].textColor, - backgroundColor: LandingPageData.getLoggedInServiceCardsList[index].backgroundColor, - isBold: LandingPageData.getLoggedInServiceCardsList[index].isBold, - serviceName: LandingPageData.getLoggedInServiceCardsList[index].serviceName, + icon: LandingPageData.getLoggedInServiceCards(context)[index].icon, + title: LandingPageData.getLoggedInServiceCards(context)[index].title, + subtitle: LandingPageData.getLoggedInServiceCards(context)[index].subtitle, + iconColor: LandingPageData.getLoggedInServiceCards(context)[index].iconColor!, + textColor: LandingPageData.getLoggedInServiceCards(context)[index].textColor, + backgroundColor: LandingPageData.getLoggedInServiceCards(context)[index].backgroundColor, + isBold: LandingPageData.getLoggedInServiceCards(context)[index].isBold, + serviceName: LandingPageData.getLoggedInServiceCards(context)[index].serviceName, ), ), ), @@ -588,7 +596,7 @@ class _LandingPageState extends State { ) : Container( // height: 141.h, - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r), + decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: context.cardBaseColor, borderRadius: 24.r), child: Column( children: [ SizedBox( @@ -597,15 +605,18 @@ class _LandingPageState extends State { controller: _horizontalScrollController, thumbVisibility: true, radius: Radius.circular(10.0), - thumbColor: AppColors.primaryRedColor, + thumbColor: context.primaryRedColor, trackVisibility: true, trackColor: Color(0xffD9D9D9), trackBorderColor: Colors.transparent, trackRadius: Radius.circular(10.0), - padding: EdgeInsets.only(top: 92.h + 32.h, left: MediaQuery.sizeOf(context).width / 2 - 35, right: MediaQuery.sizeOf(context).width / 2 - 35), + padding: EdgeInsets.only( + top: 92.h + 32.h, + left: MediaQuery.sizeOf(context).width / 2 - 35, + right: MediaQuery.sizeOf(context).width / 2 - 35), child: ListView.separated( scrollDirection: Axis.horizontal, - itemCount: LandingPageData.getNotLoggedInServiceCardsList.length, + itemCount: LandingPageData.getNotLoggedInServiceCards(context).length, shrinkWrap: true, controller: _horizontalScrollController, padding: EdgeInsets.only(left: 16.h, right: 16.h, top: 16.h, bottom: 12.h), @@ -618,14 +629,14 @@ class _LandingPageState extends State { horizontalOffset: 100.0, child: FadeInAnimation( child: SmallServiceCard( - serviceName: LandingPageData.getNotLoggedInServiceCardsList[index].serviceName, - icon: LandingPageData.getNotLoggedInServiceCardsList[index].icon, - title: LandingPageData.getNotLoggedInServiceCardsList[index].title, - subtitle: LandingPageData.getNotLoggedInServiceCardsList[index].subtitle, - iconColor: LandingPageData.getNotLoggedInServiceCardsList[index].iconColor!, - textColor: LandingPageData.getNotLoggedInServiceCardsList[index].textColor, - backgroundColor: LandingPageData.getNotLoggedInServiceCardsList[index].backgroundColor, - isBold: LandingPageData.getNotLoggedInServiceCardsList[index].isBold, + serviceName: LandingPageData.getNotLoggedInServiceCards(context)[index].serviceName, + icon: LandingPageData.getNotLoggedInServiceCards(context)[index].icon, + title: LandingPageData.getNotLoggedInServiceCards(context)[index].title, + subtitle: LandingPageData.getNotLoggedInServiceCards(context)[index].subtitle, + iconColor: LandingPageData.getNotLoggedInServiceCards(context)[index].iconColor!, + textColor: LandingPageData.getNotLoggedInServiceCards(context)[index].textColor, + backgroundColor: LandingPageData.getNotLoggedInServiceCards(context)[index].backgroundColor, + isBold: LandingPageData.getNotLoggedInServiceCards(context)[index].isBold, ), ), ), @@ -642,12 +653,12 @@ class _LandingPageState extends State { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - LocaleKeys.services2.tr(context: context).toText18(weight: FontWeight.w600), + LocaleKeys.services2.tr(context: context).toText18(weight: FontWeight.w600, color: context.textColor), Row( children: [ - LocaleKeys.viewAllServices.tr(context: context).toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500), + LocaleKeys.viewAllServices.tr(context: context).toText14(color: context.primaryRedColor, weight: FontWeight.w500), SizedBox(width: 2.h), - Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 14.h), + Icon(Icons.arrow_forward_ios, color: context.primaryRedColor, size: 14.h), ], ).onPress(() { Navigator.of(context).push(CustomPageRoute(page: ServicesPage())); @@ -658,7 +669,7 @@ class _LandingPageState extends State { height: 431.h, child: ListView.separated( scrollDirection: Axis.horizontal, - itemCount: LandingPageData.getServiceCardsList.length, + itemCount: LandingPageData.getServiceCards(context).length, shrinkWrap: true, padding: EdgeInsets.only(left: 24.w, right: 24.w), itemBuilder: (context, index) { @@ -669,11 +680,11 @@ class _LandingPageState extends State { horizontalOffset: 100.0, child: FadeInAnimation( child: FadedLargeServiceCard( - serviceCardData: LandingPageData.getServiceCardsList[index], - image: LandingPageData.getServiceCardsList[index].icon, - title: LandingPageData.getServiceCardsList[index].title, - subtitle: LandingPageData.getServiceCardsList[index].subtitle, - icon: LandingPageData.getServiceCardsList[index].largeCardIcon, + serviceCardData: LandingPageData.getServiceCards(context)[index], + image: LandingPageData.getServiceCards(context)[index].icon, + title: LandingPageData.getServiceCards(context)[index].title, + subtitle: LandingPageData.getServiceCards(context)[index].subtitle, + icon: LandingPageData.getServiceCards(context)[index].largeCardIcon, ), ), ), @@ -772,7 +783,7 @@ class _LandingPageState extends State { return Container( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, + color: context.cardBaseColor, borderRadius: 20.h, hasShadow: false, side: BorderSide( @@ -791,7 +802,7 @@ class _LandingPageState extends State { SizedBox(height: 2.h), LocaleKeys.thankYouForPatience.tr().toText12( fontWeight: FontWeight.w500, - color: AppColors.textColorLight, + color: context.textColorLight, ), SizedBox(height: 8.h), currentQueue.queueNo!.toText28(isBold: true), @@ -855,10 +866,10 @@ class _LandingPageState extends State { AppCustomChipWidget( deleteIcon: isVitalCall ? AppAssets.call_for_vitals : AppAssets.call_for_doctor, labelText: isVitalCall ? LocaleKeys.callForVitalSigns.tr() : LocaleKeys.callForDoctor.tr(), - iconColor: isVitalCall ? AppColors.primaryRedColor : AppColors.successColor, - textColor: isVitalCall ? AppColors.primaryRedColor : AppColors.successColor, + iconColor: isVitalCall ? context.primaryRedColor : AppColors.successColor, + textColor: isVitalCall ? context.primaryRedColor : AppColors.successColor, iconSize: 14.w, - backgroundColor: isVitalCall ? AppColors.primaryRedColor.withValues(alpha: 0.1) : AppColors.successColor.withValues(alpha: 0.1), + backgroundColor: isVitalCall ? context.primaryRedColor.withValues(alpha: 0.1) : AppColors.successColor.withValues(alpha: 0.1), labelPadding: EdgeInsetsDirectional.only( start: 8.h, end: -2.h, @@ -883,7 +894,7 @@ class _LandingPageState extends State { borderRadius: 12.r, padding: EdgeInsets.symmetric(horizontal: 10.w), height: 40.h, - iconColor: AppColors.whiteColor, + iconColor: context.cardBaseColor, iconSize: 18.h, ); } @@ -897,7 +908,7 @@ class _LandingPageState extends State { SizedBox(height: 12.h), Container( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, + color: context.cardBaseColor, borderRadius: 20.r, hasShadow: true, side: BorderSide(color: AppColors.ratingColorYellow, width: 3.h), @@ -1002,7 +1013,7 @@ class _LandingPageState extends State { Widget _buildAppointmentCardWrapper(appointment) { return Container( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, + color: context.cardBaseColor, borderRadius: 24.r, hasShadow: true, ), @@ -1128,7 +1139,7 @@ class _LandingPageState extends State { isFullScreen: false, isCloseButtonVisible: true, hasBottomPadding: false, - backgroundColor: AppColors.bottomSheetBgColor, + backgroundColor: context.bottomSheetBgColor, callBackFunc: () { context.read().clearSearchText(); }, diff --git a/lib/presentation/home/widgets/habib_wallet_card.dart b/lib/presentation/home/widgets/habib_wallet_card.dart index ed48058d..768be0db 100644 --- a/lib/presentation/home/widgets/habib_wallet_card.dart +++ b/lib/presentation/home/widgets/habib_wallet_card.dart @@ -24,7 +24,7 @@ class HabibWalletCard extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - LocaleKeys.myBalance.tr(context: context).toText16(weight: FontWeight.w600), + LocaleKeys.myBalance.tr(context: context).toText16(weight: FontWeight.w600, color: context.textColor), // Row( // children: [ // LocaleKeys.viewAllServices.tr(context: context).toText12(color: AppColors.primaryRedColor, weight: FontWeight.w500), @@ -36,16 +36,17 @@ class HabibWalletCard extends StatelessWidget { ).paddingSymmetrical(24.h, 0.h), SizedBox(height: 16.h), Container( - // height: 150.h, width: double.infinity, decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, - borderRadius: 24, + color: context.cardBaseColor, + borderRadius: 24.r, ), child: Stack(children: [ Positioned( right: 0, - child: ClipRRect(borderRadius: BorderRadius.circular(24.0), child: Utils.buildSvgWithAssets(icon: AppAssets.habib_background_icon, width: 150.h, height: 150.h)), + child: ClipRRect( + borderRadius: BorderRadius.circular(24.0), + child: Utils.buildSvgWithAssets(icon: AppAssets.habib_background_icon, width: 150.h, height: 150.h)), ), Padding( padding: EdgeInsets.all(16.h), @@ -55,25 +56,25 @@ class HabibWalletCard extends StatelessWidget { // Row( // mainAxisAlignment: MainAxisAlignment.spaceBetween, // children: [ - LocaleKeys.habibWallet.tr(context: context).toText16(weight: FontWeight.w500, letterSpacing: -0.2), - // Container( - // height: 40.h, - // width: 40.h, - // decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - // color: AppColors.textColor, - // borderRadius: 8.h, - // ), - // child: Padding( - // padding: EdgeInsets.all(8.h), - // child: Utils.buildSvgWithAssets( - // icon: AppAssets.show_icon, - // width: 12.h, - // height: 12.h, - // fit: BoxFit.contain, - // ), - // ), - // ), - // ], + LocaleKeys.habibWallet.tr(context: context).toText16(weight: FontWeight.w500, letterSpacing: -0.2), + // Container( + // height: 40.h, + // width: 40.h, + // decoration: RoundedRectangleBorder().toSmoothCornerDecoration( + // color: AppColors.textColor, + // borderRadius: 8.h, + // ), + // child: Padding( + // padding: EdgeInsets.all(8.h), + // child: Utils.buildSvgWithAssets( + // icon: AppAssets.show_icon, + // width: 12.h, + // height: 12.h, + // fit: BoxFit.contain, + // ), + // ), + // ), + // ], // ), SizedBox(height: 4.h), Consumer(builder: (context, habibWalletVM, child) { @@ -81,7 +82,7 @@ class HabibWalletCard extends StatelessWidget { children: [ Utils.buildSvgWithAssets( icon: AppAssets.saudi_riyal_icon, - iconColor: AppColors.inputLabelTextColor, + iconColor: context.inputLabelTextColor, width: 24.h, height: 24.h, fit: BoxFit.contain, @@ -98,9 +99,9 @@ class HabibWalletCard extends StatelessWidget { padding: EdgeInsets.symmetric(horizontal: 50.h), child: Row( children: [ - LocaleKeys.viewDetails.tr(context: context).toText12(color: AppColors.primaryRedColor), + LocaleKeys.viewDetails.tr(context: context).toText12(color: context.primaryRedColor), SizedBox(width: 2.h), - Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 10.h), + Icon(Icons.arrow_forward_ios, color: context.primaryRedColor, size: 10.h), ], ).onPress(() { Navigator.of(context).push( @@ -119,6 +120,7 @@ class HabibWalletCard extends StatelessWidget { child: Utils.getPaymentMethods(), ), CustomButton( + isIconOnEnd: true, height: 40.h, icon: AppAssets.recharge_icon, iconSize: 24.h, @@ -128,7 +130,7 @@ class HabibWalletCard extends StatelessWidget { borderWidth: 0.w, fontWeight: FontWeight.w500, borderColor: Colors.transparent, - padding: EdgeInsets.fromLTRB(4, 0, 12, 0), + padding: EdgeInsets.fromLTRB(12, 0, 12, 0), fontSize: 14.f, onPressed: () { Navigator.of(context).push(CustomPageRoute(page: RechargeWalletPage())); diff --git a/lib/presentation/home/widgets/large_service_card.dart b/lib/presentation/home/widgets/large_service_card.dart index e25ed0b3..8eea8e9c 100644 --- a/lib/presentation/home/widgets/large_service_card.dart +++ b/lib/presentation/home/widgets/large_service_card.dart @@ -57,7 +57,7 @@ class LargeServiceCard extends StatelessWidget { height: 180.h, padding: EdgeInsets.only(bottom: 16.h, top: 16.h), decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, + color: context.cardBaseColor, customBorder: BorderRadius.only( bottomLeft: Radius.circular(24.r), bottomRight: Radius.circular(24.r), @@ -90,8 +90,8 @@ class LargeServiceCard extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - serviceCardData.title.tr(context: context).toText14(isBold: true, color: AppColors.textColor), - serviceCardData.subtitle.tr(context: context).toText12(fontWeight: FontWeight.w500, color: AppColors.textColorLight), + serviceCardData.title.tr(context: context).toText14(isBold: true, color: context.textColor), + serviceCardData.subtitle.tr(context: context).toText12(fontWeight: FontWeight.w500, color: context.textColorLight), ], ), ), @@ -103,9 +103,9 @@ class LargeServiceCard extends StatelessWidget { handleOnTap(); }, padding: EdgeInsets.zero, - backgroundColor: serviceCardData.isBold ? AppColors.successLightColor.withValues(alpha: 0.2) : AppColors.bgRedLightColor, - borderColor: serviceCardData.isBold ? AppColors.successLightColor.withValues(alpha: 0.01) : AppColors.bgRedLightColor, - textColor: serviceCardData.isBold ? AppColors.successColor : AppColors.primaryRedColor, + backgroundColor: serviceCardData.isBold ? AppColors.successColor.withValues(alpha: 0.2) : context.secondaryLightRedColor, + borderColor: serviceCardData.isBold ? AppColors.successColor.withValues(alpha: 0.01) : context.secondaryLightRedColor, + textColor: serviceCardData.isBold ? AppColors.successColor : context.secondaryLightRedForegroundColor, fontSize: 14.f, fontWeight: FontWeight.w500, borderRadius: 10.r, @@ -189,10 +189,10 @@ class FadedLargeServiceCard extends StatelessWidget { gradient: LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, - stops: [0.536, 1.0], // 53.6% and 100% + stops: const [0.536, 1.0], colors: [ - Color(0xFFF8F8F8).withValues(alpha: 0), // Transparent - Color(0xFFF8F8F8), // Solid #F8F8F8 + context.scaffoldBgColor.withValues(alpha: 0), + context.scaffoldBgColor, ], ), ), @@ -223,11 +223,11 @@ class FadedLargeServiceCard extends StatelessWidget { ), ), SizedBox(width: 12.w), - serviceCardData.title.tr(context: context).toText18(weight: FontWeight.w500, color: AppColors.textColor).expanded, + serviceCardData.title.tr(context: context).toText18(weight: FontWeight.w500, color: context.textColor).expanded, ], ), SizedBox(height: 10.h), - serviceCardData.subtitle.tr(context: context).toText14(weight: FontWeight.w500, color: AppColors.blackBgColor, letterSpacing: 0), + serviceCardData.subtitle.tr(context: context).toText14(weight: FontWeight.w500, color: context.textColor, letterSpacing: 0), SizedBox(height: 12.h), CustomButton( text: serviceCardData.isBold ? "Visit Pharmacy Online".needTranslation : LocaleKeys.bookNow.tr(context: context), @@ -235,9 +235,9 @@ class FadedLargeServiceCard extends StatelessWidget { handleOnTap(); }, padding: EdgeInsets.zero, - backgroundColor: serviceCardData.isBold ? AppColors.successLightColor.withValues(alpha: 0.2) : AppColors.blackBgColor, - borderColor: serviceCardData.isBold ? AppColors.successLightColor.withValues(alpha: 0.01) : AppColors.blackBgColor, - textColor: serviceCardData.isBold ? AppColors.successColor : AppColors.whiteColor, + backgroundColor: serviceCardData.isBold ? AppColors.successColor.withValues(alpha: 0.2) : context.serviceCardButtonColor, + borderColor: serviceCardData.isBold ? AppColors.successColor.withValues(alpha: 0.01) : context.serviceCardButtonColor, + textColor: serviceCardData.isBold ? AppColors.successColor : Colors.white, fontSize: 14.f, fontWeight: FontWeight.w500, borderRadius: 10.r, diff --git a/lib/presentation/home/widgets/small_service_card.dart b/lib/presentation/home/widgets/small_service_card.dart index 84ef6fa2..1dd8ab7f 100644 --- a/lib/presentation/home/widgets/small_service_card.dart +++ b/lib/presentation/home/widgets/small_service_card.dart @@ -3,6 +3,7 @@ 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/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/emergency_services/emergency_services_view_model.dart'; @@ -18,14 +19,13 @@ import 'package:hmg_patient_app_new/presentation/lab/lab_orders_page.dart'; import 'package:hmg_patient_app_new/presentation/medical_file/patient_sickleaves_list_page.dart'; import 'package:hmg_patient_app_new/presentation/parking/paking_page.dart'; import 'package:hmg_patient_app_new/presentation/prescriptions/prescriptions_list_page.dart'; +import 'package:hmg_patient_app_new/presentation/radiology/radiology_orders_page.dart'; +import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart'; import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart'; import 'package:provider/provider.dart'; -import '../../../core/utils/utils.dart'; -import '../../../theme/colors.dart'; import '../../emergency_services/call_ambulance/widgets/HospitalBottomSheetBody.dart'; -import '../../radiology/radiology_orders_page.dart' show RadiologyOrdersPage; class SmallServiceCard extends StatelessWidget { final String serviceName; @@ -37,39 +37,45 @@ class SmallServiceCard extends StatelessWidget { final Color backgroundColor; final bool isBold; - SmallServiceCard({ + const SmallServiceCard({ super.key, this.icon = "", this.serviceName = "", this.title = "", this.subtitle = "", this.backgroundColor = AppColors.whiteColor, - this.iconColor = AppColors.blackColor, - this.textColor = AppColors.blackColor, + this.iconColor = AppColors.textColor, + this.textColor = AppColors.textColor, this.isBold = false, }); @override Widget build(BuildContext context) { + // Resolve context-aware colors: if caller passed the light-mode defaults, + // swap them for the context-aware equivalents so dark mode works correctly. + final resolvedBg = backgroundColor == AppColors.whiteColor ? context.cardBaseColor : backgroundColor; + final resolvedIcon = iconColor == AppColors.textColor ? context.iconColor : iconColor; + final resolvedText = textColor == AppColors.textColor ? context.textColor : textColor; + return Container( height: 92.h, width: 92.h, padding: EdgeInsets.all(4.0), decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: backgroundColor, - borderRadius: 16, + color: resolvedBg, + borderRadius: 16.r, ), child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: icon, iconColor: iconColor, width: 32.h, height: 32.h), + Utils.buildSvgWithAssets(icon: icon, iconColor: resolvedIcon, width: 32.h, height: 32.h), SizedBox(height: 6.h), if (isFoldable || isTablet) ...[ - title.tr(context: context).toText10(color: textColor, weight: FontWeight.w500, isCenter: true, letterSpacing: -0.2, maxlines: 1), - subtitle.tr(context: context).toText10(color: textColor, weight: FontWeight.w500, isCenter: true, letterSpacing: -0.2, maxlines: 1), + title.tr(context: context).toText10(color: resolvedText, weight: FontWeight.w500, isCenter: true, letterSpacing: -0.2, maxlines: 1), + subtitle.tr(context: context).toText10(color: resolvedText, weight: FontWeight.w500, isCenter: true, letterSpacing: -0.2, maxlines: 1), ] else ...[ - title.tr(context: context).toText12(color: textColor, fontWeight: FontWeight.w500, isCenter: true, letterSpacing: -0.2, maxLine: 1), - subtitle.tr(context: context).toText12(color: textColor, fontWeight: FontWeight.w500, isCenter: true, letterSpacing: -0.2, maxLine: 1), + title.tr(context: context).toText12(color: resolvedText, fontWeight: FontWeight.w500, isCenter: true, letterSpacing: -0.2, maxLine: 1), + subtitle.tr(context: context).toText12(color: resolvedText, fontWeight: FontWeight.w500, isCenter: true, letterSpacing: -0.2, maxLine: 1), ] ], ), diff --git a/lib/presentation/home/widgets/welcome_widget.dart b/lib/presentation/home/widgets/welcome_widget.dart index 1bb17b5b..fd283f14 100644 --- a/lib/presentation/home/widgets/welcome_widget.dart +++ b/lib/presentation/home/widgets/welcome_widget.dart @@ -39,8 +39,16 @@ class WelcomeWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, mainAxisSize: MainAxisSize.min, children: [ - Flexible(child: name.toText16(weight: FontWeight.w500, textOverflow: TextOverflow.ellipsis, maxlines: 1, height: 1)), - const Icon(Icons.keyboard_arrow_down, size: 20, color: Colors.black), + Flexible( + child: name.toText16( + weight: FontWeight.w500, + textOverflow: TextOverflow.ellipsis, + maxlines: 1, + height: 1, + color: context.textColor, + ), + ), + Icon(Icons.keyboard_arrow_down, size: 20, color: context.iconColor), ], ), ], diff --git a/lib/presentation/home_health_care/hhc_procedures_page.dart b/lib/presentation/home_health_care/hhc_procedures_page.dart index ef5dce5c..987ed47a 100644 --- a/lib/presentation/home_health_care/hhc_procedures_page.dart +++ b/lib/presentation/home_health_care/hhc_procedures_page.dart @@ -115,7 +115,7 @@ class _HhcProceduresPageState extends State { Container( padding: EdgeInsets.all(12.w), decoration: BoxDecoration( - color: AppColors.bgScaffoldColor, + color: AppColors.scaffoldBgColor, borderRadius: BorderRadius.circular(12.r), border: Border.all( color: AppColors.greyColor.withAlpha(51), @@ -135,7 +135,7 @@ class _HhcProceduresPageState extends State { SizedBox(width: 6.w), LocaleKeys.requestedServices.tr().toText14( weight: FontWeight.w600, - color: AppColors.blackColor, + color: AppColors.textColor, ), ], ), @@ -174,7 +174,7 @@ class _HhcProceduresPageState extends State { SizedBox(width: 8.w), Expanded( child: serviceName.toText14( - color: AppColors.blackColor, + color: AppColors.textColor, weight: FontWeight.w500, maxlines: 3, ), @@ -319,7 +319,7 @@ class _HhcProceduresPageState extends State { children: [ serviceName.toText16( weight: FontWeight.w500, - color: AppColors.blackColor, + color: AppColors.textColor, maxlines: 2, ), ], @@ -446,7 +446,7 @@ class _HhcProceduresPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.homeHealthCare.tr(context: context), history: () => Navigator.of(context).push(CustomPageRoute(page: HhcOrderDetailPage(), direction: AxisDirection.up)), diff --git a/lib/presentation/lab/lab_orders_page.dart b/lib/presentation/lab/lab_orders_page.dart index 0bcbc364..74af4727 100644 --- a/lib/presentation/lab/lab_orders_page.dart +++ b/lib/presentation/lab/lab_orders_page.dart @@ -1 +1 @@ -import 'dart:async'; import 'dart:convert'; 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'; 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/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/lab/lab_view_model.dart'; import 'package:hmg_patient_app_new/features/lab/models/resp_models/patient_lab_orders_response_model.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/presentation/lab/lab_result_item_view.dart'; import 'package:hmg_patient_app_new/presentation/lab/lab_result_via_clinic/LabResultByClinic.dart'; import 'package:hmg_patient_app_new/presentation/lab/search_lab_report.dart'; import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/utils/date_util.dart'; import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; import 'package:hmg_patient_app_new/widgets/appbar/collapsing_toolbar.dart'; import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart'; import 'package:hmg_patient_app_new/widgets/chip/custom_chip_widget.dart'; import 'package:hmg_patient_app_new/widgets/custom_tab_bar.dart'; import 'package:hmg_patient_app_new/widgets/date_range_selector/viewmodel/date_range_view_model.dart'; import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart'; import 'package:provider/provider.dart'; import 'alphabeticScroll.dart'; class LabOrdersPage extends StatefulWidget { const LabOrdersPage({super.key}); @override State createState() => _LabOrdersPageState(); } class _LabOrdersPageState extends State { late LabViewModel labProvider; late DateRangeSelectorRangeViewModel rangeViewModel; late AppState _appState; List?> labSuggestions = []; int? expandedIndex; String? selectedFilterText = ''; int activeIndex = 0; @override void initState() { scheduleMicrotask(() { labProvider.initLabProvider(); }); super.initState(); } @override Widget build(BuildContext context) { labProvider = Provider.of(context, listen: false); rangeViewModel = Provider.of(context); _appState = getIt(); return CollapsingListView( title: LocaleKeys.labResults.tr(context: context), search: () async { if (labProvider.isLabOrdersLoading) { return; } else { String? value = await Navigator.of(context).push( CustomPageRoute( page: SearchLabResultsContent(labSuggestionsList: labProvider.labSuggestions), fullScreenDialog: true, direction: AxisDirection.down, ), ); if (value != null) { selectedFilterText = value; labProvider.filterLabReports(value); } } }, child: Consumer( builder: (context, labViewModel, child) { return SingleChildScrollView( physics: NeverScrollableScrollPhysics(), padding: EdgeInsets.all(24.h), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( children: [ Expanded( child: CustomTabBar( activeTextColor: Color(0xffED1C2B), activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1), tabs: [ CustomTabBarModel(null, LocaleKeys.byVisit.tr()), CustomTabBarModel(null, LocaleKeys.byTest.tr()), // CustomTabBarModel(null, "Completed".needTranslation), ], onTabChange: (index) { activeIndex = index; setState(() {}); }, ), ), ], ), if (activeIndex == 0) Padding( padding: EdgeInsets.symmetric(vertical: 10.h), child: Row( children: [ CustomButton( text: LocaleKeys.byClinic.tr(context: context), onPressed: () { labViewModel.setIsSortByClinic(true); }, backgroundColor: labViewModel.isSortByClinic ? AppColors.bgRedLightColor : AppColors.whiteColor, borderColor: labViewModel.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withValues(alpha: 0.2), textColor: labViewModel.isSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, padding: EdgeInsets.fromLTRB(10, 0, 10, 0), height: 40.h, ), SizedBox(width: 8.h), CustomButton( text: LocaleKeys.byHospital.tr(context: context), onPressed: () { labViewModel.setIsSortByClinic(false); }, backgroundColor: labViewModel.isSortByClinic ? AppColors.whiteColor : AppColors.bgRedLightColor, borderColor: labViewModel.isSortByClinic ? AppColors.textColor.withValues(alpha: 0.2) : AppColors.primaryRedColor, textColor: labViewModel.isSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, padding: EdgeInsets.fromLTRB(10, 0, 10, 0), height: 40.h, ), ], ), ), SizedBox(height: 8.h), selectedFilterText!.isNotEmpty ? Column( children: [ AppCustomChipWidget( labelText: selectedFilterText!, backgroundColor: AppColors.alertColor, textColor: AppColors.whiteColor, deleteIcon: AppAssets.close_bottom_sheet_icon, deleteIconColor: AppColors.whiteColor, deleteIconHasColor: true, onDeleteTap: () { selectedFilterText = ""; labProvider.filterLabReports(""); }, ), SizedBox(height: 8.h), ], ) : SizedBox(), activeIndex == 0 ? // By Visit - show grouped view when available labViewModel.isLabOrdersLoading ? ListView.builder( shrinkWrap: true, physics: AlwaysScrollableScrollPhysics(), padding: EdgeInsets.zero, itemCount: 5, itemBuilder: (context, index) => LabResultItemView( onTap: () {}, labOrder: null, index: index, isLoading: true, ), ) : (labViewModel.patientLabOrdersViewList.isNotEmpty ? ListView.builder( shrinkWrap: true, physics: NeverScrollableScrollPhysics(), padding: EdgeInsets.zero, itemCount: labViewModel.patientLabOrdersViewList.length, itemBuilder: (context, index) { final group = labViewModel.patientLabOrdersViewList[index]; final isExpanded = expandedIndex == index; return AnimationConfiguration.staggeredList( position: index, duration: const Duration(milliseconds: 500), child: SlideAnimation( verticalOffset: 100.0, child: FadeInAnimation( child: AnimatedContainer( duration: Duration(milliseconds: 300), curve: Curves.easeInOut, margin: EdgeInsets.symmetric(vertical: 8.h), decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.h, hasShadow: true), child: InkWell( onTap: () { setState(() { expandedIndex = isExpanded ? null : index; }); }, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: EdgeInsets.all(16.h), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ AppCustomChipWidget(labelText: "${group.length} ${LocaleKeys.results.tr(context: context)}"), Icon(isExpanded ? Icons.expand_less : Icons.expand_more), ], ), SizedBox(height: 8.h), Text( labViewModel.isSortByClinic ? (group.first.clinicDescription ?? 'Unknown') : (group.first.projectName ?? 'Unknown'), style: TextStyle(fontSize: 16.h, fontWeight: FontWeight.w600), overflow: TextOverflow.ellipsis, ), ], ), ), AnimatedSwitcher( duration: Duration(milliseconds: 500), switchInCurve: Curves.easeIn, switchOutCurve: Curves.easeOut, transitionBuilder: (Widget child, Animation animation) { return FadeTransition( opacity: animation, child: SizeTransition( sizeFactor: animation, axisAlignment: 0.0, child: child, ), ); }, child: isExpanded ? Container( key: ValueKey(index), padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 0.h), child: ListView.separated( shrinkWrap: true, physics: NeverScrollableScrollPhysics(), padding: EdgeInsets.zero, itemBuilder: (cxt, index) { PatientLabOrdersResponseModel order = group[index]; return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( mainAxisSize: MainAxisSize.min, children: [ Image.network( order.doctorImageURL ?? "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", width: 24.w, height: 24.h, fit: BoxFit.cover, ).circle(100), SizedBox(width: 8.h), Expanded(child: (order.doctorName ?? order.doctorNameEnglish ?? "").toString().toText14(weight: FontWeight.w500)), ], ), SizedBox(height: 8.h), Wrap( direction: Axis.horizontal, spacing: 4.h, runSpacing: 4.h, children: [ AppCustomChipWidget( labelText: ("${LocaleKeys.orderNo.tr(context: context)}: ${order.orderNo!}"), ), AppCustomChipWidget( labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(order.orderDate ?? ""), false), ), AppCustomChipWidget( labelText: labViewModel.isSortByClinic ? (order.projectName ?? "") : (order.clinicDescription ?? ""), ), ], ), // Row( // children: [ // CustomButton( // text: ("Order No: ".needTranslation + order.orderNo!), // onPressed: () {}, // backgroundColor: AppColors.greyColor, // borderColor: AppColors.greyColor, // textColor: AppColors.blackColor, // fontSize: 10, // fontWeight: FontWeight.w500, // borderRadius: 8, // padding: EdgeInsets.fromLTRB(10, 0, 10, 0), // height: 24.h, // ), // SizedBox(width: 8.h), // CustomButton( // text: DateUtil.formatDateToDate(DateUtil.convertStringToDate(order.orderDate ?? ""), false), // onPressed: () {}, // backgroundColor: AppColors.greyColor, // borderColor: AppColors.greyColor, // textColor: AppColors.blackColor, // fontSize: 10, // fontWeight: FontWeight.w500, // borderRadius: 8, // padding: EdgeInsets.fromLTRB(10, 0, 10, 0), // height: 24.h, // ), // ], // ), // SizedBox(height: 8.h), // Row( // children: [ // CustomButton( // text: model.isSortByClinic ? (order.clinicDescription ?? "") : (order.projectName ?? ""), // onPressed: () {}, // backgroundColor: AppColors.greyColor, // borderColor: AppColors.greyColor, // textColor: AppColors.blackColor, // fontSize: 10, // fontWeight: FontWeight.w500, // borderRadius: 8, // padding: EdgeInsets.fromLTRB(10, 0, 10, 0), // height: 24.h, // ), // ], // ), SizedBox(height: 12.h), Row( children: [ Expanded(flex: 2, child: SizedBox()), // Expanded( // flex: 1, // child: Container( // height: 40.h, // width: 40.w, // decoration: RoundedRectangleBorder().toSmoothCornerDecoration( // color: AppColors.textColor, // borderRadius: 12, // ), // child: Padding( // padding: EdgeInsets.all(12.h), // child: Transform.flip( // flipX: _appState.isArabic(), // child: Utils.buildSvgWithAssets( // icon: AppAssets.forward_arrow_icon_small, // iconColor: AppColors.whiteColor, // fit: BoxFit.contain, // ), // ), // ), // ).onPress(() { // model.currentlySelectedPatientOrder = order; // labProvider.getPatientLabResultByHospital(order); // labProvider.getPatientSpecialResult(order); // Navigator.of(context).push( // CustomPageRoute(page: LabResultByClinic(labOrder: order)), // ); // }), // ) Expanded( flex: 2, child: CustomButton( icon: AppAssets.view_report_icon, iconColor: AppColors.primaryRedColor, iconSize: 16.h, text: LocaleKeys.viewResults.tr(context: context), onPressed: () { labViewModel.currentlySelectedPatientOrder = order; labProvider.getPatientLabResultByHospital(order); labProvider.getPatientSpecialResult(order); Navigator.of(context).push( CustomPageRoute(page: LabResultByClinic(labOrder: order)), ); }, backgroundColor: AppColors.secondaryLightRedColor, borderColor: AppColors.secondaryLightRedColor, textColor: AppColors.primaryRedColor, fontSize: 14, fontWeight: FontWeight.w500, borderRadius: 12, padding: EdgeInsets.fromLTRB(10, 0, 10, 0), height: 40.h, ), ) ], ), // SizedBox(height: 12.h), // Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.05), height: 1.h), // SizedBox(height: 12.h), ], ).paddingOnly(top: 16, bottom: 16); }, separatorBuilder: (cxt, index) => Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.05), height: 1.h), itemCount: group.length)) : SizedBox.shrink(), ), ], ), ), ), ), )); }, ) : Utils.getNoDataWidget(context, noDataText: LocaleKeys.noLabResults.tr(context: context))) : // By Test or other tabs keep existing behavior (labViewModel.isLabOrdersLoading) ? Column( children: List.generate( 5, (index) => LabResultItemView( onTap: () {}, labOrder: null, index: index, isLoading: true, )), ) : AlphabeticScroll( alpahbetsAvailable: labViewModel.indexedCharacterForUniqueTest, details: labViewModel.uniqueTestsList, labViewModel: labViewModel, rangeViewModel: rangeViewModel, appState: _appState, ) ], )); }, ), ); } Color getLabOrderStatusColor(num status) { switch (status) { case 44: return AppColors.warningColorYellow; case 45: return AppColors.warningColorYellow; case 16: return AppColors.successColor; case 17: return AppColors.successColor; default: return AppColors.greyColor; } } String getLabOrderStatusText(num status) { switch (status) { case 44: return LocaleKeys.resultsPending.tr(context: context); case 45: return LocaleKeys.resultsPending.tr(context: context); case 16: return LocaleKeys.resultsAvailable.tr(context: context); case 17: return LocaleKeys.resultsAvailable.tr(context: context); default: return ""; } } getLabSuggestions(LabViewModel model) { if (model.patientLabOrders.isEmpty) { return []; } return model.patientLabOrders.map((m) => m.testDetails).toList(); } } \ No newline at end of file +import 'dart:async'; import 'dart:convert'; 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'; 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/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/lab/lab_view_model.dart'; import 'package:hmg_patient_app_new/features/lab/models/resp_models/patient_lab_orders_response_model.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/presentation/lab/lab_result_item_view.dart'; import 'package:hmg_patient_app_new/presentation/lab/lab_result_via_clinic/LabResultByClinic.dart'; import 'package:hmg_patient_app_new/presentation/lab/search_lab_report.dart'; import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/core/utils/date_util.dart'; import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart'; import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart'; import 'package:hmg_patient_app_new/widgets/appbar/collapsing_toolbar.dart'; import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart'; import 'package:hmg_patient_app_new/widgets/chip/custom_chip_widget.dart'; import 'package:hmg_patient_app_new/widgets/custom_tab_bar.dart'; import 'package:hmg_patient_app_new/widgets/date_range_selector/viewmodel/date_range_view_model.dart'; import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart'; import 'package:provider/provider.dart'; import 'alphabeticScroll.dart'; class LabOrdersPage extends StatefulWidget { const LabOrdersPage({super.key}); @override State createState() => _LabOrdersPageState(); } class _LabOrdersPageState extends State { late LabViewModel labProvider; late DateRangeSelectorRangeViewModel rangeViewModel; late AppState _appState; List?> labSuggestions = []; int? expandedIndex; String? selectedFilterText = ''; int activeIndex = 0; @override void initState() { scheduleMicrotask(() { labProvider.initLabProvider(); }); super.initState(); } @override Widget build(BuildContext context) { labProvider = Provider.of(context, listen: false); rangeViewModel = Provider.of(context); _appState = getIt(); return CollapsingListView( title: LocaleKeys.labResults.tr(context: context), search: () async { if (labProvider.isLabOrdersLoading) { return; } else { String? value = await Navigator.of(context).push( CustomPageRoute( page: SearchLabResultsContent(labSuggestionsList: labProvider.labSuggestions), fullScreenDialog: true, direction: AxisDirection.down, ), ); if (value != null) { selectedFilterText = value; labProvider.filterLabReports(value); } } }, child: Consumer( builder: (context, labViewModel, child) { return SingleChildScrollView( physics: NeverScrollableScrollPhysics(), padding: EdgeInsets.all(24.h), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( children: [ Expanded( child: CustomTabBar( activeTextColor: Color(0xffED1C2B), activeBackgroundColor: Color(0xffED1C2B).withValues(alpha: .1), tabs: [ CustomTabBarModel(null, LocaleKeys.byVisit.tr()), CustomTabBarModel(null, LocaleKeys.byTest.tr()), // CustomTabBarModel(null, "Completed".needTranslation), ], onTabChange: (index) { activeIndex = index; setState(() {}); }, ), ), ], ), if (activeIndex == 0) Padding( padding: EdgeInsets.symmetric(vertical: 10.h), child: Row( children: [ CustomButton( text: LocaleKeys.byClinic.tr(context: context), onPressed: () { labViewModel.setIsSortByClinic(true); }, backgroundColor: labViewModel.isSortByClinic ? AppColors.secondaryLightRedColor : AppColors.whiteColor, borderColor: labViewModel.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withValues(alpha: 0.2), textColor: labViewModel.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, padding: EdgeInsets.fromLTRB(10, 0, 10, 0), height: 40.h, ), SizedBox(width: 8.h), CustomButton( text: LocaleKeys.byHospital.tr(context: context), onPressed: () { labViewModel.setIsSortByClinic(false); }, backgroundColor: labViewModel.isSortByClinic ? AppColors.whiteColor : AppColors.secondaryLightRedColor, borderColor: labViewModel.isSortByClinic ? AppColors.textColor.withValues(alpha: 0.2) : AppColors.primaryRedColor, textColor: labViewModel.isSortByClinic ? AppColors.textColor : AppColors.primaryRedColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, padding: EdgeInsets.fromLTRB(10, 0, 10, 0), height: 40.h, ), ], ), ), SizedBox(height: 8.h), selectedFilterText!.isNotEmpty ? Column( children: [ AppCustomChipWidget( labelText: selectedFilterText!, backgroundColor: AppColors.alertColor, textColor: AppColors.whiteColor, deleteIcon: AppAssets.close_bottom_sheet_icon, deleteIconColor: AppColors.whiteColor, deleteIconHasColor: true, onDeleteTap: () { selectedFilterText = ""; labProvider.filterLabReports(""); }, ), SizedBox(height: 8.h), ], ) : SizedBox(), activeIndex == 0 ? // By Visit - show grouped view when available labViewModel.isLabOrdersLoading ? ListView.builder( shrinkWrap: true, physics: AlwaysScrollableScrollPhysics(), padding: EdgeInsets.zero, itemCount: 5, itemBuilder: (context, index) => LabResultItemView( onTap: () {}, labOrder: null, index: index, isLoading: true, ), ) : (labViewModel.patientLabOrdersViewList.isNotEmpty ? ListView.builder( shrinkWrap: true, physics: NeverScrollableScrollPhysics(), padding: EdgeInsets.zero, itemCount: labViewModel.patientLabOrdersViewList.length, itemBuilder: (context, index) { final group = labViewModel.patientLabOrdersViewList[index]; final isExpanded = expandedIndex == index; return AnimationConfiguration.staggeredList( position: index, duration: const Duration(milliseconds: 500), child: SlideAnimation( verticalOffset: 100.0, child: FadeInAnimation( child: AnimatedContainer( duration: Duration(milliseconds: 300), curve: Curves.easeInOut, margin: EdgeInsets.symmetric(vertical: 8.h), decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.h, hasShadow: true), child: InkWell( onTap: () { setState(() { expandedIndex = isExpanded ? null : index; }); }, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: EdgeInsets.all(16.h), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ AppCustomChipWidget(labelText: "${group.length} ${LocaleKeys.results.tr(context: context)}"), Icon(isExpanded ? Icons.expand_less : Icons.expand_more), ], ), SizedBox(height: 8.h), Text( labViewModel.isSortByClinic ? (group.first.clinicDescription ?? 'Unknown') : (group.first.projectName ?? 'Unknown'), style: TextStyle(fontSize: 16.h, fontWeight: FontWeight.w600), overflow: TextOverflow.ellipsis, ), ], ), ), AnimatedSwitcher( duration: Duration(milliseconds: 500), switchInCurve: Curves.easeIn, switchOutCurve: Curves.easeOut, transitionBuilder: (Widget child, Animation animation) { return FadeTransition( opacity: animation, child: SizeTransition( sizeFactor: animation, axisAlignment: 0.0, child: child, ), ); }, child: isExpanded ? Container( key: ValueKey(index), padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 0.h), child: ListView.separated( shrinkWrap: true, physics: NeverScrollableScrollPhysics(), padding: EdgeInsets.zero, itemBuilder: (cxt, index) { PatientLabOrdersResponseModel order = group[index]; return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( mainAxisSize: MainAxisSize.min, children: [ Image.network( order.doctorImageURL ?? "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png", width: 24.w, height: 24.h, fit: BoxFit.cover, ).circle(100), SizedBox(width: 8.h), Expanded(child: (order.doctorName ?? order.doctorNameEnglish ?? "").toString().toText14(weight: FontWeight.w500)), ], ), SizedBox(height: 8.h), Wrap( direction: Axis.horizontal, spacing: 4.h, runSpacing: 4.h, children: [ AppCustomChipWidget( labelText: ("${LocaleKeys.orderNo.tr(context: context)}: ${order.orderNo!}"), ), AppCustomChipWidget( labelText: DateUtil.formatDateToDate(DateUtil.convertStringToDate(order.orderDate ?? ""), false), ), AppCustomChipWidget( labelText: labViewModel.isSortByClinic ? (order.projectName ?? "") : (order.clinicDescription ?? ""), ), ], ), // Row( // children: [ // CustomButton( // text: ("Order No: ".needTranslation + order.orderNo!), // onPressed: () {}, // backgroundColor: AppColors.greyColor, // borderColor: AppColors.greyColor, // textColor: AppColors.textColor, // fontSize: 10, // fontWeight: FontWeight.w500, // borderRadius: 8, // padding: EdgeInsets.fromLTRB(10, 0, 10, 0), // height: 24.h, // ), // SizedBox(width: 8.h), // CustomButton( // text: DateUtil.formatDateToDate(DateUtil.convertStringToDate(order.orderDate ?? ""), false), // onPressed: () {}, // backgroundColor: AppColors.greyColor, // borderColor: AppColors.greyColor, // textColor: AppColors.textColor, // fontSize: 10, // fontWeight: FontWeight.w500, // borderRadius: 8, // padding: EdgeInsets.fromLTRB(10, 0, 10, 0), // height: 24.h, // ), // ], // ), // SizedBox(height: 8.h), // Row( // children: [ // CustomButton( // text: model.isSortByClinic ? (order.clinicDescription ?? "") : (order.projectName ?? ""), // onPressed: () {}, // backgroundColor: AppColors.greyColor, // borderColor: AppColors.greyColor, // textColor: AppColors.textColor, // fontSize: 10, // fontWeight: FontWeight.w500, // borderRadius: 8, // padding: EdgeInsets.fromLTRB(10, 0, 10, 0), // height: 24.h, // ), // ], // ), SizedBox(height: 12.h), Row( children: [ Expanded(flex: 2, child: SizedBox()), // Expanded( // flex: 1, // child: Container( // height: 40.h, // width: 40.w, // decoration: RoundedRectangleBorder().toSmoothCornerDecoration( // color: AppColors.textColor, // borderRadius: 12, // ), // child: Padding( // padding: EdgeInsets.all(12.h), // child: Transform.flip( // flipX: _appState.isArabic(), // child: Utils.buildSvgWithAssets( // icon: AppAssets.forward_arrow_icon_small, // iconColor: AppColors.whiteColor, // fit: BoxFit.contain, // ), // ), // ), // ).onPress(() { // model.currentlySelectedPatientOrder = order; // labProvider.getPatientLabResultByHospital(order); // labProvider.getPatientSpecialResult(order); // Navigator.of(context).push( // CustomPageRoute(page: LabResultByClinic(labOrder: order)), // ); // }), // ) Expanded( flex: 2, child: CustomButton( icon: AppAssets.view_report_icon, iconColor: AppColors.primaryRedColor, iconSize: 16.h, text: LocaleKeys.viewResults.tr(context: context), onPressed: () { labViewModel.currentlySelectedPatientOrder = order; labProvider.getPatientLabResultByHospital(order); labProvider.getPatientSpecialResult(order); Navigator.of(context).push( CustomPageRoute(page: LabResultByClinic(labOrder: order)), ); }, backgroundColor: AppColors.secondaryLightRedColor, borderColor: AppColors.secondaryLightRedColor, textColor: AppColors.primaryRedColor, fontSize: 14, fontWeight: FontWeight.w500, borderRadius: 12, padding: EdgeInsets.fromLTRB(10, 0, 10, 0), height: 40.h, ), ) ], ), // SizedBox(height: 12.h), // Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.05), height: 1.h), // SizedBox(height: 12.h), ], ).paddingOnly(top: 16, bottom: 16); }, separatorBuilder: (cxt, index) => Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.05), height: 1.h), itemCount: group.length)) : SizedBox.shrink(), ), ], ), ), ), ), )); }, ) : Utils.getNoDataWidget(context, noDataText: LocaleKeys.noLabResults.tr(context: context))) : // By Test or other tabs keep existing behavior (labViewModel.isLabOrdersLoading) ? Column( children: List.generate( 5, (index) => LabResultItemView( onTap: () {}, labOrder: null, index: index, isLoading: true, )), ) : AlphabeticScroll( alpahbetsAvailable: labViewModel.indexedCharacterForUniqueTest, details: labViewModel.uniqueTestsList, labViewModel: labViewModel, rangeViewModel: rangeViewModel, appState: _appState, ) ], )); }, ), ); } Color getLabOrderStatusColor(num status) { switch (status) { case 44: return AppColors.warningColorYellow; case 45: return AppColors.warningColorYellow; case 16: return AppColors.successColor; case 17: return AppColors.successColor; default: return AppColors.greyColor; } } String getLabOrderStatusText(num status) { switch (status) { case 44: return LocaleKeys.resultsPending.tr(context: context); case 45: return LocaleKeys.resultsPending.tr(context: context); case 16: return LocaleKeys.resultsAvailable.tr(context: context); case 17: return LocaleKeys.resultsAvailable.tr(context: context); default: return ""; } } getLabSuggestions(LabViewModel model) { if (model.patientLabOrders.isEmpty) { return []; } return model.patientLabOrders.map((m) => m.testDetails).toList(); } } \ No newline at end of file diff --git a/lib/presentation/lab/lab_result_via_clinic/LabResultByClinic.dart b/lib/presentation/lab/lab_result_via_clinic/LabResultByClinic.dart index 8fb30900..45436923 100644 --- a/lib/presentation/lab/lab_result_via_clinic/LabResultByClinic.dart +++ b/lib/presentation/lab/lab_result_via_clinic/LabResultByClinic.dart @@ -35,7 +35,7 @@ class LabResultByClinic extends StatelessWidget { Widget build(BuildContext context) { labViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Column( children: [ Expanded( diff --git a/lib/presentation/lab/lab_result_via_clinic/ai_analysis_widget.dart b/lib/presentation/lab/lab_result_via_clinic/ai_analysis_widget.dart index f0c9b26b..de09f172 100644 --- a/lib/presentation/lab/lab_result_via_clinic/ai_analysis_widget.dart +++ b/lib/presentation/lab/lab_result_via_clinic/ai_analysis_widget.dart @@ -30,7 +30,7 @@ class AiAnalysisWidget extends StatelessWidget { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - LocaleKeys.aiAnalysis.tr().toText18(weight: FontWeight.w700, color: AppColors.blackColor), + LocaleKeys.aiAnalysis.tr().toText18(weight: FontWeight.w700, color: AppColors.textColor), Container( padding: EdgeInsets.all(8.r), decoration: BoxDecoration(gradient: AppColors.aiLinearGradient, borderRadius: BorderRadius.circular(8.r)), @@ -40,7 +40,7 @@ class AiAnalysisWidget extends StatelessWidget { ), SizedBox(height: 16.h), if (data.summary != null && data.summary!.isNotEmpty) ...[ - LocaleKeys.suggestion.tr().toText16(weight: FontWeight.w700, color: AppColors.blackColor), + LocaleKeys.suggestion.tr().toText16(weight: FontWeight.w700, color: AppColors.textColor), SizedBox(height: 8.h), data.summary!.toText14(color: AppColors.textColorLight, height: 1.5, weight: FontWeight.w400), SizedBox(height: 16.h), @@ -48,7 +48,7 @@ class AiAnalysisWidget extends StatelessWidget { SizedBox(height: 16.h), ], if (data.aiPredictions != null && data.aiPredictions!.isNotEmpty) ...[ - LocaleKeys.prediction.tr().toText16(weight: FontWeight.w700, color: AppColors.blackColor), + LocaleKeys.prediction.tr().toText16(weight: FontWeight.w700, color: AppColors.textColor), SizedBox(height: 12.h), ...data.aiPredictions!.map((item) => _buildBulletItem(item)), SizedBox(height: 16.h), @@ -56,7 +56,7 @@ class AiAnalysisWidget extends StatelessWidget { SizedBox(height: 16.h), ], if (data.prevention != null && data.prevention!.isNotEmpty) ...[ - LocaleKeys.prevention.tr().toText16(weight: FontWeight.w700, color: AppColors.blackColor), + LocaleKeys.prevention.tr().toText16(weight: FontWeight.w700, color: AppColors.textColor), SizedBox(height: 12.h), ...data.prevention!.map((item) => _buildBulletItem(item)), SizedBox(height: 20.h), @@ -88,7 +88,7 @@ class AiAnalysisWidget extends StatelessWidget { child: Container( width: 5.r, height: 5.r, - decoration: const BoxDecoration(color: AppColors.blackColor, shape: BoxShape.circle), + decoration: const BoxDecoration(color: AppColors.textColor, shape: BoxShape.circle), ), ), Expanded( diff --git a/lib/presentation/lab/lab_result_via_clinic/lab_ai_analysis_detailed_page.dart b/lib/presentation/lab/lab_result_via_clinic/lab_ai_analysis_detailed_page.dart index 14ff620b..91083aff 100644 --- a/lib/presentation/lab/lab_result_via_clinic/lab_ai_analysis_detailed_page.dart +++ b/lib/presentation/lab/lab_result_via_clinic/lab_ai_analysis_detailed_page.dart @@ -44,7 +44,7 @@ class _LabAiAnalysisDetailedPageState extends State { if (analysis.summary != null && analysis.summary!.isNotEmpty) { expandableItems.add( ExpandableListItem( - title: LocaleKeys.summary.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor), + title: LocaleKeys.summary.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.textColor), initiallyExpanded: true, children: [ SizedBox(height: 10.h), @@ -63,7 +63,7 @@ class _LabAiAnalysisDetailedPageState extends State { if (analysis.aiGeneratedAttributes != null && analysis.aiGeneratedAttributes!.isNotEmpty) { expandableItems.add( ExpandableListItem( - title: LocaleKeys.labResults.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor), + title: LocaleKeys.labResults.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.textColor), children: [ SizedBox(height: 10.h), ...analysis.aiGeneratedAttributes!.map((attr) { @@ -83,7 +83,7 @@ class _LabAiAnalysisDetailedPageState extends State { if (analysis.aiPredictions != null && analysis.aiPredictions!.isNotEmpty) { expandableItems.add( ExpandableListItem( - title: LocaleKeys.prediction.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor), + title: LocaleKeys.prediction.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.textColor), children: [ SizedBox(height: 10.h), Container( @@ -104,7 +104,7 @@ class _LabAiAnalysisDetailedPageState extends State { if (analysis.aiRecommendations != null && analysis.aiRecommendations!.isNotEmpty) { expandableItems.add( ExpandableListItem( - title: LocaleKeys.suggestions.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor), + title: LocaleKeys.suggestions.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.textColor), children: [ SizedBox(height: 10.h), Container( @@ -151,7 +151,7 @@ class _LabAiAnalysisDetailedPageState extends State { if (analysis.riskFactors != null && analysis.riskFactors!.isNotEmpty) { expandableItems.add( ExpandableListItem( - title: LocaleKeys.riskFactors.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor), + title: LocaleKeys.riskFactors.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.textColor), children: [ SizedBox(height: 10.h), ...analysis.riskFactors!.asMap().entries.map((entry) { @@ -172,7 +172,7 @@ class _LabAiAnalysisDetailedPageState extends State { decoration: BoxDecoration(color: Color(0xFFFBCB6E).withAlpha(38), borderRadius: BorderRadius.circular(8)), child: Padding( padding: const EdgeInsets.all(8.0), - child: (risk.risk ?? "").toText10(weight: FontWeight.w500, color: AppColors.blackColor), + child: (risk.risk ?? "").toText10(weight: FontWeight.w500, color: AppColors.textColor), ), ), ), @@ -185,7 +185,7 @@ class _LabAiAnalysisDetailedPageState extends State { Utils.buildSvgWithAssets(icon: AppAssets.guradIcon), Padding( padding: const EdgeInsets.all(8.0), - child: (risk.factor ?? "").toText16(weight: FontWeight.w700, color: AppColors.blackColor), + child: (risk.factor ?? "").toText16(weight: FontWeight.w700, color: AppColors.textColor), ), ], ), @@ -220,7 +220,7 @@ class _LabAiAnalysisDetailedPageState extends State { if (analysis.prevention != null && analysis.prevention!.isNotEmpty) { expandableItems.add( ExpandableListItem( - title: LocaleKeys.prevention.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.blackColor), + title: LocaleKeys.prevention.tr(context: context).toText18(weight: FontWeight.w700, color: AppColors.textColor), children: [ SizedBox(height: 10.h), Container( @@ -241,7 +241,7 @@ class _LabAiAnalysisDetailedPageState extends State { // if (analysis.suggestedDoctors != null && analysis.suggestedDoctors!.isNotEmpty) { // expandableItems.add( // ExpandableListItem( - // title: "Suggested Doctors".toText18(weight: FontWeight.w700, color: AppColors.blackColor), + // title: "Suggested Doctors".toText18(weight: FontWeight.w700, color: AppColors.textColor), // children: [ // SizedBox(height: 10.h), // Container( @@ -351,7 +351,7 @@ class _LabAiAnalysisDetailedPageState extends State { case 'high': return AppColors.primaryRedColor; case 'medium' || 'moderate': - return AppColors.textGreenColor; + return AppColors.successColor; case 'low': return AppColors.alertColor; default: @@ -389,7 +389,7 @@ class _LabAiAnalysisDetailedPageState extends State { case 'CRITICAL HIGH': return AppColors.primaryRedColor; case 'N': - return AppColors.textGreenColor; + return AppColors.successColor; case 'L': // Low case 'LL': // Very Low case 'CRITICAL LOW': diff --git a/lib/presentation/lab/lab_result_via_clinic/lab_order_specialResult.dart b/lib/presentation/lab/lab_result_via_clinic/lab_order_specialResult.dart index 5f71a7ea..c77105f5 100644 --- a/lib/presentation/lab/lab_result_via_clinic/lab_order_specialResult.dart +++ b/lib/presentation/lab/lab_result_via_clinic/lab_order_specialResult.dart @@ -90,7 +90,7 @@ class LabOrderSpecialResult extends StatelessWidget { style: TextStyle( fontSize: 18.fSize, fontWeight: FontWeight.w600, - color: AppColors.blackColor), + color: AppColors.textColor), ), Container( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( diff --git a/lib/presentation/lab/lab_results/lab_result_details.dart b/lib/presentation/lab/lab_results/lab_result_details.dart index cab20aed..d4eb214a 100644 --- a/lib/presentation/lab/lab_results/lab_result_details.dart +++ b/lib/presentation/lab/lab_results/lab_result_details.dart @@ -282,7 +282,7 @@ class LabResultDetails extends StatelessWidget { return SizedBox.shrink(); // } }, - graphColor: AppColors.blackColor, + graphColor: AppColors.textColor, graphShadowColor: Colors.transparent, graphGridColor: graphColor.withOpacity(.4), bottomLabelFormatter: (value, data) { @@ -327,7 +327,7 @@ class LabResultDetails extends StatelessWidget { ranges.add(HorizontalRangeAnnotation( y1: model.highRefrenceValue, y2: model.maxY, - color: AppColors.criticalLowAndHigh.withOpacity(0.05), + color: AppColors.primaryRedColor.withOpacity(0.05), )); return ranges; } diff --git a/lib/presentation/medical_file/eye_measurement_details_page.dart b/lib/presentation/medical_file/eye_measurement_details_page.dart index 08226095..422511aa 100644 --- a/lib/presentation/medical_file/eye_measurement_details_page.dart +++ b/lib/presentation/medical_file/eye_measurement_details_page.dart @@ -23,7 +23,7 @@ class EyeMeasurementDetailsPage extends StatelessWidget { Widget build(BuildContext context) { bookAppointmentsViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.eyeMeasurements.tr(), child: SingleChildScrollView( diff --git a/lib/presentation/medical_file/eye_measurements_appointments_page.dart b/lib/presentation/medical_file/eye_measurements_appointments_page.dart index d8438ba4..cc66c943 100644 --- a/lib/presentation/medical_file/eye_measurements_appointments_page.dart +++ b/lib/presentation/medical_file/eye_measurements_appointments_page.dart @@ -23,7 +23,7 @@ class EyeMeasurementsAppointmentsPage extends StatelessWidget { Widget build(BuildContext context) { bookAppointmentsViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: "Eye Measurements", child: SingleChildScrollView( diff --git a/lib/presentation/medical_file/medical_file_page.dart b/lib/presentation/medical_file/medical_file_page.dart index 1a68f224..200dd0c6 100644 --- a/lib/presentation/medical_file/medical_file_page.dart +++ b/lib/presentation/medical_file/medical_file_page.dart @@ -1065,7 +1065,7 @@ class _MedicalFilePageState extends State { children: [ MedicalFileCard( label: LocaleKeys.eyeMeasurements.tr(context: context), - textColor: AppColors.blackColor, + textColor: AppColors.textColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.eye_result_icon, isLargeText: true, @@ -1082,7 +1082,7 @@ class _MedicalFilePageState extends State { }), MedicalFileCard( label: "Allergy Information".needTranslation, - textColor: AppColors.blackColor, + textColor: AppColors.textColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.allergy_info_icon, isLargeText: true, @@ -1097,7 +1097,7 @@ class _MedicalFilePageState extends State { }), MedicalFileCard( label: "Vaccine Information".needTranslation, - textColor: AppColors.blackColor, + textColor: AppColors.textColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.vaccine_info_icon, isLargeText: true, @@ -1182,7 +1182,7 @@ class _MedicalFilePageState extends State { children: [ MedicalFileCard( label: LocaleKeys.updateInsuranceInfo.tr(context: context), - textColor: AppColors.blackColor, + textColor: AppColors.textColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.update_insurance_icon, isLargeText: true, @@ -1192,7 +1192,7 @@ class _MedicalFilePageState extends State { }), MedicalFileCard( label: "${LocaleKeys.insurance.tr(context: context)} ${LocaleKeys.approvals.tr(context: context)}", - textColor: AppColors.blackColor, + textColor: AppColors.textColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.insurance_approval_icon, isLargeText: true, @@ -1206,7 +1206,7 @@ class _MedicalFilePageState extends State { }), MedicalFileCard( label: LocaleKeys.myInvoicesList.tr(context: context), - textColor: AppColors.blackColor, + textColor: AppColors.textColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.invoices_list_icon, isLargeText: true, @@ -1220,7 +1220,7 @@ class _MedicalFilePageState extends State { }), MedicalFileCard( label: LocaleKeys.ancillaryOrdersList.tr(context: context), - textColor: AppColors.blackColor, + textColor: AppColors.textColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.ancillary_orders_list_icon, isLargeText: true, @@ -1282,7 +1282,7 @@ class _MedicalFilePageState extends State { children: [ MedicalFileCard( label: LocaleKeys.monthlyReports.tr(context: context), - textColor: AppColors.blackColor, + textColor: AppColors.textColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.monthly_reports_icon, isLargeText: true, @@ -1297,7 +1297,7 @@ class _MedicalFilePageState extends State { }), MedicalFileCard( label: LocaleKeys.medicalReports.tr(context: context), - textColor: AppColors.blackColor, + textColor: AppColors.textColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.medical_reports_icon, isLargeText: true, @@ -1313,7 +1313,7 @@ class _MedicalFilePageState extends State { }), MedicalFileCard( label: LocaleKeys.sickLeaveReport.tr(context: context), - textColor: AppColors.blackColor, + textColor: AppColors.textColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.sick_leave_report_icon, isLargeText: true, @@ -1354,7 +1354,7 @@ class _MedicalFilePageState extends State { children: [ MedicalFileCard( label: LocaleKeys.bloodSugar.tr(context: context), - textColor: AppColors.blackColor, + textColor: AppColors.textColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.blood_sugar_icon, isLargeText: true, @@ -1362,7 +1362,7 @@ class _MedicalFilePageState extends State { ).onPress(() => context.navigateWithName(AppRoutes.healthTrackerDetailPage, arguments: HealthTrackerTypeEnum.bloodSugar)), MedicalFileCard( label: LocaleKeys.bloodPressure.tr(context: context), - textColor: AppColors.blackColor, + textColor: AppColors.textColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.lab_result_icon, isLargeText: true, @@ -1370,7 +1370,7 @@ class _MedicalFilePageState extends State { ).onPress(() => context.navigateWithName(AppRoutes.healthTrackerDetailPage, arguments: HealthTrackerTypeEnum.bloodPressure)), MedicalFileCard( label: LocaleKeys.weightTracker.tr(context: context), - textColor: AppColors.blackColor, + textColor: AppColors.textColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.weight_tracker_icon, isLargeText: true, @@ -1398,7 +1398,7 @@ class _MedicalFilePageState extends State { children: [ MedicalFileCard( label: LocaleKeys.askYourDoctor.tr(context: context), - textColor: AppColors.blackColor, + textColor: AppColors.textColor, backgroundColor: AppColors.whiteColor, svgIcon: AppAssets.ask_doctor_medical_file_icon, isLargeText: true, @@ -1413,7 +1413,7 @@ class _MedicalFilePageState extends State { }), // MedicalFileCard( // label: LocaleKeys.internetPairing.tr(context: context), - // textColor: AppColors.blackColor, + // textColor: AppColors.textColor, // backgroundColor: AppColors.whiteColor, // svgIcon: AppAssets.internet_pairing_icon, // isLargeText: true, @@ -1637,7 +1637,7 @@ class _MedicalFilePageState extends State { Container( padding: EdgeInsets.symmetric(horizontal: 6.w, vertical: 6.h), decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.bgScaffoldColor, + color: AppColors.scaffoldBgColor, borderRadius: 10.r, hasShadow: false, ), @@ -1676,7 +1676,7 @@ class _MedicalFilePageState extends State { ] else AppCustomChipWidget( labelText: "", - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, textColor: null, ) ], diff --git a/lib/presentation/medical_file/patient_sickleaves_list_page.dart b/lib/presentation/medical_file/patient_sickleaves_list_page.dart index 93cf17ff..816c93d2 100644 --- a/lib/presentation/medical_file/patient_sickleaves_list_page.dart +++ b/lib/presentation/medical_file/patient_sickleaves_list_page.dart @@ -49,7 +49,7 @@ class _PatientSickleavesListPageState extends State { AppState appState = getIt.get(); medicalFileViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: "${LocaleKeys.sick.tr(context: context)} ${LocaleKeys.sickSubtitle.tr(context: context)}", child: SingleChildScrollView( @@ -66,9 +66,9 @@ class _PatientSickleavesListPageState extends State { onPressed: () { model.setIsSickLeavesSortByClinic(true); }, - backgroundColor: model.isSickLeavesSortByClinic ? AppColors.bgRedLightColor : AppColors.whiteColor, + backgroundColor: model.isSickLeavesSortByClinic ? AppColors.secondaryLightRedColor : AppColors.whiteColor, borderColor: model.isSickLeavesSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withValues(alpha: 0.2), - textColor: model.isSickLeavesSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor, + textColor: model.isSickLeavesSortByClinic ? AppColors.primaryRedColor : AppColors.textColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, @@ -81,9 +81,9 @@ class _PatientSickleavesListPageState extends State { onPressed: () { model.setIsSickLeavesSortByClinic(false); }, - backgroundColor: model.isSickLeavesSortByClinic ? AppColors.whiteColor : AppColors.bgRedLightColor, + backgroundColor: model.isSickLeavesSortByClinic ? AppColors.whiteColor : AppColors.secondaryLightRedColor, borderColor: model.isSickLeavesSortByClinic ? AppColors.textColor.withValues(alpha: 0.2) : AppColors.primaryRedColor, - textColor: model.isSickLeavesSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor, + textColor: model.isSickLeavesSortByClinic ? AppColors.textColor : AppColors.primaryRedColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, @@ -144,7 +144,7 @@ class _PatientSickleavesListPageState extends State { onPressed: () {}, backgroundColor: AppColors.greyColor, borderColor: AppColors.greyColor, - textColor: AppColors.blackColor, + textColor: AppColors.textColor, fontSize: 10, fontWeight: FontWeight.w500, borderRadius: 8, diff --git a/lib/presentation/medical_file/vaccine_list_page.dart b/lib/presentation/medical_file/vaccine_list_page.dart index bf02cb74..d146a842 100644 --- a/lib/presentation/medical_file/vaccine_list_page.dart +++ b/lib/presentation/medical_file/vaccine_list_page.dart @@ -40,7 +40,7 @@ class _VaccineListPageState extends State { Widget build(BuildContext context) { medicalFileViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.vaccineInfo.tr(context: context), child: SingleChildScrollView( diff --git a/lib/presentation/medical_file/widgets/medical_file_appointment_card.dart b/lib/presentation/medical_file/widgets/medical_file_appointment_card.dart index 73dd1652..f3b220c8 100644 --- a/lib/presentation/medical_file/widgets/medical_file_appointment_card.dart +++ b/lib/presentation/medical_file/widgets/medical_file_appointment_card.dart @@ -188,14 +188,14 @@ class MedicalFileAppointmentCard extends StatelessWidget { }, backgroundColor: AppColors.greyColor, borderColor: AppColors.greyColor, - textColor: AppColors.blackColor, + textColor: AppColors.textColor, fontSize: 14.f, fontWeight: FontWeight.w500, borderRadius: 12.r, padding: EdgeInsets.symmetric(horizontal: 10.w), height: 40.h, icon: AppAssets.rebook_appointment_icon, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, iconSize: 16.h, ); } diff --git a/lib/presentation/medical_report/medical_reports_page.dart b/lib/presentation/medical_report/medical_reports_page.dart index 02a9bdec..2e10e020 100644 --- a/lib/presentation/medical_report/medical_reports_page.dart +++ b/lib/presentation/medical_report/medical_reports_page.dart @@ -40,7 +40,7 @@ class _MedicalReportsPageState extends State { AppState appState = getIt.get(); medicalFileViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Column( children: [ Expanded( @@ -59,9 +59,9 @@ class _MedicalReportsPageState extends State { // onPressed: () { // medicalFileVM.setIsMedicalReportsSortByClinic(true); // }, - // backgroundColor: medicalFileVM.isMedicalReportsSortByClinic ? AppColors.bgRedLightColor : AppColors.whiteColor, + // backgroundColor: medicalFileVM.isMedicalReportsSortByClinic ? AppColors.secondaryLightRedColor : AppColors.whiteColor, // borderColor: medicalFileVM.isMedicalReportsSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withValues(alpha: 0.2), - // textColor: medicalFileVM.isMedicalReportsSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor, + // textColor: medicalFileVM.isMedicalReportsSortByClinic ? AppColors.primaryRedColor : AppColors.textColor, // fontSize: 12, // fontWeight: FontWeight.w500, // borderRadius: 10, @@ -74,9 +74,9 @@ class _MedicalReportsPageState extends State { // onPressed: () { // medicalFileVM.setIsMedicalReportsSortByClinic(false); // }, - // backgroundColor: medicalFileVM.isMedicalReportsSortByClinic ? AppColors.whiteColor : AppColors.bgRedLightColor, + // backgroundColor: medicalFileVM.isMedicalReportsSortByClinic ? AppColors.whiteColor : AppColors.secondaryLightRedColor, // borderColor: medicalFileVM.isMedicalReportsSortByClinic ? AppColors.textColor.withValues(alpha: 0.2) : AppColors.primaryRedColor, - // textColor: medicalFileVM.isMedicalReportsSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor, + // textColor: medicalFileVM.isMedicalReportsSortByClinic ? AppColors.textColor : AppColors.primaryRedColor, // fontSize: 12, // fontWeight: FontWeight.w500, // borderRadius: 10, @@ -96,9 +96,9 @@ class _MedicalReportsPageState extends State { }); medicalFileViewModel.onMedicalReportTabChange(0); }, - backgroundColor: medicalFileVM.selectedMedicalReportsTabIndex == 0 ? AppColors.bgRedLightColor : AppColors.whiteColor, + backgroundColor: medicalFileVM.selectedMedicalReportsTabIndex == 0 ? AppColors.secondaryLightRedColor : AppColors.whiteColor, borderColor: medicalFileVM.selectedMedicalReportsTabIndex == 0 ? AppColors.primaryRedColor : AppColors.textColor.withValues(alpha: 0.2), - textColor: medicalFileVM.selectedMedicalReportsTabIndex == 0 ? AppColors.primaryRedColor : AppColors.blackColor, + textColor: medicalFileVM.selectedMedicalReportsTabIndex == 0 ? AppColors.primaryRedColor : AppColors.textColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, @@ -114,9 +114,9 @@ class _MedicalReportsPageState extends State { }); medicalFileViewModel.onMedicalReportTabChange(1); }, - backgroundColor: medicalFileVM.selectedMedicalReportsTabIndex == 1 ? AppColors.bgRedLightColor : AppColors.whiteColor, + backgroundColor: medicalFileVM.selectedMedicalReportsTabIndex == 1 ? AppColors.secondaryLightRedColor : AppColors.whiteColor, borderColor: medicalFileVM.selectedMedicalReportsTabIndex == 1 ? AppColors.primaryRedColor : AppColors.textColor.withValues(alpha: 0.2), - textColor: medicalFileVM.selectedMedicalReportsTabIndex == 1 ? AppColors.primaryRedColor : AppColors.blackColor, + textColor: medicalFileVM.selectedMedicalReportsTabIndex == 1 ? AppColors.primaryRedColor : AppColors.textColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, @@ -132,9 +132,9 @@ class _MedicalReportsPageState extends State { }); medicalFileViewModel.onMedicalReportTabChange(2); }, - backgroundColor: medicalFileVM.selectedMedicalReportsTabIndex == 2 ? AppColors.bgRedLightColor : AppColors.whiteColor, + backgroundColor: medicalFileVM.selectedMedicalReportsTabIndex == 2 ? AppColors.secondaryLightRedColor : AppColors.whiteColor, borderColor: medicalFileVM.selectedMedicalReportsTabIndex == 2 ? AppColors.primaryRedColor : AppColors.textColor.withValues(alpha: 0.2), - textColor: medicalFileVM.selectedMedicalReportsTabIndex == 2 ? AppColors.primaryRedColor : AppColors.blackColor, + textColor: medicalFileVM.selectedMedicalReportsTabIndex == 2 ? AppColors.primaryRedColor : AppColors.textColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, @@ -198,7 +198,7 @@ class _MedicalReportsPageState extends State { onPressed: () {}, backgroundColor: AppColors.greyColor, borderColor: AppColors.greyColor, - textColor: AppColors.blackColor, + textColor: AppColors.textColor, fontSize: 10, fontWeight: FontWeight.w500, borderRadius: 8, diff --git a/lib/presentation/monthly_report/monthly_report.dart b/lib/presentation/monthly_report/monthly_report.dart index 43c7fc1d..5ea6c215 100644 --- a/lib/presentation/monthly_report/monthly_report.dart +++ b/lib/presentation/monthly_report/monthly_report.dart @@ -30,7 +30,7 @@ class MonthlyReport extends StatelessWidget { Widget build(BuildContext context) { appState = getIt.get(); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Consumer(builder: (context, monthlyReportVM, child) { return Column( children: [ diff --git a/lib/presentation/my_family/widget/family_cards.dart b/lib/presentation/my_family/widget/family_cards.dart index 826b1741..11f679cc 100644 --- a/lib/presentation/my_family/widget/family_cards.dart +++ b/lib/presentation/my_family/widget/family_cards.dart @@ -111,7 +111,7 @@ class _FamilyCardsState extends State { : profile.status == FamilyFileEnum.rejected.toInt ? AppColors.primaryRedColor : profile.status == FamilyFileEnum.active.toInt - ? AppColors.textGreenColor + ? AppColors.successColor : AppColors.alertColor), SizedBox(height: 8.h), Wrap( @@ -300,7 +300,7 @@ class _FamilyCardsState extends State { : profile.status == FamilyFileEnum.rejected.toInt ? AppColors.primaryRedColor : profile.status == FamilyFileEnum.active.toInt - ? AppColors.textGreenColor + ? AppColors.successColor : AppColors.alertColor, ), SizedBox(height: 8.h), @@ -346,7 +346,7 @@ class _FamilyCardsState extends State { }, backgroundColor: AppColors.lightGreenButtonColor, borderColor: AppColors.lightGreenButtonColor, - textColor: AppColors.textGreenColor, + textColor: AppColors.successColor, borderWidth: 0, icon: null, ), diff --git a/lib/presentation/my_invoices/my_invoices_details_page.dart b/lib/presentation/my_invoices/my_invoices_details_page.dart index a38194fe..4690b845 100644 --- a/lib/presentation/my_invoices/my_invoices_details_page.dart +++ b/lib/presentation/my_invoices/my_invoices_details_page.dart @@ -34,7 +34,7 @@ class _MyInvoicesDetailsPageState extends State { Widget build(BuildContext context) { myInvoicesViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Column( children: [ Expanded( @@ -229,7 +229,7 @@ class _MyInvoicesDetailsPageState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true), - Utils.getPaymentAmountWithSymbol(widget.getInvoiceDetailsResponseModel.listConsultation!.first.totalShare.toString().toText16(isBold: true), AppColors.blackColor, 13, + Utils.getPaymentAmountWithSymbol(widget.getInvoiceDetailsResponseModel.listConsultation!.first.totalShare.toString().toText16(isBold: true), AppColors.textColor, 13, isSaudiCurrency: true), ], ).paddingSymmetrical(24.h, 0.h), diff --git a/lib/presentation/prescriptions/prescription_delivery_order_summary_page.dart b/lib/presentation/prescriptions/prescription_delivery_order_summary_page.dart index d6a616ee..865b0de3 100644 --- a/lib/presentation/prescriptions/prescription_delivery_order_summary_page.dart +++ b/lib/presentation/prescriptions/prescription_delivery_order_summary_page.dart @@ -23,7 +23,7 @@ class PrescriptionDeliveryOrderSummaryPage extends StatelessWidget { Widget build(BuildContext context) { prescriptionsViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Column( children: [ Expanded( diff --git a/lib/presentation/prescriptions/prescription_delivery_orders_list_page.dart b/lib/presentation/prescriptions/prescription_delivery_orders_list_page.dart index 7760fd2d..42997a89 100644 --- a/lib/presentation/prescriptions/prescription_delivery_orders_list_page.dart +++ b/lib/presentation/prescriptions/prescription_delivery_orders_list_page.dart @@ -21,7 +21,7 @@ class PrescriptionDeliveryOrdersListPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.orders.tr(context: context), child: SingleChildScrollView( @@ -75,7 +75,7 @@ class PrescriptionDeliveryOrdersListPage extends StatelessWidget { spacing: 4.w, children: [ chip(Utils.getDayMonthYearDateFormatted(DateTime.tryParse(model.prescriptionsOrderList[index].created!)), AppAssets.calendar, - AppColors.blackBgColor), + AppColors.textColor), ], ), ], diff --git a/lib/presentation/prescriptions/prescription_detail_page.dart b/lib/presentation/prescriptions/prescription_detail_page.dart index 5bb9cbd7..ea70cc29 100644 --- a/lib/presentation/prescriptions/prescription_detail_page.dart +++ b/lib/presentation/prescriptions/prescription_detail_page.dart @@ -55,7 +55,7 @@ class _PrescriptionDetailPageState extends State { Widget build(BuildContext context) { prescriptionsViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Column( children: [ Expanded( diff --git a/lib/presentation/prescriptions/prescriptions_list_page.dart b/lib/presentation/prescriptions/prescriptions_list_page.dart index cd507d41..f67c1e1f 100644 --- a/lib/presentation/prescriptions/prescriptions_list_page.dart +++ b/lib/presentation/prescriptions/prescriptions_list_page.dart @@ -49,7 +49,7 @@ class _PrescriptionsListPageState extends State { AppState appState = getIt.get(); prescriptionsViewModel = Provider.of(context, listen: false); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.prescriptions.tr(context: context), requests: () { @@ -74,9 +74,9 @@ class _PrescriptionsListPageState extends State { onPressed: () { model.setIsSortByClinic(true); }, - backgroundColor: model.isSortByClinic ? AppColors.bgRedLightColor : AppColors.whiteColor, + backgroundColor: model.isSortByClinic ? AppColors.secondaryLightRedColor : AppColors.whiteColor, borderColor: model.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withOpacity(0.2), - textColor: model.isSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor, + textColor: model.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, @@ -89,9 +89,9 @@ class _PrescriptionsListPageState extends State { onPressed: () { model.setIsSortByClinic(false); }, - backgroundColor: model.isSortByClinic ? AppColors.whiteColor : AppColors.bgRedLightColor, + backgroundColor: model.isSortByClinic ? AppColors.whiteColor : AppColors.secondaryLightRedColor, borderColor: model.isSortByClinic ? AppColors.textColor.withOpacity(0.2) : AppColors.primaryRedColor, - textColor: model.isSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor, + textColor: model.isSortByClinic ? AppColors.textColor : AppColors.primaryRedColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, @@ -154,7 +154,7 @@ class _PrescriptionsListPageState extends State { onPressed: () {}, backgroundColor: AppColors.greyColor, borderColor: AppColors.greyColor, - textColor: AppColors.blackColor, + textColor: AppColors.textColor, fontSize: 10, fontWeight: FontWeight.w500, borderRadius: 8, diff --git a/lib/presentation/profile_settings/profile_settings.dart b/lib/presentation/profile_settings/profile_settings.dart index 82150ca7..37b82044 100644 --- a/lib/presentation/profile_settings/profile_settings.dart +++ b/lib/presentation/profile_settings/profile_settings.dart @@ -8,7 +8,6 @@ import 'package:hmg_patient_app_new/core/app_export.dart'; import 'package:hmg_patient_app_new/core/app_state.dart'; import 'package:hmg_patient_app_new/core/dependencies.dart'; import 'package:hmg_patient_app_new/core/enums.dart'; -import 'package:hmg_patient_app_new/core/utils/date_util.dart'; import 'package:hmg_patient_app_new/core/utils/utils.dart'; import 'package:hmg_patient_app_new/extensions/int_extensions.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; @@ -110,7 +109,7 @@ class ProfileSettingsState extends State { pagination: SwiperPagination( alignment: Alignment.bottomCenter, margin: EdgeInsets.only(top: (210.h + 8.h + 24.h)), - builder: DotSwiperPaginationBuilder(color: Color(0xffD9D9D9), activeColor: AppColors.blackBgColor), + builder: DotSwiperPaginationBuilder(color: Color(0xffD9D9D9), activeColor: context.textColor), ), itemBuilder: (BuildContext context, int index) { return FamilyCardWidget( @@ -140,7 +139,7 @@ class ProfileSettingsState extends State { Container( padding: EdgeInsets.all(16.w), decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, + color: context.cardBaseColor, borderRadius: 20.r, hasShadow: true, ), @@ -159,21 +158,26 @@ class ProfileSettingsState extends State { ), Spacer(), Consumer(builder: (context, habibWalletVM, child) { - return Utils.getPaymentAmountWithSymbol2(habibWalletVM.habibWalletAmount, isExpanded: false) - .toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.r, width: 80.w, height: 24.h); + return Utils.getPaymentAmountWithSymbol2( + habibWalletVM.habibWalletAmount, + isExpanded: false, + iconColor: context.iconColor, + textColor: context.textColor, + ).toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.r, width: 80.w, height: 24.h); }), Spacer(), CustomButton( + isIconOnEnd: true, height: 40.h, icon: AppAssets.recharge_icon, iconSize: 22.w, - iconColor: AppColors.infoColor, - textColor: AppColors.infoColor, + iconColor: AppColors.whiteColor, + textColor: AppColors.whiteColor, text: LocaleKeys.recharge.tr(context: context), borderWidth: 0.w, fontWeight: FontWeight.w500, borderColor: Colors.transparent, - backgroundColor: Color(0xff45A2F8).withValues(alpha: 0.08), + backgroundColor: AppColors.infoColor, padding: EdgeInsets.all(8.w), fontSize: 14.f, onPressed: () { @@ -187,30 +191,46 @@ class ProfileSettingsState extends State { ), ], ), - LocaleKeys.quickActions.tr(context: context).toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1).paddingOnly(left: 24.w, right: 24.w), + LocaleKeys.quickActions + .tr(context: context) + .toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1) + .paddingOnly(left: 24.w, right: 24.w), Container( margin: EdgeInsets.only(left: 24.w, right: 24.w, top: 16.h, bottom: 24.h), padding: EdgeInsets.only(top: 4.h, bottom: 4.h), - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r, hasShadow: true), + decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: context.cardBaseColor, borderRadius: 24.r, hasShadow: true), child: Column( children: [ actionItem(AppAssets.language_change, LocaleKeys.language.tr(context: context), () { - showCommonBottomSheetWithoutHeight(context, title: LocaleKeys.language.tr(context: context), child: AppLanguageChange(), callBackFunc: () {}, isFullScreen: false); + showCommonBottomSheetWithoutHeight(context, + title: LocaleKeys.language.tr(context: context), child: AppLanguageChange(), callBackFunc: () {}, isFullScreen: false); }, trailingLabel: Utils.appState.isArabic() ? "العربية" : "English"), 1.divider, actionItem(AppAssets.bell, LocaleKeys.notificationsSettings.tr(context: context), () { openAppSettings(); }), - // 1.divider, - // actionItem(AppAssets.touch_face_id, LocaleKeys.touchIDFaceIDServices.tr(context: context), () {}, switchValue: true), + 1.divider, + Consumer( + builder: (context, profileVm, _) { + return actionItem( + AppAssets.darkModeIcon, + "Dark Mode".needTranslation, + () => profileVm.toggleDarkMode(), + switchValue: profileVm.isDarkMode, + ); + }, + ), ], ), ), - LocaleKeys.personalInformation.tr(context: context).toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1).paddingOnly(left: 24.w, right: 24.w), + LocaleKeys.personalInformation + .tr(context: context) + .toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1) + .paddingOnly(left: 24.w, right: 24.w), Container( margin: EdgeInsets.only(left: 24.w, right: 24.w, top: 16.h, bottom: 24.h), padding: EdgeInsets.only(top: 4.h, bottom: 4.h), - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r, hasShadow: true), + decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: context.cardBaseColor, borderRadius: 24.r, hasShadow: true), child: Column( children: [ actionItem(AppAssets.email_transparent, LocaleKeys.updateEmailAddress.tr(context: context), () {}), @@ -223,11 +243,14 @@ class ProfileSettingsState extends State { ], ), ), - LocaleKeys.helpAndSupport.tr(context: context).toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1).paddingOnly(left: 24.w, right: 24.w), + LocaleKeys.helpAndSupport + .tr(context: context) + .toText18(weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1) + .paddingOnly(left: 24.w, right: 24.w), Container( margin: EdgeInsets.only(left: 24.w, right: 24.w, top: 16.h), padding: EdgeInsets.only(top: 4.h, bottom: 4.h), - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r, hasShadow: true), + decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: context.cardBaseColor, borderRadius: 24.r, hasShadow: true), child: Column( children: [ actionItem(AppAssets.call_fill, LocaleKeys.contactUs.tr(context: context), () { @@ -277,28 +300,34 @@ class ProfileSettingsState extends State { } Widget actionItem(String icon, String label, VoidCallback onPress, {String trailingLabel = "", bool? switchValue, bool isExternalLink = false}) { - return SizedBox( - height: 56.h, - child: Row( - spacing: 8.w, - children: [ - Utils.buildSvgWithAssets(icon: icon, iconColor: AppColors.greyTextColor), - label.toText14(weight: FontWeight.w500, textOverflow: TextOverflow.ellipsis, maxlines: 1).expanded, - if (trailingLabel.isNotEmpty) trailingLabel.toText14(color: AppColors.greyTextColor, weight: FontWeight.w500, textOverflow: TextOverflow.ellipsis, maxlines: 1), - switchValue != null - ? Switch( - value: switchValue, - onChanged: (value) {}, - activeThumbColor: AppColors.successColor, - activeTrackColor: AppColors.successColor.withValues(alpha: .15), - ) - : Transform.scale( - scaleX: Utils.appState.isArabic() ? -1 : 1, - child: Utils.buildSvgWithAssets(icon: isExternalLink ? AppAssets.externalLink : AppAssets.arrow_forward), - ) - ], - ).paddingOnly(left: 16.w, right: 16.w).onPress(onPress), - ); + return Builder(builder: (context) { + return SizedBox( + height: 56.h, + child: Row( + spacing: 8.w, + children: [ + Utils.buildSvgWithAssets(icon: icon, iconColor: context.greyTextColor), + label.toText14(weight: FontWeight.w500, textOverflow: TextOverflow.ellipsis, maxlines: 1).expanded, + if (trailingLabel.isNotEmpty) + trailingLabel.toText14(color: context.textColor, weight: FontWeight.w500, textOverflow: TextOverflow.ellipsis, maxlines: 1), + switchValue != null + ? Switch( + value: switchValue, + onChanged: (_) => onPress(), + activeThumbColor: AppColors.successColor, + activeTrackColor: AppColors.successColor.withValues(alpha: .15), + ) + : Transform.scale( + scaleX: Utils.appState.isArabic() ? -1 : 1, + child: Utils.buildSvgWithAssets( + icon: isExternalLink ? AppAssets.externalLink : AppAssets.arrow_forward, + iconColor: context.iconColor, + ), + ) + ], + ).paddingOnly(left: 16.w, right: 16.w).onPress(onPress), + ); + }); } } @@ -322,7 +351,7 @@ class FamilyCardWidget extends StatelessWidget { // final canSwitch = isParentUser || (!isParentUser && profile.responseId == appState.getSuperUserID); return Container( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.whiteColor, + color: context.cardBaseColor, borderRadius: 24.r, hasShadow: true, ), @@ -341,6 +370,7 @@ class FamilyCardWidget extends StatelessWidget { mainAxisSize: MainAxisSize.min, children: [ "${profile.patientName}".toText18(isBold: true, weight: FontWeight.w600, textOverflow: TextOverflow.ellipsis, maxlines: 1), + SizedBox(height: 5.h), AppCustomChipWidget( icon: AppAssets.file_icon, labelText: "${LocaleKeys.fileNo.tr(context: context)}: ${profile.responseId}", @@ -349,7 +379,8 @@ class FamilyCardWidget extends StatelessWidget { ], ).expanded, // Icon(Icons.qr_code, size: 56.h) - Image.network("https://api.qrserver.com/v1/create-qr-code/?size=250x250&data=${profile.responseId.toString()}", fit: BoxFit.contain, height: 56.h, width: 56.w) + Image.network("https://api.qrserver.com/v1/create-qr-code/?size=250x250&data=${profile.responseId.toString()}", + fit: BoxFit.contain, height: 56.h, width: 56.w) ], ), SizedBox(height: 4.h), @@ -360,7 +391,8 @@ class FamilyCardWidget extends StatelessWidget { runSpacing: 4.h, children: [ AppCustomChipWidget( - labelText: LocaleKeys.ageYearsOld.tr(namedArgs: {'age': profile.age.toString(), 'yearsOld': LocaleKeys.yearsOld.tr(context: context)}), + labelText: + LocaleKeys.ageYearsOld.tr(namedArgs: {'age': profile.age.toString(), 'yearsOld': LocaleKeys.yearsOld.tr(context: context)}), ), isActive && appState.getAuthenticatedUser()!.bloodGroup != null ? AppCustomChipWidget( @@ -417,10 +449,10 @@ class FamilyCardWidget extends StatelessWidget { } }, backgroundColor: insuranceVM.isInsuranceExpired - ? AppColors.primaryRedColor.withOpacity(0.1) + ? AppColors.primaryRedColor.withValues(alpha: 0.1) : insuranceVM.isInsuranceActive - ? AppColors.successColor.withOpacity(0.1) - : AppColors.warningColorYellow.withOpacity(0.1), + ? AppColors.successColor.withValues(alpha: 0.1) + : AppColors.warningColorYellow.withValues(alpha: 0.1), labelPadding: EdgeInsetsDirectional.only(start: -4.w, end: insuranceVM.isInsuranceActive ? 6.w : 0.w), ).toShimmer2(isShow: insuranceVM.isInsuranceLoading); }), @@ -450,34 +482,36 @@ class FamilyCardWidget extends StatelessWidget { Widget _buildParentUserButton(int? currentUserId) { final canSwitch = profile.responseId != currentUserId; - - return CustomButton( - icon: canSwitch ? AppAssets.switch_user : AppAssets.add_family, - text: canSwitch ? LocaleKeys.switchAccount.tr() : LocaleKeys.addANewFamilyMember.tr(), - onPressed: canSwitch ? () => onFamilySwitchPress(profile) : onAddFamilyMemberPress, - backgroundColor: canSwitch ? AppColors.secondaryLightRedColor : AppColors.primaryRedColor, - borderColor: canSwitch ? AppColors.secondaryLightRedColor : AppColors.primaryRedColor, - textColor: canSwitch ? AppColors.primaryRedColor : AppColors.whiteColor, - iconColor: canSwitch ? AppColors.primaryRedColor : AppColors.whiteColor, - height: isFoldable ? 50.h : 45.h, - fontSize: 14.f, - ).paddingOnly(top: 12.h, right: 16.w, left: 16.w, bottom: 16.h); + return Builder(builder: (context) { + return CustomButton( + icon: canSwitch ? AppAssets.switch_user : AppAssets.add_family, + text: canSwitch ? LocaleKeys.switchAccount.tr() : LocaleKeys.addANewFamilyMember.tr(), + onPressed: canSwitch ? () => onFamilySwitchPress(profile) : onAddFamilyMemberPress, + backgroundColor: canSwitch ? context.secondaryLightRedColor : context.primaryRedColor, + borderColor: canSwitch ? context.secondaryLightRedColor : context.primaryRedColor, + textColor: canSwitch ? AppColors.primaryRedColor : AppColors.whiteColor, + iconColor: canSwitch ? AppColors.primaryRedColor : AppColors.whiteColor, + height: isFoldable ? 50.h : 45.h, + fontSize: 14.f, + ).paddingOnly(top: 12.h, right: 16.w, left: 16.w, bottom: 16.h); + }); } Widget _buildNonParentUserButton(int? superUserId) { final canSwitchBack = superUserId != null && superUserId == profile.responseId; - - return CustomButton( - icon: AppAssets.switch_user, - text: canSwitchBack ? LocaleKeys.switchBackFamilyFile.tr() : LocaleKeys.switchAccount.tr(), - backgroundColor: canSwitchBack ? AppColors.primaryRedColor : Colors.grey.shade200, - borderColor: canSwitchBack ? AppColors.primaryRedColor : Colors.grey.shade200, - textColor: canSwitchBack ? AppColors.whiteColor : AppColors.greyTextColor, - iconColor: canSwitchBack ? AppColors.whiteColor : AppColors.greyTextColor, - onPressed: canSwitchBack ? () => onFamilySwitchPress(profile) : () {}, - height: isFoldable ? 50.h : 40.h, - fontSize: 14.f, - ).paddingOnly(top: 12.h, right: 16.w, left: 16.w, bottom: 16.h); + return Builder(builder: (context) { + return CustomButton( + icon: AppAssets.switch_user, + text: canSwitchBack ? LocaleKeys.switchBackFamilyFile.tr() : LocaleKeys.switchAccount.tr(), + backgroundColor: canSwitchBack ? AppColors.primaryRedColor : context.greyColor, + borderColor: canSwitchBack ? AppColors.primaryRedColor : context.greyColor, + textColor: canSwitchBack ? context.cardBaseColor : context.greyTextColor, + iconColor: canSwitchBack ? context.cardBaseColor : context.greyTextColor, + onPressed: canSwitchBack ? () => onFamilySwitchPress(profile) : () {}, + height: isFoldable ? 50.h : 40.h, + fontSize: 14.f, + ).paddingOnly(top: 12.h, right: 16.w, left: 16.w, bottom: 16.h); + }); } // //TODO: Add family file switch logic here diff --git a/lib/presentation/radiology/radiology_orders_page.dart b/lib/presentation/radiology/radiology_orders_page.dart index a07face1..a879d11c 100644 --- a/lib/presentation/radiology/radiology_orders_page.dart +++ b/lib/presentation/radiology/radiology_orders_page.dart @@ -59,7 +59,7 @@ class _RadiologyOrdersPageState extends State { Widget build(BuildContext context) { radiologyViewModel = Provider.of(context); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.radiology.tr(context: context), search: () async { @@ -101,9 +101,9 @@ class _RadiologyOrdersPageState extends State { onPressed: () { model.setIsSortByClinic(true); }, - backgroundColor: model.isSortByClinic ? AppColors.bgRedLightColor : AppColors.whiteColor, + backgroundColor: model.isSortByClinic ? AppColors.secondaryLightRedColor : AppColors.whiteColor, borderColor: model.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withValues(alpha: 0.2), - textColor: model.isSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor, + textColor: model.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, @@ -116,9 +116,9 @@ class _RadiologyOrdersPageState extends State { onPressed: () { model.setIsSortByClinic(false); }, - backgroundColor: model.isSortByClinic ? AppColors.whiteColor : AppColors.bgRedLightColor, + backgroundColor: model.isSortByClinic ? AppColors.whiteColor : AppColors.secondaryLightRedColor, borderColor: model.isSortByClinic ? AppColors.textColor.withValues(alpha: 0.2) : AppColors.primaryRedColor, - textColor: model.isSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor, + textColor: model.isSortByClinic ? AppColors.textColor : AppColors.primaryRedColor, fontSize: 12, fontWeight: FontWeight.w500, borderRadius: 10, diff --git a/lib/presentation/radiology/radiology_result_page.dart b/lib/presentation/radiology/radiology_result_page.dart index 2328d0ea..9de68b93 100644 --- a/lib/presentation/radiology/radiology_result_page.dart +++ b/lib/presentation/radiology/radiology_result_page.dart @@ -46,7 +46,7 @@ class _RadiologyResultPageState extends State { radiologyViewModel = Provider.of(context); AppState _appState = getIt.get(); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Column( children: [ Expanded( diff --git a/lib/presentation/rate_appointment/rate_appointment_clinic.dart b/lib/presentation/rate_appointment/rate_appointment_clinic.dart index e7e29f67..faa7a366 100644 --- a/lib/presentation/rate_appointment/rate_appointment_clinic.dart +++ b/lib/presentation/rate_appointment/rate_appointment_clinic.dart @@ -189,7 +189,7 @@ class _RateAppointmentClinicState extends State { case 4: return ColorFilter.mode(Colors.greenAccent, BlendMode.srcIn); case 3: - return ColorFilter.mode(AppColors.warningLightColor, BlendMode.srcIn); + return ColorFilter.mode(AppColors.warningColor, BlendMode.srcIn); case 2: return ColorFilter.mode(Colors.orange, BlendMode.srcIn); case 1: diff --git a/lib/presentation/servicesPriceList/services_price_list_page.dart b/lib/presentation/servicesPriceList/services_price_list_page.dart index 0ee81ae3..609fd5b0 100644 --- a/lib/presentation/servicesPriceList/services_price_list_page.dart +++ b/lib/presentation/servicesPriceList/services_price_list_page.dart @@ -40,7 +40,7 @@ class _ServicesPriceListPageState extends State { appState = getIt.get(); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.servicePriceList.tr(context: context), child: SingleChildScrollView( @@ -124,7 +124,7 @@ class _ServicesPriceListPageState extends State { ), ), SizedBox(width: 12.w), - Utils.getPaymentAmountWithSymbol('${service.price ?? 0}'.toText16(isBold: true), AppColors.blackColor, 13, isSaudiCurrency: true), + Utils.getPaymentAmountWithSymbol('${service.price ?? 0}'.toText16(isBold: true), AppColors.textColor, 13, isSaudiCurrency: true), ], ), ], diff --git a/lib/presentation/smartwatches/health_dashboard/health_dashboard.dart b/lib/presentation/smartwatches/health_dashboard/health_dashboard.dart index f30d87a9..b3329b13 100644 --- a/lib/presentation/smartwatches/health_dashboard/health_dashboard.dart +++ b/lib/presentation/smartwatches/health_dashboard/health_dashboard.dart @@ -48,7 +48,7 @@ class _HealthDashboardState extends State with SingleTickerProv @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Consumer( builder: (context, healthProvider, child) { return SingleChildScrollView( diff --git a/lib/presentation/smartwatches/smartwatch_home_page.dart b/lib/presentation/smartwatches/smartwatch_home_page.dart index 8fd79098..620552f3 100644 --- a/lib/presentation/smartwatches/smartwatch_home_page.dart +++ b/lib/presentation/smartwatches/smartwatch_home_page.dart @@ -21,7 +21,7 @@ class SmartwatchHomePage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.smartWatches.tr(), bottomChild: Container( diff --git a/lib/presentation/smartwatches/smartwatch_instructions_page.dart b/lib/presentation/smartwatches/smartwatch_instructions_page.dart index 48683d50..dc7fa1fd 100644 --- a/lib/presentation/smartwatches/smartwatch_instructions_page.dart +++ b/lib/presentation/smartwatches/smartwatch_instructions_page.dart @@ -14,7 +14,7 @@ class SmartwatchInstructionsPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: "How does it work".needTranslation, bottomChild: Container( diff --git a/lib/presentation/smartwatches/widgets/health_metric_card.dart b/lib/presentation/smartwatches/widgets/health_metric_card.dart index 023f41b7..3b3f9e5f 100644 --- a/lib/presentation/smartwatches/widgets/health_metric_card.dart +++ b/lib/presentation/smartwatches/widgets/health_metric_card.dart @@ -78,7 +78,7 @@ class HealthMetricCard extends StatelessWidget { child: Text( isHealthy ? "Healthy".needTranslation : 'Warning'.needTranslation, style: TextStyle( - color: isHealthy ? Colors.green[700] : AppColors.blackColor, + color: isHealthy ? Colors.green[700] : AppColors.textColor, fontWeight: FontWeight.bold, ), ), diff --git a/lib/presentation/symptoms_checker/organ_selector_screen.dart b/lib/presentation/symptoms_checker/organ_selector_screen.dart index 253fccdc..216a5415 100644 --- a/lib/presentation/symptoms_checker/organ_selector_screen.dart +++ b/lib/presentation/symptoms_checker/organ_selector_screen.dart @@ -66,7 +66,7 @@ class _OrganSelectorPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, appBar: _buildAppBar(), body: Consumer( builder: (context, viewModel, _) { @@ -93,7 +93,7 @@ class _OrganSelectorPageState extends State { PreferredSizeWidget _buildAppBar() { return AppBar( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, elevation: 0, leading: Transform.flip( flipX: _appState.isArabic(), diff --git a/lib/presentation/symptoms_checker/possible_conditions_screen.dart b/lib/presentation/symptoms_checker/possible_conditions_screen.dart index 80c70714..70db394f 100644 --- a/lib/presentation/symptoms_checker/possible_conditions_screen.dart +++ b/lib/presentation/symptoms_checker/possible_conditions_screen.dart @@ -141,7 +141,7 @@ class PossibleConditionsPage extends StatelessWidget { case PossibleConditionsSeverityEnum.monitorOnly: title = LocaleKeys.monitor.tr(context: context); description = LocaleKeys.monitorDescription.tr(context: context); - dotColor = AppColors.chipColorMonitor; + dotColor = AppColors.successColor; break; case PossibleConditionsSeverityEnum.seekMedicalAdvice: title = LocaleKeys.seekMedicalAdvice.tr(context: context); @@ -151,7 +151,7 @@ class PossibleConditionsPage extends StatelessWidget { case PossibleConditionsSeverityEnum.emergency: title = LocaleKeys.emergency.tr(context: context); description = LocaleKeys.emergencyDescription.tr(context: context); - dotColor = AppColors.chipColorEmergency; + dotColor = AppColors.primaryRedColor; break; } @@ -222,7 +222,7 @@ class PossibleConditionsPage extends StatelessWidget { bookAppointmentsViewModel = context.read(); regionalViewModel = context.read(); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.possibleConditions.tr(context: context), leadingCallback: () => _buildConfirmationBottomSheet( diff --git a/lib/presentation/symptoms_checker/risk_factors_screen.dart b/lib/presentation/symptoms_checker/risk_factors_screen.dart index 484ad2d7..85def213 100644 --- a/lib/presentation/symptoms_checker/risk_factors_screen.dart +++ b/lib/presentation/symptoms_checker/risk_factors_screen.dart @@ -216,7 +216,7 @@ class _RiskFactorsScreenState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Consumer( builder: (context, viewModel, _) { return Column( diff --git a/lib/presentation/symptoms_checker/suggestions_screen.dart b/lib/presentation/symptoms_checker/suggestions_screen.dart index 8d32b7f4..b7b037c4 100644 --- a/lib/presentation/symptoms_checker/suggestions_screen.dart +++ b/lib/presentation/symptoms_checker/suggestions_screen.dart @@ -192,7 +192,7 @@ class _SuggestionsScreenState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Consumer( builder: (context, viewModel, _) { return Column( diff --git a/lib/presentation/symptoms_checker/symptoms_selector_screen.dart b/lib/presentation/symptoms_checker/symptoms_selector_screen.dart index cbbfc68e..10716241 100644 --- a/lib/presentation/symptoms_checker/symptoms_selector_screen.dart +++ b/lib/presentation/symptoms_checker/symptoms_selector_screen.dart @@ -75,7 +75,7 @@ class _SymptomsSelectorPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Consumer( builder: (context, viewModel, _) { return Column( @@ -180,8 +180,8 @@ class _SymptomsSelectorPageState extends State { child: CustomSelectableChip( label: symptomLabel, selected: isSelected, - activeColor: AppColors.primaryRedBorderColor, - activeTextColor: AppColors.primaryRedBorderColor, + activeColor: AppColors.primaryRedColor, + activeTextColor: AppColors.primaryRedColor, inactiveBorderColor: AppColors.bottomNAVBorder, inactiveTextColor: AppColors.textColor, ), diff --git a/lib/presentation/symptoms_checker/triage_screen.dart b/lib/presentation/symptoms_checker/triage_screen.dart index 0231ef19..be493b9a 100644 --- a/lib/presentation/symptoms_checker/triage_screen.dart +++ b/lib/presentation/symptoms_checker/triage_screen.dart @@ -219,7 +219,7 @@ class _TriagePageState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Consumer( builder: (context, viewModel, child) { // Show normal question UI diff --git a/lib/presentation/symptoms_checker/user_info_selection.dart b/lib/presentation/symptoms_checker/user_info_selection.dart index f1e8413d..84b3b031 100644 --- a/lib/presentation/symptoms_checker/user_info_selection.dart +++ b/lib/presentation/symptoms_checker/user_info_selection.dart @@ -92,31 +92,28 @@ class _UserInfoSelectionPageState extends State { width: 40.h, margin: EdgeInsetsDirectional.only(end: 10.h), padding: EdgeInsets.all(8.h), - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(borderRadius: 12.r, color: AppColors.greyColor), + decoration: RoundedRectangleBorder().toSmoothCornerDecoration(borderRadius: 12.r, color: context.greyColor, context: context), child: Utils.buildSvgWithAssets(icon: leadingIcon, iconColor: iconColor), ), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ title.toText14(weight: FontWeight.w500), - subTitle - .toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500) - .toShimmer2(isShow: (leadingIcon == AppAssets.rulerIcon || leadingIcon == AppAssets.weightScale) && hmgServicesVM.isVitalSignLoading), + subTitle.toText12(color: context.primaryRedColor, fontWeight: FontWeight.w500).toShimmer2( + isShow: (leadingIcon == AppAssets.rulerIcon || leadingIcon == AppAssets.weightScale) && hmgServicesVM.isVitalSignLoading), ], ), ], ), ), - Utils.buildSvgWithAssets(icon: trailingIcon, height: 24.h, width: 24.h), + Utils.buildSvgWithAssets(icon: trailingIcon, height: 24.h, width: 24.h, iconColor: context.greyTextColor), ], ), ); } Widget _getDivider() { - return Divider( - color: AppColors.dividerColor, - ).paddingSymmetrical(0, 8.h); + return Divider(color: context.dividerColor).paddingSymmetrical(0, 8.h); } /// Convert internal gender key to localized display string @@ -163,11 +160,14 @@ class _UserInfoSelectionPageState extends State { } return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: context.scaffoldBgColor, body: Consumer2( builder: (context, viewModel, hmgServicesVM, child) { // Check if any field is empty - bool hasEmptyFields = viewModel.selectedGender == null || viewModel.selectedAge == null || viewModel.selectedHeight == null || viewModel.selectedWeight == null; + bool hasEmptyFields = viewModel.selectedGender == null || + viewModel.selectedAge == null || + viewModel.selectedHeight == null || + viewModel.selectedWeight == null; // Get display values String genderText = _getLocalizedGender(viewModel.selectedGender, context); @@ -175,9 +175,13 @@ class _UserInfoSelectionPageState extends State { int? displayAge = viewModel.selectedAge ?? userAgeFromDOB; String ageText = displayAge != null ? "$displayAge ${LocaleKeys.years.tr(context: context)}" : LocaleKeys.notSet.tr(context: context); - String heightText = viewModel.selectedHeight != null ? "${viewModel.selectedHeight!.round()} ${viewModel.isHeightCm ? 'cm' : 'ft'}" : LocaleKeys.notSet.tr(context: context); + String heightText = viewModel.selectedHeight != null + ? "${viewModel.selectedHeight!.round()} ${viewModel.isHeightCm ? 'cm' : 'ft'}" + : LocaleKeys.notSet.tr(context: context); - String weightText = viewModel.selectedWeight != null ? "${viewModel.selectedWeight!.round()} ${viewModel.isWeightKg ? 'kg' : 'lbs'}" : LocaleKeys.notSet.tr(context: context); + String weightText = viewModel.selectedWeight != null + ? "${viewModel.selectedWeight!.round()} ${viewModel.isWeightKg ? 'kg' : 'lbs'}" + : LocaleKeys.notSet.tr(context: context); return Column( children: [ @@ -190,13 +194,14 @@ class _UserInfoSelectionPageState extends State { children: [ Container( width: double.infinity, - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r), + decoration: + RoundedRectangleBorder().toSmoothCornerDecoration(color: context.cardBaseColor, borderRadius: 24.r, context: context), padding: EdgeInsets.symmetric(vertical: 24.h, horizontal: 16.w), child: Column( children: [ LocaleKeys.helloIsYourInformationUpToDate.tr(namedArgs: {'name': name}).toText16( weight: FontWeight.w600, - color: AppColors.textColor, + color: context.textColor, ), SizedBox(height: 32.h), _buildEditInfoTile( @@ -212,17 +217,18 @@ class _UserInfoSelectionPageState extends State { hmgServicesVM: hmgServicesVM), _getDivider(), _buildEditInfoTile( - context: context, - leadingIcon: AppAssets.calendarGrey, - title: LocaleKeys.age.tr(context: context), - subTitle: ageText, - iconColor: AppColors.greyTextColor, - onTap: () { - viewModel.setUserInfoPage(1, isSinglePageEdit: true); - context.navigateWithName(AppRoutes.userInfoFlowManager); - }, - trailingIcon: AppAssets.edit_icon, - hmgServicesVM: hmgServicesVM), + context: context, + leadingIcon: AppAssets.calendarGrey, + title: LocaleKeys.age.tr(context: context), + subTitle: ageText, + iconColor: context.greyTextColor, + onTap: () { + viewModel.setUserInfoPage(1, isSinglePageEdit: true); + context.navigateWithName(AppRoutes.userInfoFlowManager); + }, + trailingIcon: AppAssets.edit_icon, + hmgServicesVM: hmgServicesVM, + ), _getDivider(), _buildEditInfoTile( context: context, @@ -265,7 +271,7 @@ class _UserInfoSelectionPageState extends State { Widget _buildBottomCard(BuildContext context, bool hasEmptyFields) { return Container( - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r), + decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: context.cardBaseColor, borderRadius: 24.r, context: context), child: SafeArea( top: false, child: Column( @@ -278,14 +284,14 @@ class _UserInfoSelectionPageState extends State { child: CustomButton( text: LocaleKeys.noEditAll.tr(context: context), icon: AppAssets.edit_icon, - iconColor: AppColors.primaryRedColor, + iconColor: context.secondaryLightRedForegroundColor, onPressed: () { context.read().setUserInfoPage(0, isSinglePageEdit: false); context.navigateWithName(AppRoutes.userInfoFlowManager); }, - backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.11), + backgroundColor: context.secondaryLightRedColor, borderColor: Colors.transparent, - textColor: AppColors.primaryRedColor, + textColor: context.secondaryLightRedForegroundColor, fontSize: 16.f, iconSize: 20.w, ), @@ -297,11 +303,9 @@ class _UserInfoSelectionPageState extends State { icon: AppAssets.tickIcon, iconColor: hasEmptyFields ? AppColors.greyTextColor : AppColors.whiteColor, isDisabled: getIt.get().isVitalSignLoading || hasEmptyFields, - onPressed: hasEmptyFields - ? () {} // Empty function for disabled state - : () => context.navigateWithName(AppRoutes.organSelectorPage), - backgroundColor: hasEmptyFields ? AppColors.greyLightColor : AppColors.primaryRedColor, - borderColor: hasEmptyFields ? AppColors.greyLightColor : AppColors.primaryRedColor, + onPressed: hasEmptyFields ? () {} : () => context.navigateWithName(AppRoutes.organSelectorPage), + backgroundColor: hasEmptyFields ? context.greyColor : context.primaryRedColor, + borderColor: hasEmptyFields ? context.greyColor : context.primaryRedColor, textColor: hasEmptyFields ? AppColors.greyTextColor : AppColors.whiteColor, fontSize: 16.f, iconSize: 20.w, diff --git a/lib/presentation/symptoms_checker/user_info_selection/user_info_flow_manager.dart b/lib/presentation/symptoms_checker/user_info_selection/user_info_flow_manager.dart index fdfe2288..161fba4c 100644 --- a/lib/presentation/symptoms_checker/user_info_selection/user_info_flow_manager.dart +++ b/lib/presentation/symptoms_checker/user_info_selection/user_info_flow_manager.dart @@ -234,7 +234,7 @@ class _UserInfoFlowManagerState extends State { final pageTitles = _getPageTitles(context); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Column( children: [ Expanded( diff --git a/lib/presentation/symptoms_checker/widgets/condition_card.dart b/lib/presentation/symptoms_checker/widgets/condition_card.dart index e48f41ea..72e564cd 100644 --- a/lib/presentation/symptoms_checker/widgets/condition_card.dart +++ b/lib/presentation/symptoms_checker/widgets/condition_card.dart @@ -145,9 +145,9 @@ class ConditionCard extends StatelessWidget { case PossibleConditionsSeverityEnum.seekMedicalAdvice: return AppColors.chipColorSeekMedicalAdvice; case PossibleConditionsSeverityEnum.monitorOnly: - return AppColors.chipColorMonitor; + return AppColors.successColor; case PossibleConditionsSeverityEnum.emergency: - return AppColors.chipColorEmergency; + return AppColors.primaryRedColor; } } @@ -156,9 +156,9 @@ class ConditionCard extends StatelessWidget { case PossibleConditionsSeverityEnum.seekMedicalAdvice: return AppColors.chipTextColorSeekMedicalAdvice; case PossibleConditionsSeverityEnum.monitorOnly: - return AppColors.chipColorMonitor; + return AppColors.successColor; case PossibleConditionsSeverityEnum.emergency: - return AppColors.chipColorEmergency; + return AppColors.primaryRedColor; } } diff --git a/lib/presentation/symptoms_checker/widgets/organ_dot_widget.dart b/lib/presentation/symptoms_checker/widgets/organ_dot_widget.dart index 0783dfb7..772649b0 100644 --- a/lib/presentation/symptoms_checker/widgets/organ_dot_widget.dart +++ b/lib/presentation/symptoms_checker/widgets/organ_dot_widget.dart @@ -20,7 +20,7 @@ class OrganDot extends StatelessWidget { height: size.h, decoration: BoxDecoration( shape: BoxShape.circle, - color: isSelected ? AppColors.whiteColor : AppColors.blackColor.withValues(alpha: 0.6), + color: isSelected ? AppColors.whiteColor : AppColors.textColor.withValues(alpha: 0.6), ), child: Padding( padding: EdgeInsets.all(isSelected ? 2.w : 3.w), diff --git a/lib/presentation/symptoms_checker/widgets/selected_organs_section.dart b/lib/presentation/symptoms_checker/widgets/selected_organs_section.dart index b66ef037..f6a8299d 100644 --- a/lib/presentation/symptoms_checker/widgets/selected_organs_section.dart +++ b/lib/presentation/symptoms_checker/widgets/selected_organs_section.dart @@ -34,7 +34,7 @@ class _SelectedOrgansSectionState extends State { borderRadius: BorderRadius.circular(12.r), boxShadow: [ BoxShadow( - color: AppColors.blackColor.withValues(alpha: 0.05), + color: AppColors.textColor.withValues(alpha: 0.05), blurRadius: 10, offset: const Offset(0, -2), ), diff --git a/lib/presentation/todo_section/ancillary_order_payment_page.dart b/lib/presentation/todo_section/ancillary_order_payment_page.dart index b34bf212..1448af0f 100644 --- a/lib/presentation/todo_section/ancillary_order_payment_page.dart +++ b/lib/presentation/todo_section/ancillary_order_payment_page.dart @@ -76,7 +76,7 @@ class _AncillaryOrderPaymentPageState extends State { payfortViewModel = Provider.of(context); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Consumer( builder: (context, todoVM, child) { return Column( @@ -114,7 +114,7 @@ class _AncillaryOrderPaymentPageState extends State { flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 18.h, height: 13.h, fit: BoxFit.contain, @@ -161,7 +161,7 @@ class _AncillaryOrderPaymentPageState extends State { flipX: appState.isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: AppColors.blackColor, + iconColor: AppColors.textColor, width: 18.h, height: 13.h, fit: BoxFit.contain, @@ -220,7 +220,7 @@ class _AncillaryOrderPaymentPageState extends State { LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true), Utils.getPaymentAmountWithSymbol( amountBeforeTax.toStringAsFixed(2).toText16(isBold: true), - AppColors.blackColor, + AppColors.textColor, 13, isSaudiCurrency: true, ), @@ -250,7 +250,7 @@ class _AncillaryOrderPaymentPageState extends State { "".toText14(isBold: true), Utils.getPaymentAmountWithSymbol( widget.totalAmount.toStringAsFixed(2).toText24(isBold: true), - AppColors.blackColor, + AppColors.textColor, 17, isSaudiCurrency: true, ), diff --git a/lib/presentation/todo_section/ancillary_procedures_details_page.dart b/lib/presentation/todo_section/ancillary_procedures_details_page.dart index eba80cd4..94489086 100644 --- a/lib/presentation/todo_section/ancillary_procedures_details_page.dart +++ b/lib/presentation/todo_section/ancillary_procedures_details_page.dart @@ -125,7 +125,7 @@ class _AncillaryOrderDetailsListState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: Consumer(builder: (context, viewModel, child) { AncillaryOrderProcedureItem? orderData; if (viewModel.patientAncillaryOrderProceduresList.isNotEmpty) { @@ -329,7 +329,7 @@ class _AncillaryOrderDetailsListState extends State { // Container( // padding: EdgeInsets.all(12.h), // decoration: BoxDecoration( - // color: AppColors.bgScaffoldColor, + // color: AppColors.scaffoldBgColor, // borderRadius: BorderRadius.circular(12.r), // ), // child: Column( @@ -646,7 +646,7 @@ class _AncillaryOrderDetailsListState extends State { Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Utils.getPaymentAmountWithSymbol(_getTotalAmount().toStringAsFixed(2).toText24(isBold: true), AppColors.blackColor, 17, isSaudiCurrency: true), + Utils.getPaymentAmountWithSymbol(_getTotalAmount().toStringAsFixed(2).toText24(isBold: true), AppColors.textColor, 17, isSaudiCurrency: true), ], ), ], @@ -654,7 +654,7 @@ class _AncillaryOrderDetailsListState extends State { SizedBox(height: 16.h), CustomButton( borderWidth: 0, - backgroundColor: AppColors.infoLightColor, + backgroundColor: AppColors.infoColor, text: LocaleKeys.proceedToPayment.tr(context: context), onPressed: () { // Navigate to payment page with selected procedures @@ -691,7 +691,7 @@ class _AncillaryOrderDetailsListState extends State { // SizedBox(height: 16.h), // CustomButton( // borderWidth: 0, - // backgroundColor: AppColors.infoLightColor, + // backgroundColor: AppColors.infoColor, // text: "Proceed to Payment".needTranslation, // onPressed: () { // // Navigate to payment page with selected procedures diff --git a/lib/presentation/vital_sign/vital_sign_details_page.dart b/lib/presentation/vital_sign/vital_sign_details_page.dart index 75b6ec9d..4760ebbe 100644 --- a/lib/presentation/vital_sign/vital_sign_details_page.dart +++ b/lib/presentation/vital_sign/vital_sign_details_page.dart @@ -495,7 +495,7 @@ class _VitalSignDetailsPageState extends State { HorizontalRangeAnnotation( y1: args.high!, y2: maxY, - color: AppColors.criticalLowAndHigh.withOpacity(0.05), + color: AppColors.primaryRedColor.withOpacity(0.05), ), ); } diff --git a/lib/presentation/vital_sign/vital_sign_page.dart b/lib/presentation/vital_sign/vital_sign_page.dart index af8f5ab9..c6fbca7f 100644 --- a/lib/presentation/vital_sign/vital_sign_page.dart +++ b/lib/presentation/vital_sign/vital_sign_page.dart @@ -44,7 +44,7 @@ class _VitalSignPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.vitalSigns.tr(context: context), child: Consumer( @@ -341,11 +341,11 @@ class _VitalSignPageState extends State { Container( padding: EdgeInsets.symmetric(horizontal: 6.w, vertical: 6.h), // decoration: BoxDecoration( - // color: AppColors.bgScaffoldColor, + // color: AppColors.scaffoldBgColor, // borderRadius: BorderRadius.circular(10.r), // ), decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.bgScaffoldColor, + color: AppColors.scaffoldBgColor, borderRadius: 10.r, hasShadow: false, ), diff --git a/lib/presentation/water_monitor/water_consumption_page.dart b/lib/presentation/water_monitor/water_consumption_page.dart index 54dace58..2c3d1311 100644 --- a/lib/presentation/water_monitor/water_consumption_page.dart +++ b/lib/presentation/water_monitor/water_consumption_page.dart @@ -792,7 +792,7 @@ class _WaterConsumptionPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.waterConsumption.tr(context: context), bottomChild: Consumer( diff --git a/lib/presentation/water_monitor/water_monitor_settings_page.dart b/lib/presentation/water_monitor/water_monitor_settings_page.dart index a3c82c0c..20e2a57d 100644 --- a/lib/presentation/water_monitor/water_monitor_settings_page.dart +++ b/lib/presentation/water_monitor/water_monitor_settings_page.dart @@ -256,7 +256,7 @@ class _WaterMonitorSettingsPageState extends State { final viewModel = context.watch(); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: CollapsingListView( title: LocaleKeys.h2oSettings.tr(context: context), bottomChild: Container( diff --git a/lib/presentation/water_monitor/widgets/cup_bottomsheet_widgets.dart b/lib/presentation/water_monitor/widgets/cup_bottomsheet_widgets.dart index 4ee6170e..bf4a7605 100644 --- a/lib/presentation/water_monitor/widgets/cup_bottomsheet_widgets.dart +++ b/lib/presentation/water_monitor/widgets/cup_bottomsheet_widgets.dart @@ -90,7 +90,7 @@ class SwitchCupBottomSheet extends StatelessWidget { color: isSelected ? AppColors.primaryRedColor.withOpacity(0.08) : Colors.transparent, borderRadius: BorderRadius.circular(12.r), border: Border.all( - color: isSelected ? AppColors.primaryRedColor : AppColors.bgScaffoldColor, + color: isSelected ? AppColors.primaryRedColor : AppColors.scaffoldBgColor, width: 1, ), ), diff --git a/lib/presentation/water_monitor/widgets/water_splash_progress_widget.dart b/lib/presentation/water_monitor/widgets/water_splash_progress_widget.dart index da5eb069..5f1dd1ce 100644 --- a/lib/presentation/water_monitor/widgets/water_splash_progress_widget.dart +++ b/lib/presentation/water_monitor/widgets/water_splash_progress_widget.dart @@ -86,7 +86,7 @@ class _WaterWaveProgressState extends State with SingleTicker // rectangular painting the circleRadius is unused. circleRadius: radius, waveColor: widget.waveColor ?? AppColors.primaryRedColor, - backgroundColor: widget.backgroundColor ?? AppColors.bgScaffoldColor, + backgroundColor: widget.backgroundColor ?? AppColors.scaffoldBgColor, useCircleClip: widget.useCircleClip, containerWidth: widget.containerWidth, containerHeight: widget.containerHeight, diff --git a/lib/routes/app_routes.dart b/lib/routes/app_routes.dart index fd16a2d3..a57f8a0a 100644 --- a/lib/routes/app_routes.dart +++ b/lib/routes/app_routes.dart @@ -19,7 +19,6 @@ import 'package:hmg_patient_app_new/presentation/home/navigation_screen.dart'; import 'package:hmg_patient_app_new/presentation/home_health_care/hhc_procedures_page.dart'; import 'package:hmg_patient_app_new/presentation/medical_file/medical_file_page.dart'; import 'package:hmg_patient_app_new/presentation/servicesPriceList/services_price_list_page.dart'; -import 'package:hmg_patient_app_new/presentation/smartwatches/huawei_health_example.dart'; import 'package:hmg_patient_app_new/presentation/smartwatches/smartwatch_home_page.dart'; import 'package:hmg_patient_app_new/presentation/symptoms_checker/organ_selector_screen.dart'; import 'package:hmg_patient_app_new/presentation/symptoms_checker/possible_conditions_screen.dart'; @@ -117,7 +116,7 @@ class AppRoutes { userInfoSelection: (context) => UserInfoSelectionPage(), userInfoFlowManager: (context) => UserInfoFlowManager(), smartWatches: (context) => SmartwatchHomePage(), - huaweiHealthExample: (context) => HuaweiHealthExample(), + // huaweiHealthExample: (context) => HuaweiHealthExample(), covid19Test: (context) => Covid19LandingPage(), waterConsumptionPage: (context) => WaterConsumptionPage(), waterMonitorSettingsPage: (context) => WaterMonitorSettingsPage(), @@ -125,9 +124,7 @@ class AppRoutes { healthConvertersPage: (context) => HealthCalculatorsPage(type: HealthCalConEnum.converter), healthTrackersPage: (context) => HealthTrackersPage(), vitalSign: (context) => VitalSignPage(), - appUpdate: (context) => AppUpdatePage( - appUpdateMessage: '', - ), + appUpdate: (context) => AppUpdatePage(appUpdateMessage: ''), emergencyServicesPage: (context) => EmergencyServicesPage(), servicesPriceListPage: (context) => ServicesPriceListPage(), addHealthTrackerEntryPage: (context) { diff --git a/lib/services/dialog_service.dart b/lib/services/dialog_service.dart index 6347a389..d5055443 100644 --- a/lib/services/dialog_service.dart +++ b/lib/services/dialog_service.dart @@ -182,7 +182,7 @@ class DialogServiceImp implements DialogService { text: LocaleKeys.manageFiles.tr(context: context), backgroundColor: AppColors.secondaryLightRedColor, borderColor: AppColors.secondaryLightRedColor, - textColor: AppColors.primaryRedBorderColor, + textColor: AppColors.primaryRedColor, height: 48.h, onPressed: () { navigationService.pop(); @@ -284,7 +284,7 @@ Widget exceptionBottomSheetWidget({required BuildContext context, required Strin } : onCancelPressed, backgroundColor: AppColors.primaryRedColor, - borderColor: AppColors.primaryRedBorderColor, + borderColor: AppColors.primaryRedColor, textColor: Colors.white, icon: AppAssets.confirm, ), @@ -305,7 +305,7 @@ Widget showPhoneNumberPickerWidget({required BuildContext context, String? messa text: LocaleKeys.sendOTPSMS.tr(context: context), onPressed: onSMSPress, backgroundColor: AppColors.primaryRedColor, - borderColor: AppColors.primaryRedBorderColor, + borderColor: AppColors.primaryRedColor, textColor: AppColors.whiteColor, icon: AppAssets.message, ), @@ -326,7 +326,7 @@ Widget showPhoneNumberPickerWidget({required BuildContext context, String? messa text: LocaleKeys.sendOTPWHATSAPP.tr(context: context), onPressed: onWhatsappPress, backgroundColor: Colors.white, - borderColor: AppColors.borderOnlyColor, + borderColor: AppColors.textColor, textColor: AppColors.textColor, icon: AppAssets.whatsapp, iconColor: null, diff --git a/lib/theme/app_theme.dart b/lib/theme/app_theme.dart index c09d537f..9020640f 100644 --- a/lib/theme/app_theme.dart +++ b/lib/theme/app_theme.dart @@ -1,7 +1,79 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:hmg_patient_app_new/theme/colors.dart'; class AppTheme { + static ThemeData getDarkTheme(isArabic) => ThemeData( + fontFamily: isArabic ? 'GESSTwo' : 'Poppins', + primarySwatch: Colors.red, + visualDensity: VisualDensity.adaptivePlatformDensity, + brightness: Brightness.dark, + pageTransitionsTheme: const PageTransitionsTheme( + builders: { + TargetPlatform.android: ZoomPageTransitionsBuilder(), + TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), + }, + ), + scaffoldBackgroundColor: AppColors.dark.scaffoldBgColor, + canvasColor: AppColors.dark.baseColor, + cardColor: AppColors.dark.baseColor, + hintColor: AppColors.dark.inputLabelTextColor, + disabledColor: AppColors.dark.checkBoxBorderColor, + textSelectionTheme: const TextSelectionThemeData( + cursorColor: Colors.grey, + selectionColor: Color.fromRGBO(80, 100, 253, 0.5), + selectionHandleColor: Colors.grey, + ), + highlightColor: Colors.white10, + splashColor: Colors.transparent, + colorScheme: ColorScheme.dark( + primary: const Color(0xFFD63D48), + secondary: AppColors.dark.blueColor, + surface: AppColors.dark.baseColor, + error: AppColors.dark.errorColor, + onSurface: const Color(0xFFFFFFFF), + onPrimary: Colors.white, + ), + bottomSheetTheme: BottomSheetThemeData( + backgroundColor: Colors.black.withValues(alpha: 0), + ), + floatingActionButtonTheme: const FloatingActionButtonThemeData( + highlightElevation: 2, + disabledElevation: 0, + elevation: 2, + ), + appBarTheme: AppBarTheme( + backgroundColor: AppColors.dark.baseColor, + elevation: 0.0, + actionsIconTheme: const IconThemeData(color: Colors.white70), + systemOverlayStyle: SystemUiOverlayStyle.light, + surfaceTintColor: Colors.transparent, + ), + dividerColor: AppColors.dark.dividerColor, + iconTheme: const IconThemeData(color: Color(0xFFFFFFFF)), + inputDecorationTheme: InputDecorationTheme( + filled: true, + fillColor: AppColors.dark.lightGrayBGColor, + labelStyle: TextStyle(color: AppColors.dark.inputLabelTextColor), + hintStyle: TextStyle(color: AppColors.dark.inputLabelTextColor), + border: OutlineInputBorder( + borderSide: BorderSide(color: AppColors.dark.borderGrayColor), + ), + enabledBorder: OutlineInputBorder( + borderSide: BorderSide(color: AppColors.dark.borderGrayColor), + ), + ), + textTheme: const TextTheme( + bodyLarge: TextStyle(color: Color(0xFFFFFFFF)), + bodyMedium: TextStyle(color: Color(0xFFFFFFFF)), + bodySmall: TextStyle(color: Color(0xFFB0B0B0)), + titleLarge: TextStyle(color: Color(0xFFFFFFFF)), + titleMedium: TextStyle(color: Color(0xFFFFFFFF)), + titleSmall: TextStyle(color: Color(0xFFB0B0B0)), + labelLarge: TextStyle(color: Color(0xFFFFFFFF)), + ), + ); + static ThemeData getTheme(isArabic) => ThemeData( fontFamily: isArabic ? 'GESSTwo' : 'Poppins', primarySwatch: Colors.red, @@ -10,44 +82,31 @@ class AppTheme { pageTransitionsTheme: const PageTransitionsTheme( builders: { TargetPlatform.android: ZoomPageTransitionsBuilder(), - TargetPlatform.iOS: CupertinoPageTransitionsBuilder() + TargetPlatform.iOS: CupertinoPageTransitionsBuilder(), }, ), hintColor: Colors.grey[400], - // colorScheme: ColorScheme.fromSwatch(accentColor: MyColors.backgroundColor), disabledColor: Colors.grey[300], - // errorColor: const Colors, - // scaffoldBackgroundColor: MyColors.backgroundColor, - textSelectionTheme: const TextSelectionThemeData(cursorColor: Colors.grey, selectionColor: Color.fromRGBO(80, 100, 253, 0.5), selectionHandleColor: Colors.grey), + textSelectionTheme: const TextSelectionThemeData( + cursorColor: Colors.grey, + selectionColor: Color.fromRGBO(80, 100, 253, 0.5), + selectionHandleColor: Colors.grey, + ), canvasColor: Colors.white, - // backgroundColor: const Color.fromRGBO(255, 255, 255, 1), - highlightColor: Colors.grey[100]!.withOpacity(0.4), + highlightColor: Colors.grey[100]!.withValues(alpha: 0.4), splashColor: Colors.transparent, - // primaryColor: primaryColor, - // primaryColorDark: primaryColor, - // toggleableActiveColor: secondaryColor, - // indicatorColor: secondaryColor, - // bottomSheetTheme: const BottomSheetThemeData( - // backgroundColor: Color(0xFFE0E0E0), - // ), - bottomSheetTheme: BottomSheetThemeData( - backgroundColor: Colors.black.withOpacity(0)), - // primaryTextTheme: const TextTheme( - // bodyText2: TextStyle(color: Colors.white), - // ), - // iconTheme: const IconThemeData(color: MyColors.darkTextColor), - // textTheme: const TextTheme( - // bodyText1: TextStyle(color: Colors.black, letterSpacing: 0.6), - // headline1: TextStyle(color: Colors.white, letterSpacing: 0.6), - // headline2: TextStyle(color: Colors.white, letterSpacing: 0.6), - // ), - floatingActionButtonTheme: const FloatingActionButtonThemeData(highlightElevation: 2, disabledElevation: 0, elevation: 2), + bottomSheetTheme: BottomSheetThemeData( + backgroundColor: Colors.black.withValues(alpha: 0), + ), + floatingActionButtonTheme: const FloatingActionButtonThemeData( + highlightElevation: 2, + disabledElevation: 0, + elevation: 2, + ), appBarTheme: AppBarTheme( - color: const Color(0xff515A5D), + backgroundColor: const Color(0xff515A5D), elevation: 0.0, - actionsIconTheme: IconThemeData( - color: Colors.grey[800], - ), + actionsIconTheme: IconThemeData(color: Colors.grey[800]), systemOverlayStyle: SystemUiOverlayStyle.light, surfaceTintColor: Colors.transparent, ), @@ -55,7 +114,5 @@ class AppTheme { } extension ExtendedRevoCheckTheme on TextTheme { - //add custom styles and colors here - //taken from https://medium.com/@crizantlai/flutter-how-to-extend-themedata-b5b987a95bb5 TextStyle get price => const TextStyle(color: Colors.redAccent); } diff --git a/lib/theme/colors.dart b/lib/theme/colors.dart index f80085aa..c1db81ec 100644 --- a/lib/theme/colors.dart +++ b/lib/theme/colors.dart @@ -4,6 +4,7 @@ class AppColors { static const transparent = Colors.transparent; static const mainPurple = Color(0xFF7954F7); // #7954F7 + // Scaffold / Background static const scaffoldBgColor = Color(0xFFF8F8F8); // #F8F8F8 static const bottomSheetBgColor = Color(0xFFF8F8FA); // #F8F8FA static const lightGreyEFColor = Color(0xffeaeaff); // #EAEAFF @@ -12,69 +13,43 @@ class AppColors { static const lightGrayColor = Color(0xff808080); // #808080 static const greyTextColorLight = Color(0xFFA2A2A2); // #A2A2A2 -// New UI Colors + // Core Colors static const whiteColor = Color(0xFFffffff); // #FFFFFF - static const Color bgScaffoldColor = Color(0xffF8F8F8); // #F8F8F8 static const Color primaryRedColor = Color(0xFFED1C2B); // #ED1C2B - static const Color primaryRedBorderColor = Color(0xFFED1C2B); // #ED1C2B static const Color secondaryLightRedColor = Color(0xFFFEE9EA); // #FEE9EA - static const Color secondaryLightRedBorderColor = Color(0xFFFEE9EA); // #FEE9EA - static const Color bgRedLightColor = Color(0xFFFEE9EA); // #FEE9EA - static const Color bgGreenColor = Color(0xFF18C273); // #18C273 + static const Color successColor = Color(0xFF18C273); // #18C273 + static const Color successLightBgColor = Color(0xffDDF6EA); // #DDF6EA + static const Color greyColor = Color(0xFFEFEFF0); // #EFEFF0 + static const Color chipBgColor = Color(0xFFEFEFF0); // chip background — same as greyColor in light static const Color textColor = Color(0xFF2E3039); // #2E3039 + static const Color iconColor = Color(0xFF2E3039); // icon color — same as textColor in light mode static const Color borderGrayColor = Color(0x332E3039); // #2E3039 (20% opacity) static const Color textColorLight = Color(0xFF5E5E5E); // #5E5E5E - static const Color borderOnlyColor = Color(0xFF2E3039); // #2E3039 - static const Color chipBorderColorOpacity20 = Color(0x332E3039); // #2E3039 (20% opacity) static const Color dividerColor = Color(0x40D2D2D2); // #D2D2D2 (25% opacity) static const Color warningColorYellow = Color(0xFFF4A308); // #F4A308 - static const Color blackBgColor = Color(0xFF2E3039); // #2E3039 - static const blackColor = textColor; // #2E3039 static const Color inputLabelTextColor = Color(0xff898A8D); // #898A8D static const Color greyTextColor = Color(0xFF8F9AA3); // #8F9AA3 static const Color lightGrayBGColor = Color(0x142E3039); // #2E3039 (8% opacity) static const Color checkBoxBorderColor = Color(0xffD2D2D2); // #D2D2D2 - static const Color pharmacyBGColor = Color(0xFF359846); // #359846 - static const lightGreenColor = Color(0xFF0ccedde); // #0CCEDDE - static const textGreenColor = Color(0xFF18C273); // #18C273 static const Color ratingColorYellow = Color(0xFFFFAF15); // #FFAF15 static const Color spacerLineColor = Color(0x2E30391A); // #2E3039 (10% opacity) - //Chips - static const Color successColor = Color(0xff18C273); // #18C273 - static const Color successLightBgColor = Color(0xffDDF6EA); // #DDF6EA - static const Color errorColor = Color(0xFFED1C2B); // #ED1C2B + // Semantic / Status Colors + static const Color errorColor = Color(0xFFED1C2B); // #ED1C2B — same as primaryRedColor static const Color alertColor = Color(0xFFD48D05); // #D48D05 static const Color infoColor = Color(0xFF0B85F7); // #0B85F7 static const Color warningColor = Color(0xFFFFCC00); // #FFCC00 - static const Color greyColor = Color(0xFFEFEFF0); // #EFEFF0 - static const Color chipPrimaryRedBorderColor = Color(0xFFED1C2B); // #ED1C2B - static const Color chipSecondaryLightRedColor = Color(0xFFFEE9EA); // #FEE9EA - // static const Color chipSecondaryLightRedColor = Color(0xFFFF9E15); // #FEE9EA - - static const Color successLightColor = Color(0xFF18C273); // #18C273 - static const Color errorLightColor = Color(0xFFED1C2B); // #ED1C2B - static const Color alertLightColor = Color(0xFFD48D05); // #D48D05 - static const Color infoLightColor = Color(0xFF0B85F7); // #0B85F7 - static const Color warningLightColor = Color(0xFFFFCC00); // #FFCC00 - static const Color greyLightColor = Color(0xFFEFEFF0); // #EFEFF0 - static const Color thumbColor = Color(0xFF18C273); // #18C273 static const Color switchBackgroundColor = Color(0x2618C273); // #18C273 (15% opacity) - static const Color bottomNAVBorder = Color(0xFFEEEEEE); // #EEEEEE - static const Color quickLoginColor = Color(0xFF666666); // #666666 - static const Color tooltipTextColor = Color(0xFF414D55); // #414D55 static const Color graphGridColor = Color(0x4D18C273); // #18C273 (30% opacity) - static const Color criticalLowAndHigh = Color(0xFFED1C2B); // #ED1C2B static const Color highAndLow = Color(0xFFFFAF15); // #FFAF15 static const Color labelTextColor = Color(0xFF838383); // #838383 static const Color calenderTextColor = Color(0xFFD0D0D0); // #D0D0D0 static const Color lightGreenButtonColor = Color(0x2618C273); // #18C273 (15% opacity) - static const Color lightRedButtonColor = Color(0x1AED1C2B); // #ED1C2B (10% opacity) // Status Colors @@ -86,20 +61,17 @@ class AppColors { // Info Banner Colors static const Color infoBannerBgColor = Color(0xFFFFF4E6); // #FFF4E6 static const Color infoBannerBorderColor = Color(0xFFFFE5B4); // #FFE5B4 - static const Color infoBannerIconColor = Color(0xFFCC9B14); // #CC9B14 + static const Color infoBannerIconColor = Color(0xFFCC9B14); // #CC9B14 — same value as statusPendingColor, different semantic static const Color infoBannerTextColor = Color(0xFF856404); // #856404 - // SymptomsChecker - + // Symptoms Checker static const Color chipColorSeekMedicalAdvice = Color(0xFFFFAF15); // #FFAF15 - static const Color chipTextColorSeekMedicalAdvice = Color(0xFFD48D05); // #AB7103 - static const Color chipColorMonitor = Color(0xFF18C273); // #18C273 - static const Color chipColorEmergency = Color(0xFFED1C2B); // #ED1C2B + static const Color chipTextColorSeekMedicalAdvice = Color(0xFFD48D05); // #D48D05 // Services Page Colors static const Color eReferralCardColor = Color(0xFFFF8012); // #FF8012 static const Color bloodDonationCardColor = Color(0xFFFF5662); // #FF5662 - static const Color myChildVaccineCardColor = Color(0xFFFF2D78); // #FF5662 + static const Color myChildVaccineCardColor = Color(0xFFFF2D78); // #FF2D78 static const Color bookAppointment = Color(0xFF415364); // #415364 // Water Monitor @@ -111,8 +83,362 @@ class AppColors { static const Color shimmerBaseColor = Color(0xFFE0E0E0); // #E0E0E0 static const Color shimmerHighlightColor = Color(0xFFF5F5F5); // #F5F5F5 static const Color covid29Color = Color(0xff2563EB); // #2563EB - static const Color lightGreyTextColor = Color(0xFF959595); - static const Color labelColorYellow = Color(0xFFFBCB6E); + static const Color lightGreyTextColor = Color(0xFF959595); // #959595 + static const Color labelColorYellow = Color(0xFFFBCB6E); // #FBCB6E + + static const LinearGradient aiLinearGradient = + LinearGradient(colors: [Color(0xFF8A38F5), Color(0xFFE20BBB)], begin: Alignment.topLeft, end: Alignment.bottomRight); + + // ── Aliases (removed duplicates — point to canonical names) ────────────── + /// Alias for [scaffoldBgColor] + static const Color bgScaffoldColor = scaffoldBgColor; + + /// Alias for [primaryRedColor] + static const Color primaryRedBorderColor = primaryRedColor; + + /// Alias for [primaryRedColor] + static const Color chipPrimaryRedBorderColor = primaryRedColor; + + /// Alias for [primaryRedColor] + static const Color criticalLowAndHigh = primaryRedColor; + + /// Alias for [primaryRedColor] + static const Color chipColorEmergency = primaryRedColor; + + /// Alias for [primaryRedColor] + static const Color errorLightColor = primaryRedColor; + + /// Alias for [secondaryLightRedColor] + static const Color secondaryLightRedBorderColor = secondaryLightRedColor; + + /// Alias for [secondaryLightRedColor] + static const Color bgRedLightColor = secondaryLightRedColor; + + /// Alias for [secondaryLightRedColor] + static const Color chipSecondaryLightRedColor = secondaryLightRedColor; + + /// Alias for [textColor] + static const Color blackBgColor = textColor; + + /// Alias for [textColor] + static const blackColor = textColor; + + /// Alias for [textColor] + static const Color borderOnlyColor = textColor; + + /// Alias for [borderGrayColor] + static const Color chipBorderColorOpacity20 = borderGrayColor; + + /// Alias for [successColor] + static const Color bgGreenColor = successColor; + + /// Alias for [successColor] + static const Color textGreenColor = successColor; + + /// Alias for [successColor] + static const Color successLightColor = successColor; + + /// Alias for [successColor] + static const Color thumbColor = successColor; + + /// Alias for [successColor] + static const Color chipColorMonitor = successColor; + + /// Alias for [greyColor] + static const Color greyLightColor = greyColor; + + /// Alias for [alertColor] + static const Color alertLightColor = alertColor; + + /// Alias for [infoColor] + static const Color infoLightColor = infoColor; + + /// Alias for [warningColor] + static const Color warningLightColor = warningColor; + + // ── Dark Mode Palette ───────────────────────────────────────────────────── + // These are the dark-mode substitutes for every light-mode color. + // Usage: AppColors.dark.scaffoldBgColor OR context.appColors.scaffoldBgColor + + static const AppColorsDark dark = AppColorsDark(); +} + +// --------------------------------------------------------------------------- +// Dark palette — mirrors every color in AppColors with a dark-friendly value. +// --------------------------------------------------------------------------- +class AppColorsDark { + const AppColorsDark(); + + // Scaffold / Background + Color get scaffoldBgColor => const Color(0xFF191919); // near-black + Color get bottomSheetBgColor => const Color(0xFF1C1C1E); // iOS dark sheet + Color get lightGreyEFColor => const Color(0xFF2A2A3A); + + Color get greyF7Color => const Color(0xFF1E1E1E); + + Color get greyInfoTextColor => const Color(0xFF9E9E9E); + + Color get lightGrayColor => const Color(0xFF9E9E9E); + + Color get greyTextColorLight => const Color(0xFF757575); + + // Core + Color get baseColor => const Color(0xFF1E1E1E); // surface replaces white + Color get primaryRedColor => const Color(0xFFD63D48); // brand — softened for dark + Color get secondaryLightRedColor => const Color(0xFF3A1015); // dark tint of red + Color get successColor => const Color(0xFF18C273); // unchanged + Color get successLightBgColor => const Color(0xFF0D2E1F); // dark tint of green + Color get textColor => const Color(0xFFFFFFFF); // near-white text + Color get iconColor => const Color(0xFFFFFFFF); // icon color in dark mode + Color get borderGrayColor => const Color(0x55ECECEC); // subtle border + Color get textColorLight => const Color(0xFFB0B0B0); + + Color get dividerColor => const Color(0x33FFFFFF); + + Color get warningColorYellow => const Color(0xFFF4A308); // unchanged + Color get inputLabelTextColor => const Color(0xFF9E9E9E); + + Color get greyTextColor => const Color(0xFF8F9AA3); // unchanged + Color get lightGrayBGColor => const Color(0x22FFFFFF); + + Color get checkBoxBorderColor => const Color(0xFF555555); + + Color get pharmacyBGColor => const Color(0xFF359846); // unchanged + Color get ratingColorYellow => const Color(0xFFFFAF15); // unchanged + Color get spacerLineColor => const Color(0x22FFFFFF); + + // Semantic / Status + Color get errorColor => const Color(0xFFD63D48); // matches dark primaryRedColor + + Color get alertColor => const Color(0xFFD48D05); + + Color get infoColor => const Color(0xFF4DA6FF); + + Color get warningColor => const Color(0xFFFFCC00); + + Color get greyColor => const Color(0xFF2C2C2E); // dark card/chip bg + Color get chipBgColor => const Color(0xFF3E3E3E); // chip background in dark mode + Color get cardDarkBorderColor => const Color(0x0DEAEAEA); // card border in dark mode — #EAEAEA at 5% opacity + Color get serviceCardButtonColor => const Color(0xFF3E3E3E); // dark bg for service card Book Now button + Color get switchBackgroundColor => const Color(0x2618C273); + + Color get bottomNAVBorder => const Color(0xFF2C2C2E); + + Color get quickLoginColor => const Color(0xFF9E9E9E); + + Color get tooltipTextColor => const Color(0xFFCFD8DC); + + Color get graphGridColor => const Color(0x4D18C273); + + Color get highAndLow => const Color(0xFFFFAF15); + + Color get labelTextColor => const Color(0xFF9E9E9E); + + Color get calenderTextColor => const Color(0xFF555555); + + Color get lightGreenButtonColor => const Color(0x2618C273); + + Color get lightRedButtonColor => const Color(0x1AED1C2B); + + // Status + Color get statusPendingColor => const Color(0xFFCC9B14); + + Color get statusProcessingColor => const Color(0xFFECECEC); + + Color get statusCompletedColor => const Color(0xFF359846); + + Color get statusRejectedColor => const Color(0xFFD02127); + + // Info Banner + Color get infoBannerBgColor => const Color(0xFF2A1F0A); + + Color get infoBannerBorderColor => const Color(0xFF5A3D0A); + + Color get infoBannerIconColor => const Color(0xFFCC9B14); + + Color get infoBannerTextColor => const Color(0xFFFFCB6B); + + // Symptoms Checker + Color get chipColorSeekMedicalAdvice => const Color(0xFFFFAF15); + + Color get chipTextColorSeekMedicalAdvice => const Color(0xFFD48D05); + + // Services Page + Color get eReferralCardColor => const Color(0xFFFF8012); + + Color get bloodDonationCardColor => const Color(0xFFFF5662); + + Color get myChildVaccineCardColor => const Color(0xFFFF2D78); + + Color get bookAppointment => const Color(0xFF415364); + + // Water Monitor + Color get blueColor => const Color(0xFF4EB5FF); + + Color get blueGradientColorOne => const Color(0xFF101C2A); + + Color get blueGradientColorTwo => const Color(0xFF0D2235); + + // Shimmer + Color get shimmerBaseColor => const Color(0xFF2C2C2C); + + Color get shimmerHighlightColor => const Color(0xFF3D3D3D); + + Color get covid29Color => const Color(0xFF2563EB); + + Color get lightGreyTextColor => const Color(0xFF757575); + + Color get labelColorYellow => const Color(0xFFFBCB6E); + + // Aliases + Color get bgScaffoldColor => scaffoldBgColor; + + Color get primaryRedBorderColor => primaryRedColor; + + Color get chipPrimaryRedBorderColor => primaryRedColor; + + Color get criticalLowAndHigh => primaryRedColor; + + Color get chipColorEmergency => primaryRedColor; + + Color get errorLightColor => primaryRedColor; + + Color get secondaryLightRedBorderColor => secondaryLightRedColor; + + Color get bgRedLightColor => secondaryLightRedColor; + + Color get chipSecondaryLightRedColor => secondaryLightRedColor; + + Color get blackBgColor => textColor; + + Color get blackColor => textColor; + + Color get borderOnlyColor => textColor; + + Color get chipBorderColorOpacity20 => borderGrayColor; + + Color get bgGreenColor => successColor; + + Color get textGreenColor => successColor; + + Color get successLightColor => successColor; + + Color get thumbColor => successColor; + + Color get chipColorMonitor => successColor; + + Color get greyLightColor => greyColor; + + Color get alertLightColor => alertColor; + + Color get infoLightColor => infoColor; + + Color get warningLightColor => warningColor; +} + +// --------------------------------------------------------------------------- +// BuildContext extension — resolves the right palette based on theme brightness +// --------------------------------------------------------------------------- +extension AppColorsContext on BuildContext { + /// Returns dark palette in dark mode, null (use AppColors statics) in light mode. + bool get _isDark => Theme.of(this).brightness == Brightness.dark; + + // Scaffold / Background + Color get scaffoldBgColor => _isDark ? AppColors.dark.scaffoldBgColor : AppColors.scaffoldBgColor; + + Color get bottomSheetBgColor => _isDark ? AppColors.dark.bottomSheetBgColor : AppColors.bottomSheetBgColor; + + Color get greyF7Color => _isDark ? AppColors.dark.greyF7Color : AppColors.greyF7Color; + + Color get greyInfoTextColor => _isDark ? AppColors.dark.greyInfoTextColor : AppColors.greyInfoTextColor; + + Color get lightGrayColor => _isDark ? AppColors.dark.lightGrayColor : AppColors.lightGrayColor; + + // Core + Color get cardBaseColor => _isDark ? AppColors.dark.baseColor : AppColors.whiteColor; + + Color get primaryRedColor => _isDark ? AppColors.dark.primaryRedColor : AppColors.primaryRedColor; + + Color get secondaryLightRedColor => _isDark ? AppColors.dark.serviceCardButtonColor : AppColors.secondaryLightRedColor; + + /// Foreground color for buttons whose background is [secondaryLightRedColor]. + /// Light → primaryRedColor, Dark → white (because bg is serviceCardButtonColor #3E3E3E) + Color get secondaryLightRedForegroundColor => _isDark ? AppColors.whiteColor : AppColors.primaryRedColor; + + Color get successColor => AppColors.successColor; + + Color get successLightBgColor => _isDark ? AppColors.dark.successLightBgColor : AppColors.successLightBgColor; + + Color get textColor => _isDark ? AppColors.dark.textColor : AppColors.textColor; + + Color get iconColor => _isDark ? AppColors.dark.iconColor : AppColors.iconColor; + + Color get borderGrayColor => _isDark ? AppColors.dark.borderGrayColor : AppColors.borderGrayColor; + + Color get textColorLight => _isDark ? AppColors.dark.textColorLight : AppColors.textColorLight; + + Color get dividerColor => _isDark ? AppColors.dark.dividerColor : AppColors.dividerColor; + + Color get inputLabelTextColor => _isDark ? AppColors.dark.inputLabelTextColor : AppColors.inputLabelTextColor; + + Color get greyTextColor => AppColors.greyTextColor; + + Color get lightGrayBGColor => _isDark ? AppColors.dark.lightGrayBGColor : AppColors.lightGrayBGColor; + + Color get checkBoxBorderColor => _isDark ? AppColors.dark.checkBoxBorderColor : AppColors.checkBoxBorderColor; + + // Status / Semantic + Color get errorColor => _isDark ? AppColors.dark.errorColor : AppColors.errorColor; + + Color get alertColor => AppColors.alertColor; + + Color get infoColor => _isDark ? AppColors.dark.infoColor : AppColors.infoColor; + + Color get warningColor => AppColors.warningColor; + + Color get greyColor => _isDark ? AppColors.dark.greyColor : AppColors.greyColor; + + Color get chipBgColor => _isDark ? AppColors.dark.chipBgColor : AppColors.chipBgColor; + + Color get cardDarkBorderColor => _isDark ? AppColors.dark.cardDarkBorderColor : Colors.transparent; + + Color get serviceCardButtonColor => _isDark ? AppColors.dark.serviceCardButtonColor : AppColors.textColor; + + Color get bottomNAVBorder => _isDark ? AppColors.dark.bottomNAVBorder : AppColors.bottomNAVBorder; + + Color get labelTextColor => _isDark ? AppColors.dark.labelTextColor : AppColors.labelTextColor; + + Color get lightGreyTextColor => _isDark ? AppColors.dark.lightGreyTextColor : AppColors.lightGreyTextColor; + + // Info Banner + Color get infoBannerBgColor => _isDark ? AppColors.dark.infoBannerBgColor : AppColors.infoBannerBgColor; + + Color get infoBannerBorderColor => _isDark ? AppColors.dark.infoBannerBorderColor : AppColors.infoBannerBorderColor; + + Color get infoBannerIconColor => AppColors.infoBannerIconColor; + + Color get infoBannerTextColor => _isDark ? AppColors.dark.infoBannerTextColor : AppColors.infoBannerTextColor; + + // Water Monitor + Color get blueColor => AppColors.blueColor; + + Color get blueGradientColorOne => _isDark ? AppColors.dark.blueGradientColorOne : AppColors.blueGradientColorOne; + + Color get blueGradientColorTwo => _isDark ? AppColors.dark.blueGradientColorTwo : AppColors.blueGradientColorTwo; + + // Shimmer + Color get shimmerBaseColor => _isDark ? AppColors.dark.shimmerBaseColor : AppColors.shimmerBaseColor; + + Color get shimmerHighlightColor => _isDark ? AppColors.dark.shimmerHighlightColor : AppColors.shimmerHighlightColor; + + // Aliases + Color get bgScaffoldColor => scaffoldBgColor; + + Color get bgGreenColor => successColor; + + Color get bgRedLightColor => secondaryLightRedColor; + + Color get blackColor => textColor; - static const LinearGradient aiLinearGradient = LinearGradient(colors: [Color(0xFF8A38F5), Color(0xFFE20BBB)], begin: Alignment.topLeft, end: Alignment.bottomRight); + Color get blackBgColor => textColor; } diff --git a/lib/widgets/CustomSwitch.dart b/lib/widgets/CustomSwitch.dart index bca4e69c..9068605f 100644 --- a/lib/widgets/CustomSwitch.dart +++ b/lib/widgets/CustomSwitch.dart @@ -32,7 +32,7 @@ class _CustomSwitchState extends State { width: 28.w, height: 28.h, decoration: BoxDecoration( - color: widget.value? AppColors.thumbColor : AppColors.greyColor, + color: widget.value? AppColors.successColor : AppColors.greyColor, shape: BoxShape.circle, ), ), diff --git a/lib/widgets/appbar/collapsing_list_view.dart b/lib/widgets/appbar/collapsing_list_view.dart index 25221962..56ef7161 100644 --- a/lib/widgets/appbar/collapsing_list_view.dart +++ b/lib/widgets/appbar/collapsing_list_view.dart @@ -59,7 +59,7 @@ class CollapsingListView extends StatelessWidget { Widget build(BuildContext context) { AppState appState = getIt.get(); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: context.scaffoldBgColor, body: Column( children: [ CustomScrollView( @@ -73,7 +73,7 @@ class CollapsingListView extends StatelessWidget { leadingWidth: isLeading ? 40.w + 32.w : double.infinity, systemOverlayStyle: SystemUiOverlayStyle(statusBarBrightness: Brightness.light), surfaceTintColor: Colors.transparent, - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: context.scaffoldBgColor, bottom: // isLeading // ? @@ -103,7 +103,12 @@ class CollapsingListView extends StatelessWidget { margin: EdgeInsets.fromLTRB(24.w, 0, 24.w, 0), child: Transform.flip( flipX: appState.isArabic(), - child: Utils.buildSvgWithAssets(icon: isClose ? AppAssets.close_bottom_nav_trans : AppAssets.arrow_back_new, width: 24.h, height: 24.h), + child: Utils.buildSvgWithAssets( + icon: isClose ? AppAssets.close_bottom_nav_trans : AppAssets.arrow_back_new, + width: 24.h, + height: 24.h, + iconColor: context.iconColor, + ), ), ).onPress(() { if (leadingCallback != null) { @@ -270,7 +275,8 @@ class _ScrollAnimatedTitleState extends State { return Container( // height: (widget.preferredSize.height - _fontSize / 2).h, height: 56.h, - alignment: isRtl ? (widget.showBack ? Alignment.topRight : Alignment.centerRight) : (widget.showBack ? Alignment.topLeft : Alignment.centerLeft), + alignment: + isRtl ? (widget.showBack ? Alignment.topRight : Alignment.centerRight) : (widget.showBack ? Alignment.topLeft : Alignment.centerLeft), padding: EdgeInsets.fromLTRB(24.w, 0, 24.w, 0), child: Row( spacing: 4.h, @@ -286,15 +292,27 @@ class _ScrollAnimatedTitleState extends State { ), ).expanded, ...[ - if (widget.logout != null) actionButton(context, t, title: LocaleKeys.logout.tr(context: context), icon: AppAssets.logout).onPress(widget.logout!), - if (widget.report != null) actionButton(context, t, title: LocaleKeys.feedback.tr(context: context), icon: AppAssets.report_icon).onPress(widget.report!), - if (widget.history != null) actionButton(context, t, title: LocaleKeys.history.tr(context: context), icon: AppAssets.insurance_history_icon).onPress(widget.history!), - if (widget.instructions != null) actionButton(context, t, title: LocaleKeys.instructions.tr(context: context), icon: AppAssets.requests).onPress(widget.instructions!), - if (widget.requests != null) actionButton(context, t, title: LocaleKeys.requests.tr(context: context), icon: AppAssets.insurance_history_icon).onPress(widget.requests!), - if (widget.sendEmail != null) actionButton(context, t, title: LocaleKeys.sendEmail.tr(context: context), icon: AppAssets.email).onPress(widget.sendEmail!), - if (widget.doctorResponse != null) actionButton(context, t, title: LocaleKeys.doctorResponses.tr(context: context), icon: AppAssets.doctorResponseIcon).onPress(widget.doctorResponse!), + if (widget.logout != null) + actionButton(context, t, title: LocaleKeys.logout.tr(context: context), icon: AppAssets.logout).onPress(widget.logout!), + if (widget.report != null) + actionButton(context, t, title: LocaleKeys.feedback.tr(context: context), icon: AppAssets.report_icon).onPress(widget.report!), + if (widget.history != null) + actionButton(context, t, title: LocaleKeys.history.tr(context: context), icon: AppAssets.insurance_history_icon) + .onPress(widget.history!), + if (widget.instructions != null) + actionButton(context, t, title: LocaleKeys.instructions.tr(context: context), icon: AppAssets.requests).onPress(widget.instructions!), + if (widget.requests != null) + actionButton(context, t, title: LocaleKeys.requests.tr(context: context), icon: AppAssets.insurance_history_icon) + .onPress(widget.requests!), + if (widget.sendEmail != null) + actionButton(context, t, title: LocaleKeys.sendEmail.tr(context: context), icon: AppAssets.email).onPress(widget.sendEmail!), + if (widget.doctorResponse != null) + actionButton(context, t, title: LocaleKeys.doctorResponses.tr(context: context), icon: AppAssets.doctorResponseIcon) + .onPress(widget.doctorResponse!), if (widget.search != null) Utils.buildSvgWithAssets(icon: AppAssets.search_icon).onPress(widget.search!), - if (widget.aiOverview != null) actionButton(context, t, title: LocaleKeys.aiOverView.tr(context: context), icon: AppAssets.aiOverView, isAiButton: true).onPress(widget.aiOverview!), + if (widget.aiOverview != null) + actionButton(context, t, title: LocaleKeys.aiOverView.tr(context: context), icon: AppAssets.aiOverView, isAiButton: true) + .onPress(widget.aiOverview!), if (widget.trailing != null) widget.trailing!, ] ], @@ -310,7 +328,8 @@ class _ScrollAnimatedTitleState extends State { child: Container( height: 40.h, padding: EdgeInsets.all(8.w), - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 8.r, side: BorderSide(width: 1, color: AppColors.borderGrayColor)), + decoration: RoundedRectangleBorder().toSmoothCornerDecoration( + color: AppColors.whiteColor, borderRadius: 8.r, side: BorderSide(width: 1, color: AppColors.borderGrayColor)), child: ShaderMask( blendMode: BlendMode.srcIn, shaderCallback: (bounds) => AppColors.aiLinearGradient.createShader(bounds), @@ -345,22 +364,19 @@ class _ScrollAnimatedTitleState extends State { child: Container( height: 40.h, padding: EdgeInsets.all(8.w), - decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.secondaryLightRedColor, - borderRadius: 10.r, - ), + decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: context.secondaryLightRedColor, borderRadius: 10.r), child: Row( crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, mainAxisSize: MainAxisSize.min, spacing: 8.h, children: [ - Utils.buildSvgWithAssets(icon: icon, iconColor: AppColors.primaryRedColor, height: 24.h, width: 24.w), + Utils.buildSvgWithAssets(icon: icon, iconColor: context.secondaryLightRedForegroundColor, height: 24.h, width: 24.w), if (t >= .5) Text( title, style: context.dynamicTextStyle( - color: AppColors.primaryRedColor, + color: context.primaryRedColor, letterSpacing: -0.4, fontSize: (12 - (2 * (1 - t))).f, fontWeight: FontWeight.lerp( diff --git a/lib/widgets/appbar/collapsing_toolbar.dart b/lib/widgets/appbar/collapsing_toolbar.dart index 8bf1e4b4..8baff2f3 100644 --- a/lib/widgets/appbar/collapsing_toolbar.dart +++ b/lib/widgets/appbar/collapsing_toolbar.dart @@ -74,7 +74,7 @@ class _CollapsingToolbarState extends State { expandedHeight = MediaQuery.of(context).size.height * 0.11.h; AppState appState = getIt.get(); return Scaffold( - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, body: // Column( // children: [ @@ -91,7 +91,7 @@ class _CollapsingToolbarState extends State { stretch: true, systemOverlayStyle: SystemUiOverlayStyle(statusBarBrightness: Brightness.light), surfaceTintColor: Colors.transparent, - backgroundColor: AppColors.bgScaffoldColor, + backgroundColor: AppColors.scaffoldBgColor, leading: widget.isLeading ? Transform.flip( flipX: appState.isArabic(), @@ -139,7 +139,7 @@ class _CollapsingToolbarState extends State { FontWeight.w600, t, )!, - color: AppColors.blackColor, + color: AppColors.textColor, letterSpacing: -0.5), ).expanded, if (widget.logout != null) actionButton(context, t, title: LocaleKeys.logout.tr(context: context), icon: AppAssets.logout).onPress(widget.logout!), diff --git a/lib/widgets/bottom_navigation/bottom_navigation.dart b/lib/widgets/bottom_navigation/bottom_navigation.dart index 46067dfe..674f350f 100644 --- a/lib/widgets/bottom_navigation/bottom_navigation.dart +++ b/lib/widgets/bottom_navigation/bottom_navigation.dart @@ -32,27 +32,38 @@ class BottomNavigation extends StatelessWidget { isSpecial: true, ), appState.isAuthenticated - // ? BottomNavItem(icon: AppAssets.toDoBottom, label: LocaleKeys.todoList.tr(context: context)) - ? BottomNavItem(icon: AppAssets.symptomCheckerBottomIcon, fillIcon: AppAssets.symptomCheckerBottomFillIcon, label: LocaleKeys.symptoms.tr(context: context)) + ? BottomNavItem( + icon: AppAssets.symptomCheckerBottomIcon, + fillIcon: AppAssets.symptomCheckerBottomFillIcon, + label: LocaleKeys.symptoms.tr(context: context)) : BottomNavItem(icon: AppAssets.news, fillIcon: AppAssets.newsFill, label: LocaleKeys.news.tr()), BottomNavItem(icon: AppAssets.servicesBottom, fillIcon: AppAssets.servicesBottomFill, label: LocaleKeys.services2.tr(context: context)), ]; return Container( - decoration: _containerDecoration, + decoration: _buildDecoration(context), padding: _containerPadding, - // height: 84.h, child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: List.generate( items.length, - (index) => _buildNavItem(items[index], index), + (index) => _buildNavItem(context, items[index], index), ), ), ); } - Widget _buildNavItem(BottomNavItem item, int index) { + BoxDecoration _buildDecoration(BuildContext context) => BoxDecoration( + color: context.cardBaseColor, + border: Border( + top: BorderSide( + color: context.bottomNAVBorder, + width: 0.5, + ), + ), + ); + + Widget _buildNavItem(BuildContext context, BottomNavItem item, int index) { final bool isSelected = currentIndex == index; return GestureDetector( @@ -69,12 +80,13 @@ class BottomNavigation extends StatelessWidget { icon: isSelected ? item.fillIcon : item.icon, height: item.iconSize.h, width: item.iconSize.w, - // iconColor: isSelected ? Colors.black87 : Colors.black87, + iconColor: isSelected ? context.primaryRedColor : context.iconColor, ), - // const SizedBox(height: 10), SizedBox(height: item.isSpecial ? 0 : 8.h), - item.label.toText11(weight: FontWeight.w500), - // SizedBox(height: item.isSpecial ? 5 : 0) + item.label.toText11( + weight: FontWeight.w500, + color: isSelected ? context.primaryRedColor : context.iconColor, + ), ], ), ), @@ -102,12 +114,3 @@ class BottomNavItem { // Constants const EdgeInsets _containerPadding = EdgeInsets.all(15); -const BoxDecoration _containerDecoration = BoxDecoration( - color: Colors.white, - border: Border( - top: BorderSide( - color: AppColors.bottomNAVBorder, - width: 0.5, - ), - ), -); diff --git a/lib/widgets/bottomsheet/exception_bottom_sheet.dart b/lib/widgets/bottomsheet/exception_bottom_sheet.dart index 16531bdb..15055fc4 100644 --- a/lib/widgets/bottomsheet/exception_bottom_sheet.dart +++ b/lib/widgets/bottomsheet/exception_bottom_sheet.dart @@ -115,7 +115,7 @@ class _ExceptionBottomSheetState extends State { text: LocaleKeys.ok.tr(), onPressed: widget.onOkPressed, backgroundColor: AppColors.primaryRedColor, - borderColor: AppColors.primaryRedBorderColor, + borderColor: AppColors.primaryRedColor, textColor: Colors.white, icon: AppAssets.confirm, ), diff --git a/lib/widgets/bottomsheet/generic_bottom_sheet.dart b/lib/widgets/bottomsheet/generic_bottom_sheet.dart index fd79b7c1..454d3dd8 100644 --- a/lib/widgets/bottomsheet/generic_bottom_sheet.dart +++ b/lib/widgets/bottomsheet/generic_bottom_sheet.dart @@ -86,7 +86,7 @@ class GenericBottomSheetState extends State { child: Container( padding: EdgeInsets.all(24.h), decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: AppColors.bgScaffoldColor, + color: AppColors.scaffoldBgColor, borderRadius: 16.r, customBorder: BorderRadius.only(topLeft: Radius.circular(16.r), topRight: Radius.circular(16.r)), ), diff --git a/lib/widgets/buttons/custom_button.dart b/lib/widgets/buttons/custom_button.dart index 8500ce8e..afa4f351 100644 --- a/lib/widgets/buttons/custom_button.dart +++ b/lib/widgets/buttons/custom_button.dart @@ -25,6 +25,7 @@ class CustomButton extends StatelessWidget { final double? iconSize; final TextOverflow? textOverflow; final BorderSide? borderSide; + final bool isIconOnEnd; const CustomButton({ super.key, @@ -47,6 +48,7 @@ class CustomButton extends StatelessWidget { this.iconSize, this.textOverflow, this.borderSide, + this.isIconOnEnd = false, }); @override @@ -73,11 +75,12 @@ class CustomButton extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, children: [ - if (icon != null) + if (!isIconOnEnd && icon != null) ...[ Padding( padding: text.isNotEmpty ? EdgeInsets.only(right: 4.w, left: 4.w) : EdgeInsets.zero, child: Utils.buildSvgWithAssets(icon: icon!, iconColor: iconColor, isDisabled: isDisabled, width: iconS, height: iconS), ), + ], if (text.isNotEmpty) Text( text, @@ -91,6 +94,12 @@ class CustomButton extends StatelessWidget { fontWeight: fontWeight, ), ), + if (isIconOnEnd && icon != null) ...[ + Padding( + padding: text.isNotEmpty ? EdgeInsets.only(right: 2.w, left: 8.w) : EdgeInsets.zero, + child: Utils.buildSvgWithAssets(icon: icon!, iconColor: iconColor, isDisabled: isDisabled, width: iconS, height: iconS), + ), + ], ], ), )); diff --git a/lib/widgets/chip/app_custom_chip_widget.dart b/lib/widgets/chip/app_custom_chip_widget.dart index 8597b3ed..2d6bf21a 100644 --- a/lib/widgets/chip/app_custom_chip_widget.dart +++ b/lib/widgets/chip/app_custom_chip_widget.dart @@ -9,17 +9,17 @@ class AppCustomChipWidget extends StatelessWidget { const AppCustomChipWidget({ super.key, this.labelText, - this.textColor = AppColors.textColor, + this.textColor = AppColors.iconColor, this.backgroundColor = AppColors.greyColor, this.iconSize, this.icon = "", - this.iconColor = AppColors.textColor, + this.iconColor = AppColors.iconColor, this.richText, this.iconHasColor = true, this.shape, this.deleteIcon, this.deleteIconSize, - this.deleteIconColor = AppColors.textColor, + this.deleteIconColor = AppColors.iconColor, this.deleteIconHasColor = false, this.padding = EdgeInsets.zero, this.isIconPNG = false, @@ -50,6 +50,20 @@ class AppCustomChipWidget extends StatelessWidget { @override Widget build(BuildContext context) { final iconS = iconSize ?? 12.w; + + // Resolve context-aware defaults + final resolvedBg = backgroundColor == AppColors.greyColor ? context.chipBgColor : backgroundColor; + final resolvedText = textColor == AppColors.iconColor ? context.textColor : textColor; + final resolvedIcon = iconColor == AppColors.iconColor ? context.iconColor : iconColor; + final resolvedDeleteIcon = deleteIconColor == AppColors.iconColor ? context.iconColor : deleteIconColor; + final resolvedBorderSide = BorderSide(color: context.cardDarkBorderColor, width: 1); + final resolvedShape = shape ?? + SmoothRectangleBorder( + borderRadius: BorderRadius.circular(8.r), + smoothness: 10, + side: resolvedBorderSide, + ); + return GestureDetector( onTap: onChipTap, child: SizedBox( @@ -57,38 +71,27 @@ class AppCustomChipWidget extends StatelessWidget { data: ChipThemeData( padding: EdgeInsets.zero, shape: SmoothRectangleBorder( - side: BorderSide( - width: 10.w, - color: Colors.transparent, // Crucially, set color to transparent - style: BorderStyle.none, - ), - borderRadius: BorderRadius.circular(8.r), // Apply a border radius of 16.0 + side: resolvedBorderSide, + borderRadius: BorderRadius.circular(8.r), ), ), child: icon.isNotEmpty ? Chip( - avatar: icon.isNotEmpty - ? isIconPNG - ? Image.asset(icon, width: iconS, height: iconS) - : Utils.buildSvgWithAssets( - icon: icon, - width: iconS, - height: iconS, - iconColor: iconHasColor ? iconColor : null, - fit: BoxFit.contain, - ) - : SizedBox.shrink(), - label: richText ?? (labelText?? "").toText10(weight: FontWeight.w500, letterSpacing: 0, color: textColor), + avatar: isIconPNG + ? Image.asset(icon, width: iconS, height: iconS) + : Utils.buildSvgWithAssets( + icon: icon, + width: iconS, + height: iconS, + iconColor: iconHasColor ? resolvedIcon : null, + fit: BoxFit.contain, + ), + label: richText ?? (labelText ?? "").toText10(weight: FontWeight.w500, letterSpacing: 0, color: resolvedText), padding: padding, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, labelPadding: labelPadding ?? EdgeInsetsDirectional.only(end: deleteIcon?.isNotEmpty == true ? 2.w : 8.w), - backgroundColor: backgroundColor, - shape: shape ?? - SmoothRectangleBorder( - borderRadius: BorderRadius.circular(8.r), - smoothness: 10, - side: BorderSide(color: AppColors.transparent, width: 1.5), - ), + backgroundColor: resolvedBg, + shape: resolvedShape, deleteIcon: deleteIcon?.isNotEmpty == true ? InkWell( onTap: onDeleteTap, @@ -96,7 +99,7 @@ class AppCustomChipWidget extends StatelessWidget { icon: deleteIcon!, width: iconS, height: iconS, - iconColor: deleteIconHasColor ? deleteIconColor : null, + iconColor: deleteIconHasColor ? resolvedDeleteIcon : null, ), ) : null, @@ -104,21 +107,21 @@ class AppCustomChipWidget extends StatelessWidget { ) : Chip( materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, - label: richText ?? (labelText?? "").toText10(weight: FontWeight.w500, letterSpacing: 0, color: textColor, isCenter: true), + label: richText ?? (labelText ?? "").toText10(weight: FontWeight.w500, letterSpacing: 0, color: resolvedText, isCenter: true), padding: EdgeInsets.zero, - backgroundColor: backgroundColor, - shape: shape ?? - SmoothRectangleBorder( - borderRadius: BorderRadius.circular(8.r), - smoothness: 10, - side: BorderSide(color: AppColors.transparent, width: 1.5), - ), + backgroundColor: resolvedBg, + shape: resolvedShape, labelPadding: labelPadding ?? EdgeInsetsDirectional.only(start: 6.w, end: deleteIcon?.isNotEmpty == true ? 2.w : 8.w), deleteIcon: deleteIcon?.isNotEmpty == true ? InkWell( onTap: onDeleteTap, child: Utils.buildSvgWithAssets( - icon: deleteIcon!, width: iconS, height: iconS, iconColor: deleteIconHasColor ? deleteIconColor : null)) + icon: deleteIcon!, + width: iconS, + height: iconS, + iconColor: deleteIconHasColor ? resolvedDeleteIcon : null, + ), + ) : null, onDeleted: deleteIcon?.isNotEmpty == true ? () {} : null, ), diff --git a/lib/widgets/date_range_selector/date_range_calender.dart b/lib/widgets/date_range_selector/date_range_calender.dart index 89725f32..bb1f2915 100644 --- a/lib/widgets/date_range_selector/date_range_calender.dart +++ b/lib/widgets/date_range_selector/date_range_calender.dart @@ -199,9 +199,9 @@ class _DateRangeSelectorState extends State { }, backgroundColor: AppColors.lightGreenButtonColor, borderColor: Colors.transparent, - textColor: AppColors.textGreenColor, + textColor: AppColors.successColor, icon: AppAssets.reminder_bell, - iconColor: AppColors.textGreenColor, + iconColor: AppColors.successColor, height: 56.h, ), @@ -237,7 +237,7 @@ class _DateRangeSelectorState extends State { children: [ Utils.buildSvgWithAssets( icon: AppAssets.rangeCalendar, - iconColor: isNotSelected ? AppColors.borderOnlyColor: AppColors.blackColor , + iconColor: isNotSelected ? AppColors.textColor: AppColors.textColor , height: 24, width: 24), Column( @@ -277,8 +277,8 @@ class _DateRangeSelectorState extends State { shape: RoundedRectangleBorder( side: BorderSide( color: model.currentlySelectedRange == Range.WEEKLY - ? AppColors.primaryRedBorderColor - : AppColors.chipBorderColorOpacity20, + ? AppColors.primaryRedColor + : AppColors.borderGrayColor, width: 1, ), borderRadius: BorderRadius.circular(10)), @@ -295,8 +295,8 @@ class _DateRangeSelectorState extends State { shape: RoundedRectangleBorder( side: BorderSide( color: model.currentlySelectedRange == Range.LAST_MONTH - ? AppColors.primaryRedBorderColor - : AppColors.chipBorderColorOpacity20, + ? AppColors.primaryRedColor + : AppColors.borderGrayColor, width: 1, ), borderRadius: BorderRadius.circular(10)), @@ -313,8 +313,8 @@ class _DateRangeSelectorState extends State { shape: RoundedRectangleBorder( side: BorderSide( color: model.currentlySelectedRange == Range.LAST_6MONTH - ? AppColors.primaryRedBorderColor - : AppColors.chipBorderColorOpacity20, + ? AppColors.primaryRedColor + : AppColors.borderGrayColor, width: 1, ), borderRadius: BorderRadius.circular(10)), @@ -332,8 +332,8 @@ class _DateRangeSelectorState extends State { shape: RoundedRectangleBorder( side: BorderSide( color: model.currentlySelectedRange == Range.THIS_YEAR - ? AppColors.primaryRedBorderColor - : AppColors.chipBorderColorOpacity20, + ? AppColors.primaryRedColor + : AppColors.borderGrayColor, width: 1, ), borderRadius: BorderRadius.circular(10)), diff --git a/lib/widgets/dialogs/confirm_dialog.dart b/lib/widgets/dialogs/confirm_dialog.dart index ce597c2d..584c419b 100644 --- a/lib/widgets/dialogs/confirm_dialog.dart +++ b/lib/widgets/dialogs/confirm_dialog.dart @@ -35,13 +35,13 @@ class ConfirmDialog extends StatelessWidget { Expanded( child: Text( title ?? LocaleKeys.confirm.tr(), - style: const TextStyle(fontSize: 24, fontWeight: FontWeight.w600, color: AppColors.blackColor, height: 35 / 24, letterSpacing: -0.96), + style: const TextStyle(fontSize: 24, fontWeight: FontWeight.w600, color: AppColors.textColor, height: 35 / 24, letterSpacing: -0.96), ).paddingOnly(top: 16), ), IconButton( padding: EdgeInsets.zero, icon: const Icon(Icons.close), - color: AppColors.blackColor, + color: AppColors.textColor, constraints: const BoxConstraints(), onPressed: () => onCloseTap ?? Navigator.pop(context), // onPressed: () => Navigator.pop(context), diff --git a/lib/widgets/language_switcher.dart b/lib/widgets/language_switcher.dart index 033eaaff..6a917e1e 100644 --- a/lib/widgets/language_switcher.dart +++ b/lib/widgets/language_switcher.dart @@ -66,8 +66,7 @@ class _LanguageSelectorState extends State { fontSize: 14.f, color: AppColors.primaryRedColor, letterSpacing: 0.1, - isLanguageSwitcher: true, - fontFamily: widget.currentLanguage == 'ar' ? "Poppins" : "GESSTwo"), + fontFamily: widget.currentLanguage == 'ar' ? "Poppins" : "GESSTwo"), ), ], ), diff --git a/lib/widgets/loading_dialog.dart b/lib/widgets/loading_dialog.dart index dc860b58..92296555 100644 --- a/lib/widgets/loading_dialog.dart +++ b/lib/widgets/loading_dialog.dart @@ -46,7 +46,7 @@ class _LoadingDialogState extends State { children: [ Lottie.asset('assets/json/loading_animation.json', repeat: true, reverse: false, frameRate: FrameRate(60)), 24.height, - LocaleKeys.loadingText.tr(context: context).toText16(color: AppColors.blackColor) + LocaleKeys.loadingText.tr(context: context).toText16(color: AppColors.textColor) ], ), ), diff --git a/lib/widgets/map/location_map_widget.dart b/lib/widgets/map/location_map_widget.dart index e3139a93..533724e4 100644 --- a/lib/widgets/map/location_map_widget.dart +++ b/lib/widgets/map/location_map_widget.dart @@ -92,7 +92,7 @@ class LocationMapWidget extends StatelessWidget { style: TextStyle( fontSize: 16.f, fontWeight: FontWeight.w700, - color: AppColors.blackColor, + color: AppColors.textColor, letterSpacing: -0.5, ), ), @@ -109,7 +109,7 @@ class LocationMapWidget extends StatelessWidget { style: TextStyle( fontSize: 14.f, fontWeight: FontWeight.w500, - color: AppColors.blackColor, + color: AppColors.textColor, letterSpacing: -0.4, ), maxLines: 2, @@ -135,7 +135,7 @@ class LocationMapWidget extends StatelessWidget { return Container( height: 165.h, decoration: BoxDecoration( - color: AppColors.bgScaffoldColor, + color: AppColors.scaffoldBgColor, borderRadius: BorderRadius.circular(24.r), ), child: Center( @@ -149,7 +149,7 @@ class LocationMapWidget extends StatelessWidget { return Container( height: 165.h, decoration: BoxDecoration( - color: AppColors.bgScaffoldColor, + color: AppColors.scaffoldBgColor, borderRadius: BorderRadius.circular(24.r), ), child: Center( diff --git a/lib/widgets/order_tracking/request_tracking.dart b/lib/widgets/order_tracking/request_tracking.dart index f07c0b19..8d994769 100644 --- a/lib/widgets/order_tracking/request_tracking.dart +++ b/lib/widgets/order_tracking/request_tracking.dart @@ -38,7 +38,7 @@ class OrderTrackingWidget extends StatelessWidget { if (index == 0) { return StepperWidget(widthOfOneState, AppColors.primaryRedColor, true, height); } else { - return StepperWidget(widthOfOneState, AppColors.greyLightColor, false, height); + return StepperWidget(widthOfOneState, AppColors.greyColor, false, height); } })); } @@ -49,7 +49,7 @@ class OrderTrackingWidget extends StatelessWidget { if(index == 0) { return StepperWidget(widthOfOneState, AppColors.primaryRedColor, true, height); } else { - return StepperWidget(widthOfOneState, AppColors.greyLightColor, false, height); + return StepperWidget(widthOfOneState, AppColors.greyColor, false, height); } }) ); @@ -60,7 +60,7 @@ class OrderTrackingWidget extends StatelessWidget { if(index == 1 || index == 0) { return StepperWidget(widthOfOneState, AppColors.primaryRedColor, index == 1, height ); } else { - return StepperWidget(widthOfOneState, AppColors.greyLightColor, false, height); + return StepperWidget(widthOfOneState, AppColors.greyColor, false, height); } }) ); @@ -70,7 +70,7 @@ class OrderTrackingWidget extends StatelessWidget { if(index == 2 || index == 1 || index == 0) { return StepperWidget(widthOfOneState, AppColors.primaryRedColor, index == 2, height); } else { - return StepperWidget(widthOfOneState, AppColors.greyLightColor, false, height); + return StepperWidget(widthOfOneState, AppColors.greyColor, false, height); } }) ); @@ -78,7 +78,7 @@ class OrderTrackingWidget extends StatelessWidget { return Row( children: List.generate(4, (index){ // if(index == 3) { - return StepperWidget(widthOfOneState, AppColors.successLightColor, index == 3, height); + return StepperWidget(widthOfOneState, AppColors.successColor, index == 3, height); // } else { // return oneProgressBar(widthOfOneState, AppColors.greyLightColor, false); // } diff --git a/pubspec.yaml b/pubspec.yaml index c4b1e51a..b1f669b9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -106,7 +106,7 @@ dev_dependencies: flutter: uses-material-design: true - assets: + assets: - assets/ - assets/json/ - assets/fonts/