From f46b3f745f60bd2dbf778b5a31a0bbe6aed10016 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Thu, 5 Mar 2026 16:22:08 +0300 Subject: [PATCH] Dark mode enabled --- assets/images/svg/dark_mode_icon.svg | 3 + assets/langs/ar-SA.json | 3 +- assets/langs/en-US.json | 3 +- lib/core/api/api_client.dart | 2 +- lib/core/app_assets.dart | 1 + lib/core/utils/utils.dart | 14 +- lib/extensions/string_extensions.dart | 4 +- lib/extensions/widget_extensions.dart | 14 +- .../models/ui_models/vital_sign_ui_model.dart | 2 +- .../profile_settings_view_model.dart | 12 +- lib/generated/locale_keys.g.dart | 3 +- lib/main.dart | 49 ++- .../active_medication_page.dart | 10 +- .../allergies/allergies_list_page.dart | 4 +- .../appointment_details_page.dart | 26 +- .../appointment_payment_page.dart | 1 + .../widgets/appointment_card.dart | 6 +- .../widgets/appointment_doctor_card.dart | 6 +- .../hospital_list_items.dart | 1 + .../region_bottomsheet/region_list_item.dart | 1 + .../region_list_widget.dart | 5 +- .../widgets/ask_doctor_appointment_card.dart | 2 +- lib/presentation/authentication/register.dart | 2 +- .../authentication/register_step2.dart | 2 +- .../book_appointment_page.dart | 42 +- .../doctor_filter/doctors_filter.dart | 2 +- .../book_appointment/doctor_profile_page.dart | 6 +- .../immediate_livecare_payment_details.dart | 2 +- .../immediate_livecare_payment_page.dart | 1 + .../widgets/select_livecare_call_type.dart | 2 +- .../review_appointment_page.dart | 2 +- .../waiting_appointment_payment_page.dart | 1 + .../widgets/appointment_calendar.dart | 8 +- .../book_appointment/widgets/clinic_card.dart | 2 +- .../book_appointment/widgets/doctor_card.dart | 2 +- .../widgets/doctor_rating_details.dart | 20 +- .../contact_us/live_chat_page.dart | 6 +- .../contact_us/widgets/find_us_item_card.dart | 4 +- .../covid19test/covid_payment_screen.dart | 1 + .../e_referral/new_e_referral.dart | 2 +- .../e_referral/widget/e-referral_otp.dart | 3 +- .../widget/e_referral_requester_form.dart | 7 +- .../RRT/rrt_request_type_select.dart | 2 +- .../call_ambulance/call_ambulance_page.dart | 2 +- .../widgets/type_selection_widget.dart | 2 + .../emergency_services_page.dart | 34 +- .../er_online_checkin_payment_page.dart | 1 + .../widget/ambulance_history_item.dart | 2 +- .../history/widget/rrt_item.dart | 2 +- .../widgets/nearestERItem.dart | 2 +- .../habib_wallet/recharge_wallet_page.dart | 10 +- .../wallet_payment_confirm_page.dart | 5 +- .../widgets/hospital_list_item.dart | 1 + .../health_calculators_page.dart | 20 +- .../widgets/bf.dart | 20 +- .../widgets/bmi.dart | 8 +- .../widgets/bmr.dart | 18 +- .../widgets/calories.dart | 18 +- .../widgets/crabs.dart | 8 +- .../widgets/ibw.dart | 12 +- .../widgets/ovulation.dart | 4 +- .../add_health_tracker_entry_page.dart | 2 +- .../health_trackers/health_trackers_page.dart | 2 +- .../hmg_services/services_page.dart | 4 +- .../hmg_services/services_view.dart | 1 + .../home/data/landing_page_data.dart | 11 +- .../home/data/service_card_data.dart | 10 +- .../home/widgets/habib_wallet_card.dart | 4 +- .../home/widgets/large_service_card.dart | 5 +- .../home/widgets/small_service_card.dart | 27 +- .../home_health_care/hhc_procedures_page.dart | 2 +- .../LabResultByClinic.dart | 6 +- .../ai_analysis_widget.dart | 8 +- .../lab_ai_analysis_detailed_page.dart | 2 +- lib/presentation/lab/search_lab_report.dart | 5 +- .../medical_file/medical_file_page.dart | 60 +-- .../medical_file/widgets/lab_rad_card.dart | 1 + .../widgets/medical_file_card.dart | 2 +- .../widgets/patient_sick_leave_card.dart | 6 +- .../medical_report/medical_reports_page.dart | 4 +- .../monthly_report/monthly_report.dart | 2 +- .../widgets/invoice_list_card.dart | 2 +- .../prescription_detail_page.dart | 4 +- .../prescriptions/prescription_item_view.dart | 2 +- .../profile_settings/profile_settings.dart | 42 +- .../radiology/radiology_result_page.dart | 8 +- .../radiology/search_radiology.dart | 5 +- .../smartwatches/widgets/health_chart.dart | 2 +- .../possible_conditions_screen.dart | 2 +- .../symptoms_checker/risk_factors_screen.dart | 2 +- .../symptoms_checker/suggestions_screen.dart | 2 +- .../symptoms_selector_screen.dart | 2 +- .../symptoms_checker/triage_screen.dart | 2 +- .../widgets/organ_dot_widget.dart | 2 +- .../ancillary_order_payment_page.dart | 1 + .../ancillary_procedures_details_page.dart | 2 +- .../water_monitor/water_consumption_page.dart | 2 +- .../water_monitor_settings_page.dart | 2 +- lib/theme/app_theme.dart | 53 ++- lib/theme/colors.dart | 408 +++++++++++++----- lib/widgets/appbar/app_bar_widget.dart | 2 +- lib/widgets/appbar/collapsing_toolbar.dart | 2 +- lib/widgets/arrow_back.dart | 7 +- .../bottom_navigation/bottom_navigation.dart | 28 +- lib/widgets/bottom_sheet.dart | 5 +- lib/widgets/buttons/default_button.dart | 3 +- lib/widgets/chip/app_custom_chip_widget.dart | 32 +- lib/widgets/chip/custom_selectable_chip.dart | 7 +- lib/widgets/common_bottom_sheet.dart | 9 +- lib/widgets/countdown_timer.dart | 3 +- lib/widgets/custom_tab_bar.dart | 32 +- .../date_range_calender.dart | 8 +- lib/widgets/datepicker_widget.dart | 2 +- lib/widgets/dialogs/confirm_dialog.dart | 4 +- .../dropdown/country_dropdown_widget.dart | 4 +- lib/widgets/dropdown/dropdown_widget.dart | 12 +- lib/widgets/expandable_list_widget.dart | 11 +- .../family_files/family_file_add_widget.dart | 2 +- lib/widgets/graph/custom_graph.dart | 39 +- lib/widgets/image_picker.dart | 7 +- lib/widgets/input_widget.dart | 4 +- lib/widgets/loader/bottomsheet_loader.dart | 5 +- lib/widgets/map/map_utility_screen.dart | 2 +- lib/widgets/nfc/nfc_reader_sheet.dart | 2 +- 124 files changed, 823 insertions(+), 578 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..f3a03f1c --- /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..0886f376 100644 --- a/assets/langs/ar-SA.json +++ b/assets/langs/ar-SA.json @@ -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..294201db 100644 --- a/assets/langs/en-US.json +++ b/assets/langs/en-US.json @@ -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/lib/core/api/api_client.dart b/lib/core/api/api_client.dart index f9c44e76..106b8fd4 100644 --- a/lib/core/api/api_client.dart +++ b/lib/core/api/api_client.dart @@ -195,7 +195,7 @@ class ApiClientImp implements ApiClient { } // body['TokenID'] = "@dm!n"; - // body['PatientID'] = 4773922; + // body['PatientID'] = 4772997; // body['PatientTypeID'] = 1; // body['PatientOutSA'] = 0; // body['SessionID'] = "45786230487560q"; 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/utils/utils.dart b/lib/core/utils/utils.dart index 8b5b2849..0d600bd7 100644 --- a/lib/core/utils/utils.dart +++ b/lib/core/utils/utils.dart @@ -664,10 +664,12 @@ class Utils { double width = 24, double height = 24, BoxFit fit = BoxFit.cover, + bool applyThemeColor = true, }) { + final Color? resolvedColor = iconColor ?? (applyThemeColor && AppColors.isDarkMode ? AppColors.textColor : null); return SvgPicture.asset( icon, - colorFilter: iconColor != null ? ColorFilter.mode(isDisabled ? iconColor.withOpacity(0.5) : iconColor, BlendMode.srcIn) : null, + colorFilter: resolvedColor != null ? ColorFilter.mode(isDisabled ? resolvedColor.withOpacity(0.5) : resolvedColor, BlendMode.srcIn) : null, width: width, height: height, fit: fit, @@ -801,11 +803,13 @@ class Utils { double? fontSize, double? letterSpacing, FontWeight? fontWeight, - Color iconColor = AppColors.textColor, - Color textColor = AppColors.blackColor, + Color? iconColor, + Color? textColor, bool isSaudiCurrency = true, bool isExpanded = true, }) { + final resolvedIconColor = iconColor ?? AppColors.textColor; + final resolvedTextColor = textColor ?? AppColors.blackColor; return RichText( maxLines: 1, text: TextSpan( @@ -813,13 +817,13 @@ class Utils { WidgetSpan( alignment: PlaceholderAlignment.baseline, baseline: TextBaseline.alphabetic, - child: Utils.buildSvgWithAssets(icon: AppAssets.saudi_riyal_icon, width: iconSize.h, height: iconSize.h, iconColor: iconColor), + child: Utils.buildSvgWithAssets(icon: AppAssets.saudi_riyal_icon, width: iconSize.h, height: iconSize.h, iconColor: resolvedIconColor), ), TextSpan( // text: NumberFormat.currency(locale: 'en_US', symbol: " ", decimalDigits: 0).format(habibWalletAmount), text: " ${habibWalletAmount.toStringAsFixed(2)}", style: TextStyle( - color: textColor, + color: resolvedTextColor, fontSize: fontSize ?? 32.f, letterSpacing: letterSpacing ?? -4, fontFamily: "Poppins", diff --git a/lib/extensions/string_extensions.dart b/lib/extensions/string_extensions.dart index 792bff50..ba646cd2 100644 --- a/lib/extensions/string_extensions.dart +++ b/lib/extensions/string_extensions.dart @@ -234,7 +234,7 @@ extension EmailValidator on String { TextOverflow? textOverflow, String? fontFamily, double? letterSpacing = -0.4, - Color decorationColor = AppColors.errorColor}) => + Color? decorationColor}) => Text( this, maxLines: maxlines, @@ -249,7 +249,7 @@ extension EmailValidator on String { fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal), decoration: isUnderLine ? TextDecoration.underline : null, fontFamily: fontFamily ?? (isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'), - decorationColor: decorationColor), + decorationColor: decorationColor ?? AppColors.errorColor), ); Widget toText17({bool isEnglishOnly = false, Color? color, bool isBold = false, bool isCenter = false}) => Text( diff --git a/lib/extensions/widget_extensions.dart b/lib/extensions/widget_extensions.dart index 58754dc9..64672f5f 100644 --- a/lib/extensions/widget_extensions.dart +++ b/lib/extensions/widget_extensions.dart @@ -28,10 +28,10 @@ extension WidgetExtensions on Widget { Widget toShimmer({bool isShow = true, bool isTransparent = false}) => isShow ? Shimmer.fromColors( - baseColor: Color(0xffb9bebe), - highlightColor: Colors.white, + baseColor: AppColors.shimmerBaseColor, + highlightColor: AppColors.shimmerHighlightColor, child: Container( - color: isTransparent ? Colors.transparent : Colors.white.withOpacity(0.3), + color: isTransparent ? Colors.transparent : AppColors.whiteColor.withOpacity(0.3), child: this, ), ) @@ -41,14 +41,14 @@ extension WidgetExtensions on Widget { Widget toShimmer2({bool isShow = true, double radius = 20, double? width, double? height}) => isShow ? Shimmer.fromColors( - baseColor: const Color(0xffe8eff0), - highlightColor: Colors.white, + baseColor: AppColors.shimmerBaseColor, + highlightColor: AppColors.shimmerHighlightColor, child: ClipRRect( borderRadius: BorderRadius.circular(radius), child: Container( width: width, height: height, - color: Colors.white, + color: AppColors.whiteColor, child: this, ), ), @@ -69,7 +69,7 @@ extension WidgetExtensions on Widget { return Container( padding: disablePadding ? EdgeInsets.zero : const EdgeInsets.only(top: 15, bottom: 15, left: 14, right: 14), decoration: BoxDecoration( - color: Colors.white, + color: AppColors.whiteColor, borderRadius: BorderRadius.circular(radius), boxShadow: [ BoxShadow( 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..328ffc93 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 @@ -40,7 +40,7 @@ class VitalSignUiModel { } if (s.contains('high')) { - return const VitalSignUiModel( + return VitalSignUiModel( iconBg: AppColors.chipSecondaryLightRedColor, iconFg: AppColors.primaryRedColor, chipBg: AppColors.chipSecondaryLightRedColor, diff --git a/lib/features/profile_settings/profile_settings_view_model.dart b/lib/features/profile_settings/profile_settings_view_model.dart index 61acb260..2f788c69 100644 --- a/lib/features/profile_settings/profile_settings_view_model.dart +++ b/lib/features/profile_settings/profile_settings_view_model.dart @@ -1,8 +1,18 @@ import 'package:flutter/foundation.dart'; +import 'package:hmg_patient_app_new/theme/colors.dart'; class ProfileSettingsViewModel extends ChangeNotifier { + bool _isDarkMode = false; - void notify(){ + bool get isDarkMode => _isDarkMode; + + void toggleDarkMode(bool value) { + _isDarkMode = value; + AppColors.isDarkMode = value; + notifyListeners(); + } + + void notify() { notifyListeners(); } } diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart index 78d7f8a3..58639f9c 100644 --- a/lib/generated/locale_keys.g.dart +++ b/lib/generated/locale_keys.g.dart @@ -1573,7 +1573,8 @@ abstract class LocaleKeys { static const invalidEligibility = 'invalidEligibility'; static const invalidInsurance = 'invalidInsurance'; static const continueCash = 'continueCash'; + static const timeFor = 'timeFor'; 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..023404a6 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -62,6 +62,9 @@ Future _firebaseMessagingBackgroundHandler(RemoteMessage message) async { getIt.get().logInfo("Firebase backgroundMessageHandler Main!!!"); } +// flutter3_32 pub run easy_localization:generate -O ./lib/generated -f keys -o locale_keys.g.dart --source-dir ./assets/langs + + class MyHttpOverrides extends HttpOverrides { @override HttpClient createHttpClient(SecurityContext? context) { @@ -247,27 +250,35 @@ class MyApp extends StatelessWidget { 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!, + return Consumer( + builder: (context, profileVm, _) { + final isArabic = EasyLocalization.of(context)?.locale.languageCode == "ar"; + return MaterialApp( + key: ValueKey('app_theme_${profileVm.isDarkMode}'), + // title: 'Dr. AlHabib', + 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 cb114cd4..ae46d402 100644 --- a/lib/presentation/active_medication/active_medication_page.dart +++ b/lib/presentation/active_medication/active_medication_page.dart @@ -171,7 +171,7 @@ class _ActiveMedicationPageState extends State { offset: const Offset(0, -4), child: Text( _getSuffix(selectedDate.day), - style: const TextStyle( + style: TextStyle( fontSize: 12, color: AppColors.textColor, fontWeight: FontWeight.w500, @@ -181,7 +181,7 @@ class _ActiveMedicationPageState extends State { ), TextSpan( text: " ${DateFormat.MMMM().format(selectedDate)}", - style: const TextStyle( + style: TextStyle( color: AppColors.textColor, fontSize: 16, fontWeight: FontWeight.w500, @@ -278,7 +278,7 @@ class _ActiveMedicationPageState extends State { ), ], ).paddingOnly(left: 16, right: 16), - const Divider( + Divider( color: AppColors.greyColor), GestureDetector( onTap: () => showDoseDialog(med), @@ -330,7 +330,7 @@ class _ActiveMedicationPageState extends State { ], ).paddingAll(16), ), - const Divider( + Divider( color: AppColors.greyColor), _buildButtons(), ], @@ -657,7 +657,7 @@ class _ActiveMedicationPageState extends State { builder: (_) => Container( width: double.infinity, height: 460.h, - decoration: const BoxDecoration( + decoration: BoxDecoration( color: AppColors.bottomSheetBgColor, borderRadius: BorderRadius.only( topLeft: Radius.circular(24), diff --git a/lib/presentation/allergies/allergies_list_page.dart b/lib/presentation/allergies/allergies_list_page.dart index adb63f02..06ae2713 100644 --- a/lib/presentation/allergies/allergies_list_page.dart +++ b/lib/presentation/allergies/allergies_list_page.dart @@ -56,7 +56,7 @@ class AllergiesListPage extends StatelessWidget { Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.allergy_info_icon, width: 36.w, height: 36.h, fit: BoxFit.contain).toShimmer2(isShow: true), + Utils.buildSvgWithAssets(icon: AppAssets.allergy_info_icon, width: 36.w, height: 36.h, fit: BoxFit.contain, applyThemeColor: false).toShimmer2(isShow: true), SizedBox(width: 16.h), Expanded( child: Column( @@ -100,7 +100,7 @@ class AllergiesListPage extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.allergy_info_icon, width: 36.w, height: 36.h, fit: BoxFit.contain), + Utils.buildSvgWithAssets(icon: AppAssets.allergy_info_icon, width: 36.w, height: 36.h, fit: BoxFit.contain, applyThemeColor: false), SizedBox(height: 16.h), Row( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/presentation/appointments/appointment_details_page.dart b/lib/presentation/appointments/appointment_details_page.dart index e5961e30..cafb740e 100644 --- a/lib/presentation/appointments/appointment_details_page.dart +++ b/lib/presentation/appointments/appointment_details_page.dart @@ -241,13 +241,13 @@ class _AppointmentDetailsPageState extends State { }, backgroundColor: AppColors.successColor, borderColor: AppColors.successColor, - textColor: AppColors.whiteColor, + textColor: Colors.white, fontSize: 14.f, fontWeight: FontWeight.w500, borderRadius: 12.r, height: 40.h, icon: AppAssets.confirm_appointment_icon, - iconColor: AppColors.whiteColor, + iconColor: Colors.white, iconSize: 16.h, ) : SizedBox.shrink()) @@ -305,16 +305,16 @@ class _AppointmentDetailsPageState extends State { } }, text: LocaleKeys.getDirections.tr(context: context), - backgroundColor: AppColors.textColor.withValues(alpha: 0.8), + backgroundColor: AppColors.bookAppointment.withValues(alpha: 0.8), borderColor: AppointmentType.getNextActionButtonColor(widget.patientAppointmentHistoryResponseModel.nextAction).withValues(alpha: 0.01), - textColor: AppColors.whiteColor, + textColor: Colors.white, fontSize: 14.f, fontWeight: FontWeight.w500, borderRadius: 12.r, padding: EdgeInsets.symmetric(horizontal: 10.w), height: 40.h, icon: AppAssets.directions_icon, - iconColor: AppColors.whiteColor, + iconColor: Colors.white, iconSize: 14.h, ).paddingAll(12.h), ), @@ -353,7 +353,7 @@ class _AppointmentDetailsPageState extends State { child: Row( mainAxisSize: MainAxisSize.max, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.prescription_reminder_icon, width: 35.h, height: 35.h), + Utils.buildSvgWithAssets(icon: AppAssets.prescription_reminder_icon, width: 35.h, height: 35.h, applyThemeColor: false), SizedBox(width: 8.h), Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -841,15 +841,15 @@ class _AppointmentDetailsPageState extends State { }, backgroundColor: AppColors.successColor, borderColor: AppColors.successColor, - textColor: AppColors.whiteColor, - fontSize: 16.f, + textColor: Colors.white, + fontSize: 16.f, fontWeight: FontWeight.w500, borderRadius: 12.r, padding: EdgeInsets.symmetric(horizontal: 10.w), height: 50.h, icon: AppAssets.add_icon, - iconColor: AppColors.whiteColor, - iconSize: 18.h, + iconColor: Colors.white, + iconSize: 18.h, ).paddingSymmetrical(16.h, 24.h) : SizedBox.shrink() : CustomButton( @@ -860,14 +860,14 @@ class _AppointmentDetailsPageState extends State { backgroundColor: AppointmentType.getNextActionButtonColor(widget.patientAppointmentHistoryResponseModel.nextAction), borderColor: AppointmentType.getNextActionButtonColor(widget.patientAppointmentHistoryResponseModel.nextAction).withOpacity(0.01), - textColor: widget.patientAppointmentHistoryResponseModel.nextAction == 15 ? AppColors.textColor : AppColors.whiteColor, + textColor: widget.patientAppointmentHistoryResponseModel.nextAction == 15 ? AppColors.textColor : Colors.white, fontSize: 16.f, fontWeight: FontWeight.w500, borderRadius: 12.r, padding: EdgeInsets.symmetric(horizontal: 10.w), height: 56.h, icon: AppointmentType.getNextActionIcon(widget.patientAppointmentHistoryResponseModel.nextAction), - iconColor: AppColors.whiteColor, + iconColor: Colors.white, iconSize: 18.h, ).paddingSymmetrical(16.h, 24.h), ], @@ -904,7 +904,7 @@ class _AppointmentDetailsPageState extends State { }, backgroundColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor, - textColor: AppColors.whiteColor, + textColor: Colors.white, fontSize: 16.f, fontWeight: FontWeight.w500, borderRadius: 12.r, diff --git a/lib/presentation/appointments/appointment_payment_page.dart b/lib/presentation/appointments/appointment_payment_page.dart index e70ddf49..d762f795 100644 --- a/lib/presentation/appointments/appointment_payment_page.dart +++ b/lib/presentation/appointments/appointment_payment_page.dart @@ -318,6 +318,7 @@ class _AppointmentPaymentPageState extends State { width: 200.h, height: 80.h, fit: BoxFit.contain, + applyThemeColor: false ).paddingSymmetrical(24.h, 0.h).onPress(() { // payfortVM.setIsApplePayConfigurationLoading(true); if (Utils.havePrivilege(103)) { diff --git a/lib/presentation/appointments/widgets/appointment_card.dart b/lib/presentation/appointments/widgets/appointment_card.dart index 971e9ca8..89a18bf5 100644 --- a/lib/presentation/appointments/widgets/appointment_card.dart +++ b/lib/presentation/appointments/widgets/appointment_card.dart @@ -96,10 +96,10 @@ 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), + iconColor: isLoading ? AppColors.textColor : (isLiveCare ? Colors.white : 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), + textColor: isLoading ? AppColors.textColor : (isLiveCare ? Colors.white : AppColors.textColor), ).toShimmer2(isShow: isLoading), AppCustomChipWidget( labelText: @@ -145,7 +145,7 @@ class AppointmentCard extends StatelessWidget { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h), + Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h, iconColor: AppColors.ratingColorYellow), SizedBox(height: 2.h), (isFoldable || isTablet) ? "${patientAppointmentHistoryResponseModel.decimalDoctorRate}".toText9(isBold: true, color: AppColors.textColor) diff --git a/lib/presentation/appointments/widgets/appointment_doctor_card.dart b/lib/presentation/appointments/widgets/appointment_doctor_card.dart index 467ba640..298e8732 100644 --- a/lib/presentation/appointments/widgets/appointment_doctor_card.dart +++ b/lib/presentation/appointments/widgets/appointment_doctor_card.dart @@ -68,7 +68,7 @@ class AppointmentDoctorCard extends StatelessWidget { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h), + Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h, iconColor: AppColors.ratingColorYellow), SizedBox(height: 2.h), "${patientAppointmentHistoryResponseModel.decimalDoctorRate ?? 0.0}".toText11(isBold: true, color: AppColors.textColor), ], @@ -115,13 +115,13 @@ class AppointmentDoctorCard extends StatelessWidget { icon: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppAssets.walkin_appointment_icon : AppAssets.small_livecare_icon, - iconColor: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.textColor : AppColors.whiteColor, + iconColor: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.textColor : Colors.white, labelText: patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? LocaleKeys.livecare.tr(context: context) : LocaleKeys.walkin.tr(context: context), backgroundColor: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.greyColor : AppColors.successColor, - textColor: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.textColor : AppColors.whiteColor, + textColor: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.textColor : Colors.white, ), ], ), 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..b0a717b7 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 @@ -56,6 +56,7 @@ class HospitalListItem extends StatelessWidget { children: [ Utils.buildSvgWithAssets( icon: (hospitalData?.isHMC == true) ? AppAssets.hmc : AppAssets.hmg, + applyThemeColor: false, ).paddingOnly(right: 10), Expanded( child: Text( 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..99f31be6 100644 --- a/lib/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart +++ b/lib/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart @@ -63,6 +63,7 @@ class RegionListItem extends StatelessWidget { iconSize: 14.h, icon: svgPath, iconHasColor: false, + applyThemeColor: false, richText: RichText( text: TextSpan( text: count, diff --git a/lib/presentation/appointments/widgets/region_bottomsheet/region_list_widget.dart b/lib/presentation/appointments/widgets/region_bottomsheet/region_list_widget.dart index 6588c2ea..fad96965 100644 --- a/lib/presentation/appointments/widgets/region_bottomsheet/region_list_widget.dart +++ b/lib/presentation/appointments/widgets/region_bottomsheet/region_list_widget.dart @@ -7,6 +7,7 @@ import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart'; import 'package:hmg_patient_app_new/features/my_appointments/appointment_via_region_viewmodel.dart'; import 'package:hmg_patient_app_new/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart' show RegionListItem; +import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:provider/provider.dart'; import '../../../../widgets/common_bottom_sheet.dart'; @@ -52,8 +53,8 @@ class _RegionBottomSheetBodyState extends State { if (myAppointmentsVM.isRegionListLoading) { return Container( height: MediaQuery.of(context).size.height * 0.3, - decoration: const BoxDecoration( - color: Colors.white, + decoration: BoxDecoration( + color: AppColors.whiteColor, borderRadius: BorderRadius.vertical(top: Radius.circular(16)), ), child: Center( diff --git a/lib/presentation/ask_doctor/widgets/ask_doctor_appointment_card.dart b/lib/presentation/ask_doctor/widgets/ask_doctor_appointment_card.dart index 4ff24c7a..e4185e72 100644 --- a/lib/presentation/ask_doctor/widgets/ask_doctor_appointment_card.dart +++ b/lib/presentation/ask_doctor/widgets/ask_doctor_appointment_card.dart @@ -109,7 +109,7 @@ class AskDoctorAppointmentCard extends StatelessWidget { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h), + Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h, applyThemeColor: false), SizedBox(height: 2.h), "${askDoctorAppointmentHistoryList.decimalDoctorRate}".toText11(isBold: true, color: AppColors.textColor), ], diff --git a/lib/presentation/authentication/register.dart b/lib/presentation/authentication/register.dart index 2a26a726..9d67920f 100644 --- a/lib/presentation/authentication/register.dart +++ b/lib/presentation/authentication/register.dart @@ -85,7 +85,7 @@ class _RegisterNew extends State { Directionality( textDirection: Directionality.of(context), child: Container( - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(24)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(24)), padding: EdgeInsets.symmetric(horizontal: 16.h), child: Column( children: [ diff --git a/lib/presentation/authentication/register_step2.dart b/lib/presentation/authentication/register_step2.dart index c4bdf0f9..f4968850 100644 --- a/lib/presentation/authentication/register_step2.dart +++ b/lib/presentation/authentication/register_step2.dart @@ -76,7 +76,7 @@ class _RegisterNew extends State { LocaleKeys.personalDetailsVerification.tr(context: context).toText26(color: AppColors.textColor, weight: FontWeight.w600, letterSpacing: -2), SizedBox(height: 24.h), Container( - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(24)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(24)), padding: EdgeInsets.only(left: 16.h, right: 16.h), child: Column( children: [ diff --git a/lib/presentation/book_appointment/book_appointment_page.dart b/lib/presentation/book_appointment/book_appointment_page.dart index 03de8332..ab548449 100644 --- a/lib/presentation/book_appointment/book_appointment_page.dart +++ b/lib/presentation/book_appointment/book_appointment_page.dart @@ -230,7 +230,7 @@ class _BookAppointmentPageState extends State { children: [ Row( children: [ - Utils.buildSvgWithAssets(icon: AppAssets.search_by_clinic_icon, width: 40.h, height: 40.h), + Utils.buildSvgWithAssets(icon: AppAssets.search_by_clinic_icon, width: 40.h, height: 40.h, applyThemeColor: false), SizedBox(width: 12.h), Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -262,7 +262,7 @@ class _BookAppointmentPageState extends State { children: [ Row( children: [ - Utils.buildSvgWithAssets(icon: AppAssets.search_by_doctor_icon, width: 40.h, height: 40.h), + Utils.buildSvgWithAssets(icon: AppAssets.search_by_doctor_icon, width: 40.h, height: 40.h, applyThemeColor: false), SizedBox(width: 12.h), Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -292,7 +292,7 @@ class _BookAppointmentPageState extends State { children: [ Row( children: [ - Utils.buildSvgWithAssets(icon: AppAssets.search_by_region_icon, width: 40.h, height: 40.h), + Utils.buildSvgWithAssets(icon: AppAssets.search_by_region_icon, width: 40.h, height: 40.h, applyThemeColor: false), SizedBox(width: 12.h), Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -336,9 +336,9 @@ class _BookAppointmentPageState extends State { children: [ Row( children: [ - Utils.buildSvgWithAssets(icon: AppAssets.search_by_clinic_icon, width: 40.h, height: 40.h), - SizedBox(width: 12.h), - Column( + Utils.buildSvgWithAssets(icon: AppAssets.search_by_clinic_icon, width: 40.h, height: 40.h, applyThemeColor: false), + SizedBox(width: 12.h), + Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ LocaleKeys.immediateConsultation.tr(context: context).toText14(color: AppColors.textColor, weight: FontWeight.w500), @@ -378,9 +378,9 @@ class _BookAppointmentPageState extends State { children: [ Row( children: [ - Utils.buildSvgWithAssets(icon: AppAssets.search_by_doctor_icon, width: 40.h, height: 40.h), - SizedBox(width: 12.h), - Column( + Utils.buildSvgWithAssets(icon: AppAssets.search_by_doctor_icon, width: 40.h, height: 40.h, applyThemeColor: false), + SizedBox(width: 12.h), + Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ LocaleKeys.scheduledConsultation.tr(context: context).toText14(color: AppColors.textColor, weight: FontWeight.w500), @@ -400,30 +400,6 @@ class _BookAppointmentPageState extends State { ), ); }), - // SizedBox(height: 16.h), - // Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.1), height: 1.h), - // SizedBox(height: 16.h), - // Row( - // mainAxisAlignment: MainAxisAlignment.spaceBetween, - // children: [ - // Row( - // children: [ - // Utils.buildSvgWithAssets(icon: AppAssets.search_by_region_icon, width: 40.h, height: 40.h), - // SizedBox(width: 12.h), - // Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // LocaleKeys.pharmaLiveCare.tr(context: context).toText14(color: AppColors.textColor, weight: FontWeight.w500), - // "".toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500), - // ], - // ), - // ], - // ), - // Transform.flip(flipX: appState.isArabic(), child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.textColor, width: 40.h, height: 40.h)), - // ], - // ).onPress(() { - // openRegionListBottomSheet(context, RegionBottomSheetType.FOR_REGION); - // }), ], ), ), diff --git a/lib/presentation/book_appointment/doctor_filter/doctors_filter.dart b/lib/presentation/book_appointment/doctor_filter/doctors_filter.dart index d9aa9e5e..9cfcc1f8 100644 --- a/lib/presentation/book_appointment/doctor_filter/doctors_filter.dart +++ b/lib/presentation/book_appointment/doctor_filter/doctors_filter.dart @@ -159,7 +159,7 @@ class DoctorsFilters extends StatelessWidget{ Spacer(), DecoratedBox( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: Colors.white, + color: AppColors.whiteColor, customBorder: BorderRadius.only(topLeft: Radius.circular(24.h), topRight: Radius.circular(24.h)) , ), diff --git a/lib/presentation/book_appointment/doctor_profile_page.dart b/lib/presentation/book_appointment/doctor_profile_page.dart index 25cda6b6..4b2d4dbb 100644 --- a/lib/presentation/book_appointment/doctor_profile_page.dart +++ b/lib/presentation/book_appointment/doctor_profile_page.dart @@ -106,6 +106,7 @@ class DoctorProfilePage extends StatelessWidget { width: 48.w, height: 48.h, fit: BoxFit.contain, + applyThemeColor: false ), SizedBox(height: 16.h), "Ratings".toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor), @@ -132,6 +133,7 @@ class DoctorProfilePage extends StatelessWidget { width: 48.w, height: 48.h, fit: BoxFit.contain, + applyThemeColor: false ), SizedBox(height: 16.h), "Reviews".toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor), @@ -227,14 +229,14 @@ class DoctorProfilePage extends StatelessWidget { }, backgroundColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor, - textColor: AppColors.whiteColor, + textColor: Colors.white, fontSize: 16, fontWeight: FontWeight.w500, borderRadius: 12, padding: EdgeInsets.fromLTRB(10, 0, 10, 0), height: 50.h, icon: AppAssets.calendar, - iconColor: AppColors.whiteColor, + iconColor: Colors.white, iconSize: 20.h, ).paddingSymmetrical(24.h, 24.h), ), 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 e6654f5e..7c2784de 100644 --- a/lib/presentation/book_appointment/livecare/immediate_livecare_payment_details.dart +++ b/lib/presentation/book_appointment/livecare/immediate_livecare_payment_details.dart @@ -110,7 +110,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget { children: [ Row( children: [ - Utils.buildSvgWithAssets(icon: getLiveCareTypeIcon(immediateLiveCareVM.liveCareSelectedCallType), width: 32.h, height: 32.h, fit: BoxFit.contain), + Utils.buildSvgWithAssets(icon: getLiveCareTypeIcon(immediateLiveCareVM.liveCareSelectedCallType), width: 32.h, height: 32.h, fit: BoxFit.contain, applyThemeColor: false), SizedBox(width: 8.h), getLiveCareType(context, immediateLiveCareVM.liveCareSelectedCallType).toText16(isBold: true), ], 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..4018b42a 100644 --- a/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart +++ b/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart @@ -292,6 +292,7 @@ class _ImmediateLiveCarePaymentPageState extends State { }, backgroundColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor, - textColor: AppColors.whiteColor, + textColor: Colors.white, fontSize: 16, fontWeight: FontWeight.w500, borderRadius: 12, 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..663fd5b4 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 @@ -313,6 +313,7 @@ class _WaitingAppointmentPaymentPageState extends State { }, backgroundColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor, - textColor: AppColors.whiteColor, + textColor: Colors.white, fontSize: 16.f, fontWeight: FontWeight.w500, borderRadius: 10.r, @@ -344,7 +344,7 @@ class TimeSlotChip extends StatelessWidget { ? Container( padding: EdgeInsets.symmetric(horizontal: 14.h, vertical: 8.h), decoration: ShapeDecoration( - color: isSelected ? AppColors.warningColorYellow : AppColors.whiteColor, + color: isSelected ? AppColors.warningColorYellow : AppColors.textColor, shape: SmoothRectangleBorder( borderRadius: BorderRadius.circular(8.h), smoothness: 1, @@ -367,8 +367,8 @@ class TimeSlotChip extends StatelessWidget { ), ), child: label.toText12( - color: isSelected ? AppColors.primaryRedColor : Colors.black87, - fontWeight: FontWeight.w500, + color: isSelected ? AppColors.primaryRedColor : AppColors.textColor, + fontWeight: FontWeight.w500, ), ), ); diff --git a/lib/presentation/book_appointment/widgets/clinic_card.dart b/lib/presentation/book_appointment/widgets/clinic_card.dart index 7e3c8df1..e7a6ca3a 100644 --- a/lib/presentation/book_appointment/widgets/clinic_card.dart +++ b/lib/presentation/book_appointment/widgets/clinic_card.dart @@ -34,7 +34,7 @@ class ClinicCard extends StatelessWidget { Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Utils.buildSvgWithAssets(icon: "assets/images/clinicIcons/${clinicsListResponseModel.clinicID ?? 1}.svg", width: 24.w, height: 24.h, fit: BoxFit.contain).toShimmer2(isShow: isLoading), (clinicsListResponseModel.isLiveCareClinicAndOnline ?? true) - ? Utils.buildSvgWithAssets(icon: AppAssets.livecare_clinic_icon, width: 32.w, height: 32.h, fit: BoxFit.contain).toShimmer2(isShow: isLoading) + ? Utils.buildSvgWithAssets(icon: AppAssets.livecare_clinic_icon, width: 32.w, height: 32.h, fit: BoxFit.contain, applyThemeColor: false).toShimmer2(isShow: isLoading) : SizedBox.shrink(), ], ), diff --git a/lib/presentation/book_appointment/widgets/doctor_card.dart b/lib/presentation/book_appointment/widgets/doctor_card.dart index ddb43e9d..9e3c69d1 100644 --- a/lib/presentation/book_appointment/widgets/doctor_card.dart +++ b/lib/presentation/book_appointment/widgets/doctor_card.dart @@ -72,7 +72,7 @@ class DoctorCard extends StatelessWidget { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h), + Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h, applyThemeColor: false), SizedBox(height: 2.h), "${isLoading ? 4.78 : doctorsListResponseModel.decimalDoctorRate}".toText11(isBold: true, color: AppColors.textColor), ], diff --git a/lib/presentation/book_appointment/widgets/doctor_rating_details.dart b/lib/presentation/book_appointment/widgets/doctor_rating_details.dart index 0ed54862..6d9e1cb2 100644 --- a/lib/presentation/book_appointment/widgets/doctor_rating_details.dart +++ b/lib/presentation/book_appointment/widgets/doctor_rating_details.dart @@ -69,13 +69,13 @@ class DoctorRatingDetails extends StatelessWidget { Container( width: 100.0, margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), - child: Text(LocaleKeys.excellent.tr(context: context), style: TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w600))), + child: Text(LocaleKeys.excellent.tr(context: context), style: TextStyle(fontSize: 13.0, color: AppColors.textColor, fontWeight: FontWeight.w600))), getRatingLine(bookAppointmentsVM.doctorDetailsList[0].ratio, Colors.green[700]!), ], ), Container( margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), - child: Text("${getRatingWidth(bookAppointmentsVM.doctorDetailsList[0].ratio).round()}%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), + child: Text("${getRatingWidth(bookAppointmentsVM.doctorDetailsList[0].ratio).round()}%", style: TextStyle(fontSize: 14.0, color: AppColors.textColor, fontWeight: FontWeight.w600)), ), ], ), @@ -89,13 +89,13 @@ class DoctorRatingDetails extends StatelessWidget { Container( width: 100.0, margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), - child: Text(LocaleKeys.vGood.tr(context: context), style: TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w600))), + child: Text(LocaleKeys.vGood.tr(context: context), style: TextStyle(fontSize: 13.0, color: AppColors.textColor, fontWeight: FontWeight.w600))), getRatingLine(bookAppointmentsVM.doctorDetailsList[1].ratio, Color(0xffB7B723)), ], ), Container( margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), - child: Text("${bookAppointmentsVM.doctorDetailsList[1].ratio.round()}%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), + child: Text("${bookAppointmentsVM.doctorDetailsList[1].ratio.round()}%", style: TextStyle(fontSize: 14.0, color: AppColors.textColor, fontWeight: FontWeight.w600)), ), ], ), @@ -109,13 +109,13 @@ class DoctorRatingDetails extends StatelessWidget { Container( width: 100.0, margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), - child: Text(LocaleKeys.good.tr(context: context), style: TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w600))), + child: Text(LocaleKeys.good.tr(context: context), style: TextStyle(fontSize: 13.0, color: AppColors.textColor, fontWeight: FontWeight.w600))), getRatingLine(bookAppointmentsVM.doctorDetailsList[2].ratio, Color(0xffEBA727)), ], ), Container( margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), - child: Text("${bookAppointmentsVM.doctorDetailsList[2].ratio.round()}%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), + child: Text("${bookAppointmentsVM.doctorDetailsList[2].ratio.round()}%", style: TextStyle(fontSize: 14.0, color: AppColors.textColor, fontWeight: FontWeight.w600)), ), ], ), @@ -129,13 +129,13 @@ class DoctorRatingDetails extends StatelessWidget { Container( width: 100.0, margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), - child: Text(LocaleKeys.average.tr(context: context), style: TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w600))), + child: Text(LocaleKeys.average.tr(context: context), style: TextStyle(fontSize: 13.0, color: AppColors.textColor, fontWeight: FontWeight.w600))), getRatingLine(bookAppointmentsVM.doctorDetailsList[3].ratio, Color(0xffEB7227)), ], ), Container( margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), - child: Text("${bookAppointmentsVM.doctorDetailsList[3].ratio.round()}%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), + child: Text("${bookAppointmentsVM.doctorDetailsList[3].ratio.round()}%", style: TextStyle(fontSize: 14.0, color: AppColors.textColor, fontWeight: FontWeight.w600)), ), ], ), @@ -150,13 +150,13 @@ class DoctorRatingDetails extends StatelessWidget { Container( width: 100.0, margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0), - child: Text(LocaleKeys.average.tr(context: context), style: TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w600))), + child: Text(LocaleKeys.average.tr(context: context), style: TextStyle(fontSize: 13.0, color: AppColors.textColor, fontWeight: FontWeight.w600))), getRatingLine(bookAppointmentsVM.doctorDetailsList[4].ratio, Color(0xffE20C0C)), ], ), Container( margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), - child: Text("${bookAppointmentsVM.doctorDetailsList[4].ratio.round()}%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)), + child: Text("${bookAppointmentsVM.doctorDetailsList[4].ratio.round()}%", style: TextStyle(fontSize: 14.0, color: AppColors.textColor, fontWeight: FontWeight.w600)), ), ], ), diff --git a/lib/presentation/contact_us/live_chat_page.dart b/lib/presentation/contact_us/live_chat_page.dart index a602eb14..5d09a64f 100644 --- a/lib/presentation/contact_us/live_chat_page.dart +++ b/lib/presentation/contact_us/live_chat_page.dart @@ -122,12 +122,12 @@ class LiveChatPage extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ ("${appState.isArabic() ? contactUsVM.liveChatProjectsList[index].projectNameN! : contactUsVM.liveChatProjectsList[index].projectName!}\n${contactUsVM.liveChatProjectsList[index].distanceInKilometers!} KM") - .toText14(isBold: true, color: contactUsVM.selectedLiveChatProjectIndex == index ? AppColors.whiteColor : AppColors.textColor), + .toText14(isBold: true, color: contactUsVM.selectedLiveChatProjectIndex == index ? Colors.white : AppColors.textColor), Transform.flip( flipX: getIt.get().isArabic(), child: Utils.buildSvgWithAssets( icon: AppAssets.forward_arrow_icon_small, - iconColor: contactUsVM.selectedLiveChatProjectIndex == index ? AppColors.whiteColor : AppColors.textColor, + iconColor: contactUsVM.selectedLiveChatProjectIndex == index ? Colors.white : AppColors.textColor, width: 18.h, height: 13.h, fit: BoxFit.contain, @@ -235,7 +235,7 @@ class LiveChatPage extends StatelessWidget { }, backgroundColor: contactUsVM.selectedLiveChatProjectIndex == -1 ? AppColors.greyColor : AppColors.primaryRedColor, borderColor: contactUsVM.selectedLiveChatProjectIndex == -1 ? AppColors.greyColor : AppColors.primaryRedColor, - textColor: AppColors.whiteColor, + textColor: Colors.white, fontSize: 16, fontWeight: FontWeight.w500, borderRadius: 12, 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..4738a63a 100644 --- a/lib/presentation/contact_us/widgets/find_us_item_card.dart +++ b/lib/presentation/contact_us/widgets/find_us_item_card.dart @@ -102,9 +102,9 @@ class FindUsItemCard extends StatelessWidget { AppCustomChipWidget( labelText: LocaleKeys.callNow.tr(), icon: AppAssets.call_fill, - iconColor: AppColors.whiteColor, + iconColor: Colors.white, backgroundColor: AppColors.primaryRedColor.withValues(alpha: 1.0), - textColor: AppColors.whiteColor, + textColor: Colors.white, onChipTap: () { launchUrl(Uri.parse("tel://" + "${getHMGLocationsModel.phoneNumber}")); }, diff --git a/lib/presentation/covid19test/covid_payment_screen.dart b/lib/presentation/covid19test/covid_payment_screen.dart index e395a426..40bf2863 100644 --- a/lib/presentation/covid19test/covid_payment_screen.dart +++ b/lib/presentation/covid19test/covid_payment_screen.dart @@ -133,6 +133,7 @@ class _CovidPaymentScreenState extends State { width: 200.h, height: 80.h, fit: BoxFit.contain, + applyThemeColor: false ).paddingSymmetrical(24.h, 0.h).onPress(() { if (Utils.havePrivilege(103)) { startApplePay(); diff --git a/lib/presentation/e_referral/new_e_referral.dart b/lib/presentation/e_referral/new_e_referral.dart index 02881730..844ef5d5 100644 --- a/lib/presentation/e_referral/new_e_referral.dart +++ b/lib/presentation/e_referral/new_e_referral.dart @@ -171,7 +171,7 @@ class _NewReferralPageState extends State { ); }, bottomChild: Container( - color: Colors.white, + color: AppColors.whiteColor, padding: EdgeInsets.all(ResponsiveExtension(20).h), child: CustomButton( text: _currentStep <= 1 ? LocaleKeys.next.tr() : LocaleKeys.submit.tr(), diff --git a/lib/presentation/e_referral/widget/e-referral_otp.dart b/lib/presentation/e_referral/widget/e-referral_otp.dart index 390fc71f..17ae4272 100644 --- a/lib/presentation/e_referral/widget/e-referral_otp.dart +++ b/lib/presentation/e_referral/widget/e-referral_otp.dart @@ -90,7 +90,8 @@ class OTPService { }, backgroundColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedBorderColor, - textColor: AppColors.whiteColor, + textColor: Colors.white, + iconColor: Colors.white, icon: AppAssets.message, ), ), diff --git a/lib/presentation/e_referral/widget/e_referral_requester_form.dart b/lib/presentation/e_referral/widget/e_referral_requester_form.dart index b49846f4..d57abe23 100644 --- a/lib/presentation/e_referral/widget/e_referral_requester_form.dart +++ b/lib/presentation/e_referral/widget/e_referral_requester_form.dart @@ -6,6 +6,7 @@ import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; import 'package:hmg_patient_app_new/presentation/e_referral/e_referral_form_manager.dart'; +import 'package:hmg_patient_app_new/theme/colors.dart'; import 'package:provider/provider.dart'; import 'package:hmg_patient_app_new/core/app_assets.dart'; import 'package:hmg_patient_app_new/features/hmg_services/hmg_services_view_model.dart'; @@ -121,7 +122,7 @@ class RequesterFormStepState extends State { errorMessage: formManager.errors.relationship, hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.relationship), hasSelectionCustomIcon: false, - labelColor: Colors.black, + labelColor: AppColors.textColor, padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16), leadingIcon: AppAssets.user_circle, dropdownItems: [], @@ -171,8 +172,8 @@ class RequesterFormStepState extends State { return DecoratedBox( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: Colors.white, - customBorder: BorderRadius.all(Radius.circular(24.h)) , + color: AppColors.whiteColor, + customBorder: BorderRadius.all(Radius.circular(24.h)) , ), child: ListView.builder( shrinkWrap: true, 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..c17f3560 100644 --- a/lib/presentation/emergency_services/RRT/rrt_request_type_select.dart +++ b/lib/presentation/emergency_services/RRT/rrt_request_type_select.dart @@ -28,7 +28,7 @@ class RrtRequestTypeSelect extends StatelessWidget { ), DecoratedBox( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: Colors.white, + color: AppColors.whiteColor, borderRadius: 20.r, ), child: OptionSelection(context)), 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..e5578a3e 100644 --- a/lib/presentation/emergency_services/call_ambulance/call_ambulance_page.dart +++ b/lib/presentation/emergency_services/call_ambulance/call_ambulance_page.dart @@ -79,7 +79,7 @@ class CallAmbulancePage extends StatelessWidget { ), Align( alignment: AlignmentDirectional.topStart, - child: Utils.buildSvgWithAssets(icon: AppAssets.closeBottomNav, width: 32.h, height: 32.h).onPress(() { + child: Utils.buildSvgWithAssets(icon: AppAssets.closeBottomNav, width: 32.h, height: 32.h, applyThemeColor: false).onPress(() { context.read().flushPickupInformation(); Navigator.pop(context); }), 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..9ad98cb6 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 @@ -52,6 +52,7 @@ class TypeSelectionWidget extends StatelessWidget { child: AppCustomChipWidget( icon: AppAssets.hmg, iconHasColor: false, + applyThemeColor: false, labelText: LocaleKeys.hmgHospitals.tr(context: context), shape: RoundedRectangleBorder( side: BorderSide( @@ -76,6 +77,7 @@ class TypeSelectionWidget extends StatelessWidget { child: AppCustomChipWidget( icon: AppAssets.hmc, iconHasColor: false, + applyThemeColor: false, labelText: LocaleKeys.hmcMedicalClinic.tr(context: context), shape: RoundedRectangleBorder( side: BorderSide( diff --git a/lib/presentation/emergency_services/emergency_services_page.dart b/lib/presentation/emergency_services/emergency_services_page.dart index a5281ca0..41597e40 100644 --- a/lib/presentation/emergency_services/emergency_services_page.dart +++ b/lib/presentation/emergency_services/emergency_services_page.dart @@ -53,7 +53,7 @@ class EmergencyServicesPage extends StatelessWidget { ), child: Row( children: [ - Utils.buildSvgWithAssets(icon: AppAssets.call_ambulance_icon, width: 40.h, height: 40.h), + Utils.buildSvgWithAssets(icon: AppAssets.call_ambulance_icon, width: 40.h, height: 40.h, applyThemeColor: false), SizedBox(width: 12.h), Expanded( child: Column( @@ -87,7 +87,7 @@ class EmergencyServicesPage extends StatelessWidget { "".toText14(), Utils.buildSvgWithAssets( icon: AppAssets.cancel_circle_icon, - iconColor: AppColors.whiteColor, + iconColor: Colors.white, width: 24.h, height: 24.h, fit: BoxFit.contain, @@ -99,10 +99,10 @@ class EmergencyServicesPage extends StatelessWidget { Lottie.asset(AppAnimations.ambulanceAlert, repeat: false, reverse: false, frameRate: FrameRate(60), width: 120.h, height: 120.h, fit: BoxFit.contain), SizedBox(height: 8.h), - LocaleKeys.confirmation.tr().toText28(color: AppColors.whiteColor, isBold: true), + LocaleKeys.confirmation.tr().toText28(color: Colors.white, isBold: true), SizedBox(height: 8.h), LocaleKeys.areYouSureYouWantToCallAmbulance.tr() - .toText14(color: AppColors.whiteColor, weight: FontWeight.w500), + .toText14(color: Colors.white, weight: FontWeight.w500), SizedBox(height: 24.h), CustomButton( text: LocaleKeys.confirm.tr(context: context), @@ -111,8 +111,8 @@ class EmergencyServicesPage extends StatelessWidget { await emergencyServicesViewModel.getTransportationOption(); openTranportationSelectionBottomSheet(context); }, - backgroundColor: AppColors.whiteColor, - borderColor: AppColors.whiteColor, + backgroundColor: Colors.white, + borderColor: Colors.white, textColor: AppColors.primaryRedColor, icon: AppAssets.checkmark_icon, iconColor: AppColors.primaryRedColor, @@ -140,7 +140,7 @@ class EmergencyServicesPage extends StatelessWidget { ), child: Row( children: [ - Utils.buildSvgWithAssets(icon: AppAssets.nearest_er_icon, width: 40.h, height: 40.h), + Utils.buildSvgWithAssets(icon: AppAssets.nearest_er_icon, width: 40.h, height: 40.h, applyThemeColor: false), SizedBox(width: 12.h), Expanded( child: Column( @@ -169,7 +169,7 @@ class EmergencyServicesPage extends StatelessWidget { ), child: Row( children: [ - Utils.buildSvgWithAssets(icon: AppAssets.rrt_icon, width: 40.h, height: 40.h), + Utils.buildSvgWithAssets(icon: AppAssets.rrt_icon, width: 40.h, height: 40.h, applyThemeColor: false), SizedBox(width: 12.h), Expanded( child: Column( @@ -199,10 +199,10 @@ class EmergencyServicesPage extends StatelessWidget { children: [ Lottie.asset(AppAnimations.ambulanceAlert, repeat: false, reverse: false, frameRate: FrameRate(60), width: 120.h, height: 120.h, fit: BoxFit.contain), SizedBox(height: 8.h), - LocaleKeys.confirm.tr().toText28(color: AppColors.whiteColor, isBold: true), + LocaleKeys.confirm.tr().toText28(color: Colors.white, isBold: true), SizedBox(height: 8.h), LocaleKeys.areYouSureYouWantToCallRRT.tr() - .toText14(color: AppColors.whiteColor, weight: FontWeight.w500), + .toText14(color: Colors.white, weight: FontWeight.w500), SizedBox(height: 24.h), CustomButton( text: LocaleKeys.confirm.tr(context: context), @@ -237,8 +237,8 @@ class EmergencyServicesPage extends StatelessWidget { ); }); }, - backgroundColor: AppColors.whiteColor, - borderColor: AppColors.whiteColor, + backgroundColor: Colors.white, + borderColor: Colors.white, textColor: AppColors.primaryRedColor, icon: AppAssets.checkmark_icon, iconColor: AppColors.primaryRedColor, @@ -268,7 +268,7 @@ class EmergencyServicesPage extends StatelessWidget { ), child: Row( children: [ - Utils.buildSvgWithAssets(icon: AppAssets.rrt_icon, width: 40.h, height: 40.h), + Utils.buildSvgWithAssets(icon: AppAssets.rrt_icon, width: 40.h, height: 40.h, applyThemeColor: false), SizedBox(width: 12.h), Expanded( child: Column( @@ -311,9 +311,9 @@ class EmergencyServicesPage extends StatelessWidget { Lottie.asset(AppAnimations.ambulanceAlert, repeat: false, reverse: false, frameRate: FrameRate(60), width: 120.h, height: 120.h, fit: BoxFit.contain), SizedBox(height: 8.h), - LocaleKeys.confirm.tr().toText28(color: AppColors.whiteColor, isBold: true), + LocaleKeys.confirm.tr().toText28(color: Colors.white, isBold: true), SizedBox(height: 8.h), - LocaleKeys.areYouSureYouWantToMakeERCheckIn.tr().toText14(color: AppColors.whiteColor, weight: FontWeight.w500), + LocaleKeys.areYouSureYouWantToMakeERCheckIn.tr().toText14(color: Colors.white, weight: FontWeight.w500), SizedBox(height: 24.h), CustomButton( text: LocaleKeys.confirm.tr(context: context), @@ -325,8 +325,8 @@ class EmergencyServicesPage extends StatelessWidget { context.read().navigateToEROnlineCheckIn(); }); }, - backgroundColor: AppColors.whiteColor, - borderColor: AppColors.whiteColor, + backgroundColor: Colors.white, + borderColor: Colors.white, textColor: AppColors.primaryRedColor, icon: AppAssets.checkmark_icon, iconColor: AppColors.primaryRedColor, 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..8b9633c1 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 @@ -288,6 +288,7 @@ class _ErOnlineCheckinPaymentPageState extends State width: 200.h, height: 80.h, fit: BoxFit.contain, + applyThemeColor: false ).paddingSymmetrical(24.h, 0.h).onPress(() { if (Utils.havePrivilege(103)) { startApplePay(); 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..e1ebc83c 100644 --- a/lib/presentation/emergency_services/history/widget/ambulance_history_item.dart +++ b/lib/presentation/emergency_services/history/widget/ambulance_history_item.dart @@ -26,7 +26,7 @@ class AmbulanceHistoryItem extends StatelessWidget { Widget build(BuildContext context) { return DecoratedBox( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: Colors.white, + color: AppColors.whiteColor, hasShadow: true, customBorder: BorderRadius.all( Radius.circular(20.h), diff --git a/lib/presentation/emergency_services/history/widget/rrt_item.dart b/lib/presentation/emergency_services/history/widget/rrt_item.dart index d345e2df..c8787791 100644 --- a/lib/presentation/emergency_services/history/widget/rrt_item.dart +++ b/lib/presentation/emergency_services/history/widget/rrt_item.dart @@ -26,7 +26,7 @@ class RRTItem extends StatelessWidget { Widget build(BuildContext context) { return DecoratedBox( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: Colors.white, + color: AppColors.whiteColor, hasShadow: true, customBorder: BorderRadius.all( Radius.circular(20.h), diff --git a/lib/presentation/emergency_services/widgets/nearestERItem.dart b/lib/presentation/emergency_services/widgets/nearestERItem.dart index 2226f82b..fae19a0a 100644 --- a/lib/presentation/emergency_services/widgets/nearestERItem.dart +++ b/lib/presentation/emergency_services/widgets/nearestERItem.dart @@ -27,7 +27,7 @@ class NearestERItem extends StatelessWidget { Widget build(BuildContext context) { return Container( decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: Colors.white, + color: AppColors.whiteColor, customBorder: BorderRadius.only( topLeft: Radius.circular(24.h), topRight: Radius.circular(24.h), diff --git a/lib/presentation/habib_wallet/recharge_wallet_page.dart b/lib/presentation/habib_wallet/recharge_wallet_page.dart index c4587bf9..ef1642eb 100644 --- a/lib/presentation/habib_wallet/recharge_wallet_page.dart +++ b/lib/presentation/habib_wallet/recharge_wallet_page.dart @@ -133,7 +133,7 @@ class _RechargeWalletPageState extends State { children: [ Row( children: [ - Utils.buildSvgWithAssets(icon: AppAssets.my_account_icon, width: 40.h, height: 40.h), + Utils.buildSvgWithAssets(icon: AppAssets.my_account_icon, width: 40.h, height: 40.h, applyThemeColor: false), SizedBox(width: 8.h), Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -171,7 +171,7 @@ class _RechargeWalletPageState extends State { children: [ Row( children: [ - Utils.buildSvgWithAssets(icon: AppAssets.select_hospital_icon, width: 40.h, height: 40.h), + Utils.buildSvgWithAssets(icon: AppAssets.select_hospital_icon, width: 40.h, height: 40.h, applyThemeColor: false), SizedBox(width: 8.h), Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -197,7 +197,7 @@ class _RechargeWalletPageState extends State { SizedBox(height: 16.h), Row( children: [ - Utils.buildSvgWithAssets(icon: AppAssets.email_icon, width: 40.h, height: 40.h), + Utils.buildSvgWithAssets(icon: AppAssets.email_icon, width: 40.h, height: 40.h, applyThemeColor: false), SizedBox(width: 8.h), Column( crossAxisAlignment: CrossAxisAlignment.start, @@ -281,14 +281,14 @@ class _RechargeWalletPageState extends State { }, backgroundColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor, - textColor: AppColors.whiteColor, + textColor: Colors.white, fontSize: 16, fontWeight: FontWeight.w500, borderRadius: 12, padding: EdgeInsets.fromLTRB(10, 0, 10, 0), height: 50.h, icon: AppAssets.appointment_pay_icon, - iconColor: AppColors.whiteColor, + iconColor: Colors.white, iconSize: 18.h, ).paddingSymmetrical(24.h, 24.h), ), diff --git a/lib/presentation/habib_wallet/wallet_payment_confirm_page.dart b/lib/presentation/habib_wallet/wallet_payment_confirm_page.dart index 4585b7d0..9efcb01b 100644 --- a/lib/presentation/habib_wallet/wallet_payment_confirm_page.dart +++ b/lib/presentation/habib_wallet/wallet_payment_confirm_page.dart @@ -188,10 +188,7 @@ class _WalletPaymentConfirmPageState extends State { Platform.isIOS ? Utils.buildSvgWithAssets( icon: AppAssets.apple_pay_button, - width: 200.h, - height: 56.h, - fit: BoxFit.contain, - ).paddingSymmetrical(24.h, 0.h).onPress(() { + width: 200.h, height: 56.h, fit: BoxFit.contain, applyThemeColor: false).paddingSymmetrical(24.h, 0.h).onPress(() { if (Utils.havePrivilege(103)) { startApplePay(); } else { diff --git a/lib/presentation/habib_wallet/widgets/hospital_list_item.dart b/lib/presentation/habib_wallet/widgets/hospital_list_item.dart index a46f79db..67e174a3 100644 --- a/lib/presentation/habib_wallet/widgets/hospital_list_item.dart +++ b/lib/presentation/habib_wallet/widgets/hospital_list_item.dart @@ -54,6 +54,7 @@ class HospitalListItemAdvancePayment extends StatelessWidget { children: [ Utils.buildSvgWithAssets( icon: (hospitalModel.isHMC == true) ? AppAssets.hmc : AppAssets.hmg, + applyThemeColor: false ).paddingOnly(right: 10), Expanded( child: Text( diff --git a/lib/presentation/health_calculators_and_converts/health_calculators_page.dart b/lib/presentation/health_calculators_and_converts/health_calculators_page.dart index aae25b03..4f519d66 100644 --- a/lib/presentation/health_calculators_and_converts/health_calculators_page.dart +++ b/lib/presentation/health_calculators_and_converts/health_calculators_page.dart @@ -39,10 +39,10 @@ class _HealthCalculatorsPageState extends State { ? Column( children: [ Container( - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: Colors.white, borderRadius: 20.r), + decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.r), child: Row( children: [ - Utils.buildSvgWithAssets(icon: AppAssets.general_health, height: 40.h, width: 40.w, fit: BoxFit.none), + Utils.buildSvgWithAssets(icon: AppAssets.general_health, height: 40.h, width: 40.w, fit: BoxFit.none, applyThemeColor: false), SizedBox(width: 12.w), Flexible( child: Column( @@ -70,10 +70,10 @@ class _HealthCalculatorsPageState extends State { }), SizedBox(height: 16.h), Container( - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: Colors.white, borderRadius: 20.r), + decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.r), child: Row( children: [ - Utils.buildSvgWithAssets(icon: AppAssets.women_health, height: 40.h, width: 40.w, fit: BoxFit.none), + Utils.buildSvgWithAssets(icon: AppAssets.women_health, height: 40.h, width: 40.w, fit: BoxFit.none, applyThemeColor: false), SizedBox(width: 12.w), Flexible( child: Column( @@ -102,11 +102,11 @@ class _HealthCalculatorsPageState extends State { : Column( children: [ Container( - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: Colors.white, borderRadius: 20.r), + decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.r), child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.bloodSugar, height: 40.h, width: 40.w, fit: BoxFit.none), + Utils.buildSvgWithAssets(icon: AppAssets.bloodSugar, height: 40.h, width: 40.w, fit: BoxFit.none, applyThemeColor: false), SizedBox(width: 12.w), Flexible( child: Column( @@ -136,11 +136,11 @@ class _HealthCalculatorsPageState extends State { }), SizedBox(height: 16.h), Container( - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: Colors.white, borderRadius: 20.r), + decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.r), child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.bloodCholestrol, height: 40.h, width: 40.w, fit: BoxFit.none), + Utils.buildSvgWithAssets(icon: AppAssets.bloodCholestrol, height: 40.h, width: 40.w, fit: BoxFit.none, applyThemeColor: false), SizedBox(width: 12.w), Flexible( child: Column( @@ -166,11 +166,11 @@ class _HealthCalculatorsPageState extends State { }), SizedBox(height: 16.h), Container( - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: Colors.white, borderRadius: 20.r), + decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.r), child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.triglycerides, height: 40.h, width: 40.w, fit: BoxFit.none), + Utils.buildSvgWithAssets(icon: AppAssets.triglycerides, height: 40.h, width: 40.w, fit: BoxFit.none, applyThemeColor: false), SizedBox(width: 12.w), Flexible( child: Column( diff --git a/lib/presentation/health_calculators_and_converts/widgets/bf.dart b/lib/presentation/health_calculators_and_converts/widgets/bf.dart index c8c949c4..481bfcbf 100644 --- a/lib/presentation/health_calculators_and_converts/widgets/bf.dart +++ b/lib/presentation/health_calculators_and_converts/widgets/bf.dart @@ -85,7 +85,7 @@ class _BodyFatWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.gender, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.gender, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( child: Row( @@ -111,7 +111,7 @@ class _BodyFatWidgetState extends State { message: "", child: Container( padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: _genders.length, @@ -165,7 +165,7 @@ class _BodyFatWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.height, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.height, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( flex: 3, @@ -221,7 +221,7 @@ class _BodyFatWidgetState extends State { message: "", child: Container( padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: _heightUnits.length, @@ -277,7 +277,7 @@ class _BodyFatWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( flex: 3, @@ -338,7 +338,7 @@ class _BodyFatWidgetState extends State { message: "", child: Container( padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: _heightUnits.length, @@ -394,7 +394,7 @@ class _BodyFatWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( flex: 3, @@ -455,7 +455,7 @@ class _BodyFatWidgetState extends State { message: "", child: Container( padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: _heightUnits.length, @@ -511,7 +511,7 @@ class _BodyFatWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( flex: 3, @@ -572,7 +572,7 @@ class _BodyFatWidgetState extends State { message: "", child: Container( padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: _heightUnits.length, diff --git a/lib/presentation/health_calculators_and_converts/widgets/bmi.dart b/lib/presentation/health_calculators_and_converts/widgets/bmi.dart index 3969db41..a5ea06d1 100644 --- a/lib/presentation/health_calculators_and_converts/widgets/bmi.dart +++ b/lib/presentation/health_calculators_and_converts/widgets/bmi.dart @@ -67,7 +67,7 @@ class _BMIWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.height, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.height, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( flex: 3, @@ -123,7 +123,7 @@ class _BMIWidgetState extends State { message: "", child: Container( padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: _heightUnits.length, @@ -179,7 +179,7 @@ class _BMIWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( flex: 3, @@ -240,7 +240,7 @@ class _BMIWidgetState extends State { message: "", child: Container( padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: _weightUnits.length, diff --git a/lib/presentation/health_calculators_and_converts/widgets/bmr.dart b/lib/presentation/health_calculators_and_converts/widgets/bmr.dart index f19c6b5c..d1cb2c3a 100644 --- a/lib/presentation/health_calculators_and_converts/widgets/bmr.dart +++ b/lib/presentation/health_calculators_and_converts/widgets/bmr.dart @@ -80,7 +80,7 @@ class _BMRWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.gender, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.gender, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( child: Row( @@ -107,7 +107,7 @@ class _BMRWidgetState extends State { message: "", child: Container( padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: _genders.length, @@ -162,7 +162,7 @@ class _BMRWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.age, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.age, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( flex: 3, @@ -199,7 +199,7 @@ class _BMRWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.height, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.height, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( flex: 3, @@ -255,7 +255,7 @@ class _BMRWidgetState extends State { message: "", child: Container( padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: _heightUnits.length, @@ -312,7 +312,7 @@ class _BMRWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( flex: 3, @@ -373,7 +373,7 @@ class _BMRWidgetState extends State { message: "", child: Container( padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: _weightUnits.length, @@ -430,7 +430,7 @@ class _BMRWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.activity, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.activity, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( child: Row( @@ -456,7 +456,7 @@ class _BMRWidgetState extends State { message: "", child: Container( padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: _activity.length, diff --git a/lib/presentation/health_calculators_and_converts/widgets/calories.dart b/lib/presentation/health_calculators_and_converts/widgets/calories.dart index b1a4b773..1609c056 100644 --- a/lib/presentation/health_calculators_and_converts/widgets/calories.dart +++ b/lib/presentation/health_calculators_and_converts/widgets/calories.dart @@ -81,7 +81,7 @@ class _CaloriesWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.gender, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.gender, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( child: Row( @@ -108,7 +108,7 @@ class _CaloriesWidgetState extends State { message: "", child: Container( padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: _genders.length, @@ -162,7 +162,7 @@ class _CaloriesWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.age, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.age, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( flex: 3, @@ -199,7 +199,7 @@ class _CaloriesWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.height, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.height, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( flex: 3, @@ -255,7 +255,7 @@ class _CaloriesWidgetState extends State { message: "", child: Container( padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: _heightUnits.length, @@ -311,7 +311,7 @@ class _CaloriesWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( flex: 3, @@ -372,7 +372,7 @@ class _CaloriesWidgetState extends State { message: "", child: Container( padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: _weightUnits.length, @@ -429,7 +429,7 @@ class _CaloriesWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.activity, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.activity, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( child: Row( @@ -455,7 +455,7 @@ class _CaloriesWidgetState extends State { message: "", child: Container( padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: _activity.length, diff --git a/lib/presentation/health_calculators_and_converts/widgets/crabs.dart b/lib/presentation/health_calculators_and_converts/widgets/crabs.dart index 83130fe2..c241e688 100644 --- a/lib/presentation/health_calculators_and_converts/widgets/crabs.dart +++ b/lib/presentation/health_calculators_and_converts/widgets/crabs.dart @@ -62,7 +62,7 @@ class _CrabsWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.age, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.age, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( flex: 3, @@ -93,7 +93,7 @@ class _CrabsWidgetState extends State { ], ), ), - Utils.buildSvgWithAssets(icon: AppAssets.ask_doctor_icon).onPress(() { + Utils.buildSvgWithAssets(icon: AppAssets.ask_doctor_icon, applyThemeColor: false).onPress(() { Navigator.pop(context); Navigator.of(context).push(CustomPageRoute(page: HealthCalculatorDetailedPage(calculatorType: HealthCalculatorsTypeEnum.calories))); }), @@ -104,7 +104,7 @@ class _CrabsWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.activity, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.activity, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( child: Row( @@ -130,7 +130,7 @@ class _CrabsWidgetState extends State { message: "", child: Container( padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: _activity.length, diff --git a/lib/presentation/health_calculators_and_converts/widgets/ibw.dart b/lib/presentation/health_calculators_and_converts/widgets/ibw.dart index 1665ccd1..a783d2c8 100644 --- a/lib/presentation/health_calculators_and_converts/widgets/ibw.dart +++ b/lib/presentation/health_calculators_and_converts/widgets/ibw.dart @@ -73,7 +73,7 @@ class _IdealBodyWeightWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.height, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.height, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( flex: 3, @@ -129,7 +129,7 @@ class _IdealBodyWeightWidgetState extends State { message: "", child: Container( padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: _heightUnits.length, @@ -185,7 +185,7 @@ class _IdealBodyWeightWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( flex: 3, @@ -246,7 +246,7 @@ class _IdealBodyWeightWidgetState extends State { message: "", child: Container( padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: _weightUnits.length, @@ -301,7 +301,7 @@ class _IdealBodyWeightWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.activity, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.activity, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( child: Row( @@ -327,7 +327,7 @@ class _IdealBodyWeightWidgetState extends State { message: "", child: Container( padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: _activity.length, diff --git a/lib/presentation/health_calculators_and_converts/widgets/ovulation.dart b/lib/presentation/health_calculators_and_converts/widgets/ovulation.dart index 8d7591e6..556880d4 100644 --- a/lib/presentation/health_calculators_and_converts/widgets/ovulation.dart +++ b/lib/presentation/health_calculators_and_converts/widgets/ovulation.dart @@ -89,7 +89,7 @@ class _OvulationWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.age, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.age, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( flex: 3, @@ -126,7 +126,7 @@ class _OvulationWidgetState extends State { Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.age, width: 40.w, height: 40.w), + Utils.buildSvgWithAssets(icon: AppAssets.age, width: 40.w, height: 40.w, applyThemeColor: false), SizedBox(width: 12.w), Expanded( flex: 3, diff --git a/lib/presentation/health_trackers/add_health_tracker_entry_page.dart b/lib/presentation/health_trackers/add_health_tracker_entry_page.dart index 702875d9..8320972e 100644 --- a/lib/presentation/health_trackers/add_health_tracker_entry_page.dart +++ b/lib/presentation/health_trackers/add_health_tracker_entry_page.dart @@ -211,7 +211,7 @@ class _AddHealthTrackerEntryPageState extends State { child: Container( constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.7), padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: items.length, diff --git a/lib/presentation/health_trackers/health_trackers_page.dart b/lib/presentation/health_trackers/health_trackers_page.dart index 9c68281f..66630f28 100644 --- a/lib/presentation/health_trackers/health_trackers_page.dart +++ b/lib/presentation/health_trackers/health_trackers_page.dart @@ -26,7 +26,7 @@ Widget buildHealthTrackerCard({ required VoidCallback onTap, }) { return Container( - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: Colors.white, borderRadius: 20.r), + decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.r), child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ diff --git a/lib/presentation/hmg_services/services_page.dart b/lib/presentation/hmg_services/services_page.dart index 4458b75a..4996850b 100644 --- a/lib/presentation/hmg_services/services_page.dart +++ b/lib/presentation/hmg_services/services_page.dart @@ -389,7 +389,7 @@ class ServicesPage extends StatelessWidget { spacing: 8.w, crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.wallet, width: 40.w, height: 40.h), + Utils.buildSvgWithAssets(icon: AppAssets.wallet, width: 40.w, height: 40.h, applyThemeColor: false), LocaleKeys.habibWallet.tr().toText14(weight: FontWeight.w600, maxlines: 2).expanded, Utils.buildSvgWithAssets(icon: getIt.get().isArabic() ? AppAssets.arrow_back : AppAssets.arrow_forward), ], @@ -449,7 +449,7 @@ class ServicesPage extends StatelessWidget { spacing: 8.w, crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.services_medical_file_icon, width: 40.w, height: 40.h), + Utils.buildSvgWithAssets(icon: AppAssets.services_medical_file_icon, width: 40.w, height: 40.h, applyThemeColor: false), LocaleKeys.medicalFile.tr().toText16(weight: FontWeight.w600, maxlines: 2).expanded, Utils.buildSvgWithAssets(icon: getIt.get().isArabic() ? AppAssets.arrow_back : AppAssets.arrow_forward), ], diff --git a/lib/presentation/hmg_services/services_view.dart b/lib/presentation/hmg_services/services_view.dart index 3dd5c462..dd70c413 100644 --- a/lib/presentation/hmg_services/services_view.dart +++ b/lib/presentation/hmg_services/services_view.dart @@ -48,6 +48,7 @@ class ServiceGridViewItem extends StatelessWidget { icon: hmgServiceComponentModel.icon, iconColor: isHealthToolIcon ? null : AppColors.whiteColor, fit: BoxFit.contain, + applyThemeColor: false ), ), ), diff --git a/lib/presentation/home/data/landing_page_data.dart b/lib/presentation/home/data/landing_page_data.dart index c52d5e19..1fefb8ce 100644 --- a/lib/presentation/home/data/landing_page_data.dart +++ b/lib/presentation/home/data/landing_page_data.dart @@ -1,11 +1,12 @@ 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 = [ + static List get getNotLoggedInServiceCardsList => [ ServiceCardData( serviceName: "emergency", icon: AppAssets.emergency_services_icon, @@ -68,15 +69,15 @@ class LandingPageData { ), ]; - static List getLoggedInServiceCardsList = [ + static List get getLoggedInServiceCardsList => [ ServiceCardData( serviceName: "emergency", icon: AppAssets.emergency_services_icon, title: LocaleKeys.emergency, subtitle: LocaleKeys.services2, backgroundColor: AppColors.primaryRedColor, - iconColor: AppColors.whiteColor, - textColor: AppColors.whiteColor, + iconColor: Colors.white, + textColor: Colors.white, isBold: true, ), ServiceCardData( @@ -141,7 +142,7 @@ class LandingPageData { ), ]; - static List getServiceCardsList = [ + static List get getServiceCardsList => [ ServiceCardData( serviceName: "livecare", icon: AppAssets.small_livecare_icon, diff --git a/lib/presentation/home/data/service_card_data.dart b/lib/presentation/home/data/service_card_data.dart index 3bc22d7c..c16147b1 100644 --- a/lib/presentation/home/data/service_card_data.dart +++ b/lib/presentation/home/data/service_card_data.dart @@ -8,8 +8,8 @@ class ServiceCardData { final String title; final String subtitle; final Color? iconColor; - final Color textColor; - final Color backgroundColor; + final Color? textColor; + final Color? backgroundColor; final bool isBold; final String largeCardIcon; @@ -19,9 +19,9 @@ class ServiceCardData { this.title = "", this.subtitle = "", this.largeCardIcon = "", - this.backgroundColor = AppColors.whiteColor, - this.iconColor = AppColors.blackColor, - this.textColor = AppColors.blackColor, + this.backgroundColor, + this.iconColor, + this.textColor, this.isBold = false }); } diff --git a/lib/presentation/home/widgets/habib_wallet_card.dart b/lib/presentation/home/widgets/habib_wallet_card.dart index ed48058d..0ac32443 100644 --- a/lib/presentation/home/widgets/habib_wallet_card.dart +++ b/lib/presentation/home/widgets/habib_wallet_card.dart @@ -45,7 +45,7 @@ class HabibWalletCard extends StatelessWidget { 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, applyThemeColor: false)), ), Padding( padding: EdgeInsets.all(16.h), @@ -123,7 +123,7 @@ class HabibWalletCard extends StatelessWidget { icon: AppAssets.recharge_icon, iconSize: 24.h, backgroundColor: AppColors.infoColor, - textColor: AppColors.whiteColor, + textColor: Colors.white, text: LocaleKeys.recharge.tr(context: context), borderWidth: 0.w, fontWeight: FontWeight.w500, diff --git a/lib/presentation/home/widgets/large_service_card.dart b/lib/presentation/home/widgets/large_service_card.dart index e25ed0b3..e65eb1d8 100644 --- a/lib/presentation/home/widgets/large_service_card.dart +++ b/lib/presentation/home/widgets/large_service_card.dart @@ -72,7 +72,7 @@ class LargeServiceCard extends StatelessWidget { height: 48.h, width: 48.h, decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: serviceCardData.backgroundColor, + color: serviceCardData.backgroundColor!, borderRadius: 12.r, hasShadow: false, ), @@ -209,7 +209,7 @@ class FadedLargeServiceCard extends StatelessWidget { height: 32.h, width: 32.h, decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: serviceCardData.backgroundColor, + color: serviceCardData.backgroundColor!, borderRadius: 30.r, hasShadow: false, ), @@ -219,6 +219,7 @@ class FadedLargeServiceCard extends StatelessWidget { icon: serviceCardData.icon, iconColor: serviceCardData.iconColor, fit: BoxFit.contain, + applyThemeColor: false ), ), ), diff --git a/lib/presentation/home/widgets/small_service_card.dart b/lib/presentation/home/widgets/small_service_card.dart index 84ef6fa2..0c2da8d6 100644 --- a/lib/presentation/home/widgets/small_service_card.dart +++ b/lib/presentation/home/widgets/small_service_card.dart @@ -32,9 +32,9 @@ class SmallServiceCard extends StatelessWidget { final String icon; final String title; final String subtitle; - final Color iconColor; - final Color textColor; - final Color backgroundColor; + final Color? iconColor; + final Color? textColor; + final Color? backgroundColor; final bool isBold; SmallServiceCard({ @@ -43,33 +43,36 @@ class SmallServiceCard extends StatelessWidget { this.serviceName = "", this.title = "", this.subtitle = "", - this.backgroundColor = AppColors.whiteColor, - this.iconColor = AppColors.blackColor, - this.textColor = AppColors.blackColor, + this.backgroundColor, + this.iconColor, + this.textColor, this.isBold = false, }); @override Widget build(BuildContext context) { + final resolvedBgColor = backgroundColor ?? AppColors.whiteColor; + final resolvedIconColor = iconColor ?? AppColors.blackColor; + final resolvedTextColor = textColor ?? AppColors.blackColor; return Container( height: 92.h, width: 92.h, padding: EdgeInsets.all(4.0), decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: backgroundColor, + color: resolvedBgColor, borderRadius: 16, ), child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: icon, iconColor: iconColor, width: 32.h, height: 32.h), + Utils.buildSvgWithAssets(icon: icon, iconColor: resolvedIconColor, 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: resolvedTextColor, weight: FontWeight.w500, isCenter: true, letterSpacing: -0.2, maxlines: 1), + subtitle.tr(context: context).toText10(color: resolvedTextColor, 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: resolvedTextColor, fontWeight: FontWeight.w500, isCenter: true, letterSpacing: -0.2, maxLine: 1), + subtitle.tr(context: context).toText12(color: resolvedTextColor, fontWeight: FontWeight.w500, isCenter: true, letterSpacing: -0.2, maxLine: 1), ] ], ), diff --git a/lib/presentation/home_health_care/hhc_procedures_page.dart b/lib/presentation/home_health_care/hhc_procedures_page.dart index ef5dce5c..c420742c 100644 --- a/lib/presentation/home_health_care/hhc_procedures_page.dart +++ b/lib/presentation/home_health_care/hhc_procedures_page.dart @@ -434,7 +434,7 @@ class _HhcProceduresPageState extends State { child: Container( height: 80.h, decoration: BoxDecoration( - color: Colors.white, + color: AppColors.whiteColor, borderRadius: BorderRadius.circular(10.r), ), ), diff --git a/lib/presentation/lab/lab_result_via_clinic/LabResultByClinic.dart b/lib/presentation/lab/lab_result_via_clinic/LabResultByClinic.dart index 8fb30900..eed1eedb 100644 --- a/lib/presentation/lab/lab_result_via_clinic/LabResultByClinic.dart +++ b/lib/presentation/lab/lab_result_via_clinic/LabResultByClinic.dart @@ -146,14 +146,14 @@ class LabResultByClinic extends StatelessWidget { }, backgroundColor: AppColors.successColor, borderColor: AppColors.successColor, - textColor: AppColors.whiteColor, - fontSize: 16, + textColor: Colors.white, + fontSize: 16.f, fontWeight: FontWeight.w500, borderRadius: 12, padding: EdgeInsets.fromLTRB(10, 0, 10, 0), height: 45.h, icon: AppAssets.download, - iconColor: AppColors.whiteColor, + iconColor: Colors.white, iconSize: 20.h, ).paddingSymmetrical(24.h, 24.h), ), 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..7a477761 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 @@ -20,7 +20,7 @@ class AiAnalysisWidget extends StatelessWidget { padding: EdgeInsets.all(1.5.r), // Border thickness child: Container( decoration: BoxDecoration( - color: Colors.white, + color: AppColors.whiteColor, borderRadius: BorderRadius.circular(22.r), ), padding: EdgeInsets.all(20.r), @@ -44,7 +44,7 @@ class AiAnalysisWidget extends StatelessWidget { SizedBox(height: 8.h), data.summary!.toText14(color: AppColors.textColorLight, height: 1.5, weight: FontWeight.w400), SizedBox(height: 16.h), - const Divider(color: AppColors.dividerColor, thickness: 1), + Divider(color: AppColors.dividerColor, thickness: 1), SizedBox(height: 16.h), ], if (data.aiPredictions != null && data.aiPredictions!.isNotEmpty) ...[ @@ -52,7 +52,7 @@ class AiAnalysisWidget extends StatelessWidget { SizedBox(height: 12.h), ...data.aiPredictions!.map((item) => _buildBulletItem(item)), SizedBox(height: 16.h), - const Divider(color: AppColors.dividerColor, thickness: 1), + Divider(color: AppColors.dividerColor, thickness: 1), SizedBox(height: 16.h), ], if (data.prevention != null && data.prevention!.isNotEmpty) ...[ @@ -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: BoxDecoration(color: AppColors.blackColor, 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..2a4fd66d 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 @@ -133,7 +133,7 @@ class _LabAiAnalysisDetailedPageState extends State { ), if (!isLast) ...[ SizedBox(height: 12.h), - const Divider(color: AppColors.dividerColor, thickness: 1), + Divider(color: AppColors.dividerColor, thickness: 1), SizedBox(height: 12.h), ], ], diff --git a/lib/presentation/lab/search_lab_report.dart b/lib/presentation/lab/search_lab_report.dart index bf27b911..d366f38f 100644 --- a/lib/presentation/lab/search_lab_report.dart +++ b/lib/presentation/lab/search_lab_report.dart @@ -59,7 +59,7 @@ class _SearchLabResultsContentState extends State { title: LocaleKeys.labResults.tr(), isClose: true, bottomChild: Container( - color: Colors.white, + color: AppColors.whiteColor, padding: EdgeInsets.all(ResponsiveExtension(20).h), child: CustomButton( text: LocaleKeys.search.tr(), @@ -144,7 +144,8 @@ class SuggestionChip extends StatelessWidget { borderRadius: BorderRadius.circular(8), ), child: label.toText12( - color: isSelected ? Colors.white : Colors.black87, + // color: isSelected ? AppColors.textColor : Colors.black87, + color: AppColors.textColor, fontWeight: FontWeight.w500, ), ), diff --git a/lib/presentation/medical_file/medical_file_page.dart b/lib/presentation/medical_file/medical_file_page.dart index 1a68f224..f288af66 100644 --- a/lib/presentation/medical_file/medical_file_page.dart +++ b/lib/presentation/medical_file/medical_file_page.dart @@ -478,11 +478,12 @@ class _MedicalFilePageState extends State { // Using CustomExpandableList CustomExpandableList( expansionMode: ExpansionMode.exactlyOne, - dividerColor: Color(0xff2b353e1a), + dividerColor: AppColors.dividerColor, itemPadding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 14.h), items: [ ExpandableListItem( title: LocaleKeys.medicalServices.tr(context: context).toText18(weight: FontWeight.w600), + expandedBackgroundColor: Colors.transparent, children: [ SizedBox(height: 10.h), getSelectedTabData(0), @@ -518,53 +519,6 @@ class _MedicalFilePageState extends State { defaultTrailingIcon: Utils.buildSvgWithAssets(icon: AppAssets.arrow_down, height: 22.h, width: 22.w, iconColor: AppColors.textColor), ), ).paddingSymmetrical(16.w, 0.0), - - // ExpansionTileList( - // shrinkWrap: true, - // trailing: Icon(Icons.arrow_drop_down), - // expansionMode: ExpansionMode.exactlyOne, - // children: [ - // ExpansionTile( - // title: "Medical Services".toText20(weight: FontWeight.w600, color: AppColors.textColor), - // iconColor: Color(0xFF2E3039), - // trailing: Utils.buildSvgWithAssets(icon: AppAssets.arrow_down, height: 22.h, width: 22.w), - // children: [Text('Child 1')], - // ), - // ExpansionTile( - // title: "Medical Reports".toText20(weight: FontWeight.w600, color: AppColors.textColor), - // children: [Text('Child 2')], - // ), - // ExpansionTile( - // title: "Insurance & Payments".toText20(weight: FontWeight.w600, color: AppColors.textColor), - // children: [Text('Child 3')], - // ), - // ExpansionTile( - // title: "Tracker & Others".toText20(weight: FontWeight.w600, color: AppColors.textColor), - // children: [Text('Child 4')], - // ), - // ], - // ), - // Consumer(builder: (context, medicalFileVM, child) { - // return Column( - // children: [ - // CustomTabBar( - // activeTextColor: AppColors.primaryRedColor, - // activeBackgroundColor: AppColors.primaryRedColor.withValues(alpha: .1), - // tabs: [ - // CustomTabBarModel(AppAssets.myFilesBottom, LocaleKeys.general.tr(context: context).needTranslation), - // CustomTabBarModel(AppAssets.insurance, LocaleKeys.insurance.tr(context: context)), - // CustomTabBarModel(AppAssets.requests, LocaleKeys.request.tr(context: context).needTranslation), - // CustomTabBarModel(AppAssets.more, "More".needTranslation), - // ], - // onTabChange: (index) { - // medicalFileVM.onTabChanged(index); - // }, - // ).paddingSymmetrical(24.w, 0.0), - // SizedBox(height: 24.h), - // getSelectedTabData(medicalFileVM.selectedTabIndex), - // ], - // ); - // }), ], ), ); @@ -669,9 +623,9 @@ class _MedicalFilePageState extends State { ), ); }, - backgroundColor: Color(0xffFEE9EA), - borderColor: Color(0xffFEE9EA), - textColor: Color(0xffED1C2B), + backgroundColor: AppColors.secondaryLightRedColor, + borderColor: AppColors.secondaryLightRedColor, + textColor: AppColors.primaryRedColor, fontSize: 14.f, fontWeight: FontWeight.w500, borderRadius: 12.r, @@ -792,7 +746,7 @@ class _MedicalFilePageState extends State { ? const CommonShimmerWidget().paddingSymmetrical(0.w, 0.h) : prescriptionVM.patientPrescriptionOrders.isNotEmpty ? Container( - decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: Colors.white, borderRadius: 20.r, hasShadow: false), + decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.r, hasShadow: false), child: Padding( padding: EdgeInsets.all(16.w), child: Column( @@ -862,7 +816,7 @@ class _MedicalFilePageState extends State { separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h), ), SizedBox(height: 16.h), - const Divider(color: AppColors.dividerColor), + Divider(color: AppColors.dividerColor), SizedBox(height: 16.h), Row( children: [ diff --git a/lib/presentation/medical_file/widgets/lab_rad_card.dart b/lib/presentation/medical_file/widgets/lab_rad_card.dart index f31c90b9..b107403d 100644 --- a/lib/presentation/medical_file/widgets/lab_rad_card.dart +++ b/lib/presentation/medical_file/widgets/lab_rad_card.dart @@ -36,6 +36,7 @@ class LabRadCard extends StatelessWidget { width: 40.w, height: 40.h, fit: BoxFit.cover, + applyThemeColor: false ).toShimmer2(isShow: false, radius: 12.r), SizedBox(width: 8.w), Flexible( diff --git a/lib/presentation/medical_file/widgets/medical_file_card.dart b/lib/presentation/medical_file/widgets/medical_file_card.dart index 77968c57..c2551d30 100644 --- a/lib/presentation/medical_file/widgets/medical_file_card.dart +++ b/lib/presentation/medical_file/widgets/medical_file_card.dart @@ -37,7 +37,7 @@ class MedicalFileCard extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.center, mainAxisSize: MainAxisSize.min, children: [ - Utils.buildSvgWithAssets(icon: svgIcon, width: iconS, height: iconS, fit: BoxFit.contain), + Utils.buildSvgWithAssets(icon: svgIcon, width: iconS, height: iconS, fit: BoxFit.contain, applyThemeColor: false), SizedBox(height: 8.h), isLargeText ? label.toText13(color: textColor, isBold: true, maxLine: 2) : label.toText11(color: textColor, isBold: true, maxLine: 2), ], diff --git a/lib/presentation/medical_file/widgets/patient_sick_leave_card.dart b/lib/presentation/medical_file/widgets/patient_sick_leave_card.dart index 16c05d8b..a0c54e68 100644 --- a/lib/presentation/medical_file/widgets/patient_sick_leave_card.dart +++ b/lib/presentation/medical_file/widgets/patient_sick_leave_card.dart @@ -182,15 +182,15 @@ class PatientSickLeaveCard extends StatelessWidget { } Color getStatusColor() { - Color statusColor = Colors.white; + Color statusColor = AppColors.whiteColor; if (patientSickLeavesResponseModel.status == 1) { - statusColor = Color(0xffCC9B14); // TODO change color as per In Queue design + statusColor = AppColors.statusPendingColor; } else if (patientSickLeavesResponseModel.status == 2) { statusColor = AppColors.successColor; } else if (patientSickLeavesResponseModel.status == 3) { statusColor = AppColors.primaryRedColor; } else { - statusColor = Colors.white; + statusColor = AppColors.whiteColor; } return statusColor; } diff --git a/lib/presentation/medical_report/medical_reports_page.dart b/lib/presentation/medical_report/medical_reports_page.dart index 02a9bdec..fd3ba7f9 100644 --- a/lib/presentation/medical_report/medical_reports_page.dart +++ b/lib/presentation/medical_report/medical_reports_page.dart @@ -370,13 +370,13 @@ class _MedicalReportsPageState extends State { }, backgroundColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor, - textColor: AppColors.whiteColor, + textColor: Colors.white, fontSize: 16.f, fontWeight: FontWeight.w500, borderRadius: 12.r, height: 46.h, icon: AppAssets.requests, - iconColor: AppColors.whiteColor, + iconColor: Colors.white, iconSize: 20.h, ).paddingSymmetrical(24.h, 24.h), ), diff --git a/lib/presentation/monthly_report/monthly_report.dart b/lib/presentation/monthly_report/monthly_report.dart index 43c7fc1d..998d7f48 100644 --- a/lib/presentation/monthly_report/monthly_report.dart +++ b/lib/presentation/monthly_report/monthly_report.dart @@ -74,7 +74,7 @@ class MonthlyReport extends StatelessWidget { children: [ Row( children: [ - Utils.buildSvgWithAssets(icon: AppAssets.email_icon, width: 40.h, height: 40.h), + Utils.buildSvgWithAssets(icon: AppAssets.email_icon, width: 40.h, height: 40.h, applyThemeColor: false), SizedBox(width: 8.h), Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/presentation/my_invoices/widgets/invoice_list_card.dart b/lib/presentation/my_invoices/widgets/invoice_list_card.dart index 4a328c5e..6e0fa0e4 100644 --- a/lib/presentation/my_invoices/widgets/invoice_list_card.dart +++ b/lib/presentation/my_invoices/widgets/invoice_list_card.dart @@ -80,7 +80,7 @@ class InvoiceListCard extends StatelessWidget { child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h), + Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h, applyThemeColor: false), SizedBox(height: 2.h), "${getInvoicesListResponseModel.decimalDoctorRate}".toText11(isBold: true, color: AppColors.textColor), ], diff --git a/lib/presentation/prescriptions/prescription_detail_page.dart b/lib/presentation/prescriptions/prescription_detail_page.dart index 5bb9cbd7..b9b5b789 100644 --- a/lib/presentation/prescriptions/prescription_detail_page.dart +++ b/lib/presentation/prescriptions/prescription_detail_page.dart @@ -240,7 +240,7 @@ class _PrescriptionDetailPageState extends State { backgroundColor: widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported! ? AppColors.successColor : AppColors.greyF7Color, borderColor: AppColors.successColor.withOpacity(0.01), textColor: - widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported! ? AppColors.whiteColor : AppColors.textColor.withOpacity(0.35), + widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported! ? Colors.white : AppColors.textColor.withOpacity(0.35), fontSize: 16, fontWeight: FontWeight.w500, borderRadius: 12, @@ -248,7 +248,7 @@ class _PrescriptionDetailPageState extends State { height: 50.h, icon: AppAssets.prescription_refill_icon, iconColor: - widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported! ? AppColors.whiteColor : AppColors.textColor.withOpacity(0.35), + widget.prescriptionsResponseModel.isHomeMedicineDeliverySupported! ? Colors.white : AppColors.textColor.withOpacity(0.35), iconSize: 20.h, ).paddingSymmetrical(24.h, 24.h), ), diff --git a/lib/presentation/prescriptions/prescription_item_view.dart b/lib/presentation/prescriptions/prescription_item_view.dart index 1369d4ac..38b96d37 100644 --- a/lib/presentation/prescriptions/prescription_item_view.dart +++ b/lib/presentation/prescriptions/prescription_item_view.dart @@ -89,7 +89,7 @@ class PrescriptionItemView extends StatelessWidget { child: Row( mainAxisSize: MainAxisSize.max, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.prescription_reminder_icon, width: 35.h, height: 35.h).toShimmer2(isShow: isLoading), + Utils.buildSvgWithAssets(icon: AppAssets.prescription_reminder_icon, width: 35.h, height: 35.h, applyThemeColor: false).toShimmer2(isShow: isLoading), SizedBox(width: 8.h), Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/presentation/profile_settings/profile_settings.dart b/lib/presentation/profile_settings/profile_settings.dart index 3a44d1fd..2bd41f06 100644 --- a/lib/presentation/profile_settings/profile_settings.dart +++ b/lib/presentation/profile_settings/profile_settings.dart @@ -158,7 +158,7 @@ class ProfileSettingsState extends State { spacing: 8.w, crossAxisAlignment: CrossAxisAlignment.center, children: [ - Utils.buildSvgWithAssets(icon: AppAssets.wallet, width: 40.w, height: 40.h), + Utils.buildSvgWithAssets(icon: AppAssets.wallet, width: 40.w, height: 40.h, applyThemeColor: false), LocaleKeys.habibWallet.tr(context: context).toText16(weight: FontWeight.w600, maxlines: 2).expanded, Utils.buildSvgWithAssets(icon: getIt.get().isArabic() ? AppAssets.arrow_back : AppAssets.arrow_forward), ], @@ -194,6 +194,38 @@ 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), + 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), + 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); + }, trailingLabel: Utils.appState.isArabic() ? "العربية" : "English"), + 1.divider, + actionItem(AppAssets.bell, LocaleKeys.notificationsSettings.tr(context: context), () { + openAppSettings(); + }), + 1.divider, + Consumer( + builder: (context, profileVm, _) { + return actionItem( + AppAssets.darkModeIcon, + LocaleKeys.darkMode.tr(context: context), + () { + profileVm.toggleDarkMode(!profileVm.isDarkMode); + }, + switchValue: profileVm.isDarkMode, + onSwitchChanged: (value) { + profileVm.toggleDarkMode(value); + }, + ); + }, + ), + ], + ), + ), 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), @@ -282,7 +314,7 @@ class ProfileSettingsState extends State { ); } - Widget actionItem(String icon, String label, VoidCallback onPress, {String trailingLabel = "", bool? switchValue, bool isExternalLink = false}) { + Widget actionItem(String icon, String label, VoidCallback onPress, {String trailingLabel = "", bool? switchValue, ValueChanged? onSwitchChanged, bool isExternalLink = false}) { return SizedBox( height: 56.h, child: Row( @@ -294,7 +326,7 @@ class ProfileSettingsState extends State { switchValue != null ? Switch( value: switchValue, - onChanged: (value) {}, + onChanged: onSwitchChanged ?? (value) {}, activeThumbColor: AppColors.successColor, activeTrackColor: AppColors.successColor.withValues(alpha: .15), ) @@ -463,8 +495,8 @@ class FamilyCardWidget extends StatelessWidget { 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, + textColor: canSwitch ? AppColors.primaryRedColor : Colors.white, + iconColor: canSwitch ? AppColors.primaryRedColor : Colors.white, height: isFoldable ? 50.h : 45.h, fontSize: 14.f, ).paddingOnly(top: 12.h, right: 16.w, left: 16.w, bottom: 16.h); diff --git a/lib/presentation/radiology/radiology_result_page.dart b/lib/presentation/radiology/radiology_result_page.dart index 2328d0ea..7b3f11d4 100644 --- a/lib/presentation/radiology/radiology_result_page.dart +++ b/lib/presentation/radiology/radiology_result_page.dart @@ -85,14 +85,14 @@ class _RadiologyResultPageState extends State { }, backgroundColor: AppColors.primaryRedColor, borderColor: AppColors.primaryRedColor, - textColor: AppColors.whiteColor, + textColor: Colors.white, fontSize: 14, fontWeight: FontWeight.w500, borderRadius: 12, padding: EdgeInsets.fromLTRB(10, 0, 10, 0), height: 40.h, icon: AppAssets.download, - iconColor: AppColors.whiteColor, + iconColor: Colors.white, iconSize: 20.h, ), SizedBox(height: 16.h), @@ -145,14 +145,14 @@ class _RadiologyResultPageState extends State { }, backgroundColor: AppColors.successColor, borderColor: AppColors.successColor, - textColor: AppColors.whiteColor, + textColor: Colors.white, fontSize: 16, fontWeight: FontWeight.w500, borderRadius: 12, padding: EdgeInsets.fromLTRB(10, 0, 10, 0), height: 45.h, icon: AppAssets.download, - iconColor: AppColors.whiteColor, + iconColor: Colors.white, iconSize: 20.h, ).paddingSymmetrical(24.h, 24.h), ), diff --git a/lib/presentation/radiology/search_radiology.dart b/lib/presentation/radiology/search_radiology.dart index 8d63a59a..7c14fd1d 100644 --- a/lib/presentation/radiology/search_radiology.dart +++ b/lib/presentation/radiology/search_radiology.dart @@ -59,7 +59,7 @@ class _SearchRadiologyContentContentState extends State title: LocaleKeys.radiology.tr(), isClose: true, bottomChild: Container( - color: Colors.white, + color: AppColors.whiteColor, padding: EdgeInsets.all(ResponsiveExtension(20).h), child: CustomButton( text: LocaleKeys.search.tr(), @@ -144,7 +144,8 @@ class SuggestionChip extends StatelessWidget { borderRadius: BorderRadius.circular(8), ), child: label.toText12( - color: isSelected ? Colors.white : Colors.black87, + // color: isSelected ? Colors.white : Colors.black87, + color: AppColors.textColor, fontWeight: FontWeight.w500, ), ), diff --git a/lib/presentation/smartwatches/widgets/health_chart.dart b/lib/presentation/smartwatches/widgets/health_chart.dart index fe6ae78f..37474133 100644 --- a/lib/presentation/smartwatches/widgets/health_chart.dart +++ b/lib/presentation/smartwatches/widgets/health_chart.dart @@ -19,7 +19,7 @@ class HealthChart extends StatelessWidget { height: 200, padding: const EdgeInsets.all(16), decoration: BoxDecoration( - color: Colors.white, + color: AppColors.whiteColor, borderRadius: BorderRadius.circular(16), boxShadow: [ BoxShadow( diff --git a/lib/presentation/symptoms_checker/possible_conditions_screen.dart b/lib/presentation/symptoms_checker/possible_conditions_screen.dart index 80c70714..323a13c2 100644 --- a/lib/presentation/symptoms_checker/possible_conditions_screen.dart +++ b/lib/presentation/symptoms_checker/possible_conditions_screen.dart @@ -49,7 +49,7 @@ class PossibleConditionsPage extends StatelessWidget { child: Container( height: 80.h, decoration: BoxDecoration( - color: Colors.white, + color: AppColors.whiteColor, borderRadius: BorderRadius.circular(10.r), ), ), diff --git a/lib/presentation/symptoms_checker/risk_factors_screen.dart b/lib/presentation/symptoms_checker/risk_factors_screen.dart index 484ad2d7..462cffbd 100644 --- a/lib/presentation/symptoms_checker/risk_factors_screen.dart +++ b/lib/presentation/symptoms_checker/risk_factors_screen.dart @@ -184,7 +184,7 @@ class _RiskFactorsScreenState extends State { Container( height: 40.h, decoration: BoxDecoration( - color: Colors.white, + color: AppColors.whiteColor, borderRadius: BorderRadius.circular(24.r), ), ).toShimmer2(isShow: true, radius: 24.r), diff --git a/lib/presentation/symptoms_checker/suggestions_screen.dart b/lib/presentation/symptoms_checker/suggestions_screen.dart index 8d32b7f4..cbfc15a1 100644 --- a/lib/presentation/symptoms_checker/suggestions_screen.dart +++ b/lib/presentation/symptoms_checker/suggestions_screen.dart @@ -160,7 +160,7 @@ class _SuggestionsScreenState extends State { Container( height: 40.h, decoration: BoxDecoration( - color: Colors.white, + color: AppColors.whiteColor, borderRadius: BorderRadius.circular(24.r), ), ).toShimmer2(isShow: true, radius: 24.r), diff --git a/lib/presentation/symptoms_checker/symptoms_selector_screen.dart b/lib/presentation/symptoms_checker/symptoms_selector_screen.dart index cbbfc68e..d7fbf63c 100644 --- a/lib/presentation/symptoms_checker/symptoms_selector_screen.dart +++ b/lib/presentation/symptoms_checker/symptoms_selector_screen.dart @@ -222,7 +222,7 @@ class _SymptomsSelectorPageState extends State { Container( height: 40.h, decoration: BoxDecoration( - color: Colors.white, + color: AppColors.whiteColor, borderRadius: BorderRadius.circular(24.r), ), ).toShimmer2(isShow: true, radius: 24.r), diff --git a/lib/presentation/symptoms_checker/triage_screen.dart b/lib/presentation/symptoms_checker/triage_screen.dart index 0231ef19..b4ceff4c 100644 --- a/lib/presentation/symptoms_checker/triage_screen.dart +++ b/lib/presentation/symptoms_checker/triage_screen.dart @@ -275,7 +275,7 @@ class _TriagePageState extends State { Container( height: 40.h, decoration: BoxDecoration( - color: Colors.white, + color: AppColors.whiteColor, borderRadius: BorderRadius.circular(24.r), ), ).toShimmer2(isShow: true, radius: 24.r), diff --git a/lib/presentation/symptoms_checker/widgets/organ_dot_widget.dart b/lib/presentation/symptoms_checker/widgets/organ_dot_widget.dart index 0783dfb7..2ef4497c 100644 --- a/lib/presentation/symptoms_checker/widgets/organ_dot_widget.dart +++ b/lib/presentation/symptoms_checker/widgets/organ_dot_widget.dart @@ -34,7 +34,7 @@ class OrganDot extends StatelessWidget { child: Container( width: size.w * 0.25, height: size.h * 0.25, - decoration: const BoxDecoration( + decoration: BoxDecoration( shape: BoxShape.circle, color: AppColors.whiteColor, ), diff --git a/lib/presentation/todo_section/ancillary_order_payment_page.dart b/lib/presentation/todo_section/ancillary_order_payment_page.dart index b34bf212..9d75c769 100644 --- a/lib/presentation/todo_section/ancillary_order_payment_page.dart +++ b/lib/presentation/todo_section/ancillary_order_payment_page.dart @@ -264,6 +264,7 @@ class _AncillaryOrderPaymentPageState extends State { width: 200.h, height: 80.h, fit: BoxFit.contain, + applyThemeColor: false, ).paddingSymmetrical(24.h, 0.h).onPress(() { if (!todoSectionViewModel.isProcessingPayment) { if (Utils.havePrivilege(103)) { diff --git a/lib/presentation/todo_section/ancillary_procedures_details_page.dart b/lib/presentation/todo_section/ancillary_procedures_details_page.dart index eba80cd4..38d4f978 100644 --- a/lib/presentation/todo_section/ancillary_procedures_details_page.dart +++ b/lib/presentation/todo_section/ancillary_procedures_details_page.dart @@ -673,7 +673,7 @@ class _AncillaryOrderDetailsListState extends State { ); }, isDisabled: !isButtonEnabled, - textColor: AppColors.whiteColor, + textColor: Colors.white, borderRadius: 12.r, borderColor: Colors.transparent, padding: EdgeInsets.symmetric(vertical: 16.h), diff --git a/lib/presentation/water_monitor/water_consumption_page.dart b/lib/presentation/water_monitor/water_consumption_page.dart index 54dace58..7e6d1d5e 100644 --- a/lib/presentation/water_monitor/water_consumption_page.dart +++ b/lib/presentation/water_monitor/water_consumption_page.dart @@ -79,7 +79,7 @@ class _WaterConsumptionPageState extends State { subTitle.toText18(weight: FontWeight.w600), ], ), - Utils.buildSvgWithAssets(icon: AppAssets.greenTickIcon) + Utils.buildSvgWithAssets(icon: AppAssets.greenTickIcon, applyThemeColor: false) ], ).paddingSymmetrical(0, 8.h); } diff --git a/lib/presentation/water_monitor/water_monitor_settings_page.dart b/lib/presentation/water_monitor/water_monitor_settings_page.dart index a3c82c0c..81157c8a 100644 --- a/lib/presentation/water_monitor/water_monitor_settings_page.dart +++ b/lib/presentation/water_monitor/water_monitor_settings_page.dart @@ -75,7 +75,7 @@ class _WaterMonitorSettingsPageState extends State { message: "", child: Container( padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h), - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)), child: ListView.separated( shrinkWrap: true, itemCount: items.length, diff --git a/lib/theme/app_theme.dart b/lib/theme/app_theme.dart index c09d537f..51d2cbc2 100644 --- a/lib/theme/app_theme.dart +++ b/lib/theme/app_theme.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; +import 'package:hmg_patient_app_new/theme/colors.dart'; class AppTheme { static ThemeData getTheme(isArabic) => ThemeData( @@ -14,33 +15,13 @@ class AppTheme { }, ), 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), canvasColor: Colors.white, - // backgroundColor: const Color.fromRGBO(255, 255, 255, 1), highlightColor: Colors.grey[100]!.withOpacity(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), appBarTheme: AppBarTheme( color: const Color(0xff515A5D), @@ -52,6 +33,38 @@ class AppTheme { surfaceTintColor: Colors.transparent, ), ); + + 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() + }, + ), + hintColor: Colors.grey[600], + disabledColor: Colors.grey[700], + textSelectionTheme: const TextSelectionThemeData(cursorColor: Colors.grey, selectionColor: Color.fromRGBO(80, 100, 253, 0.5), selectionHandleColor: Colors.grey), + canvasColor: AppColors.dark.scaffoldBgColor, + scaffoldBackgroundColor: AppColors.dark.scaffoldBgColor, + highlightColor: Colors.grey[800]!.withOpacity(0.4), + splashColor: Colors.transparent, + bottomSheetTheme: BottomSheetThemeData( + backgroundColor: Colors.black.withOpacity(0)), + floatingActionButtonTheme: const FloatingActionButtonThemeData(highlightElevation: 2, disabledElevation: 0, elevation: 2), + appBarTheme: AppBarTheme( + color: AppColors.dark.scaffoldBgColor, + elevation: 0.0, + actionsIconTheme: const IconThemeData( + color: Colors.white, + ), + systemOverlayStyle: SystemUiOverlayStyle.light, + surfaceTintColor: Colors.transparent, + ), + ); } extension ExtendedRevoCheckTheme on TextTheme { diff --git a/lib/theme/colors.dart b/lib/theme/colors.dart index f80085aa..514acfb4 100644 --- a/lib/theme/colors.dart +++ b/lib/theme/colors.dart @@ -1,118 +1,310 @@ import 'package:flutter/material.dart'; class AppColors { + /// Global dark-mode flag — toggled by ProfileSettingsViewModel. + /// When true, every getter below returns the dark palette value. + static bool isDarkMode = false; + static const transparent = Colors.transparent; - static const mainPurple = Color(0xFF7954F7); // #7954F7 - - static const scaffoldBgColor = Color(0xFFF8F8F8); // #F8F8F8 - static const bottomSheetBgColor = Color(0xFFF8F8FA); // #F8F8FA - static const lightGreyEFColor = Color(0xffeaeaff); // #EAEAFF - static const greyF7Color = Color(0xffF7F7F7); // #F7F7F7 - static const greyInfoTextColor = Color(0xff777777); // #777777 - static const lightGrayColor = Color(0xff808080); // #808080 - static const greyTextColorLight = Color(0xFFA2A2A2); // #A2A2A2 - -// New UI 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 textColor = Color(0xFF2E3039); // #2E3039 - 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 - 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 - static const Color statusPendingColor = Color(0xffCC9B14); // #CC9B14 - static const Color statusProcessingColor = Color(0xff2E303A); // #2E303A - static const Color statusCompletedColor = Color(0xff359846); // #359846 - static const Color statusRejectedColor = Color(0xffD02127); // #D02127 - - // 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 infoBannerTextColor = Color(0xFF856404); // #856404 - - // SymptomsChecker - - 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 - - // 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 bookAppointment = Color(0xFF415364); // #415364 + + // ── Scaffold / Background ───────────────────────────────────────────────── + static Color get scaffoldBgColor => isDarkMode ? dark.scaffoldBgColor : const Color(0xFFF8F8F8); + static Color get bottomSheetBgColor => isDarkMode ? dark.bottomSheetBgColor : const Color(0xFFF8F8FA); + static Color get lightGreyEFColor => isDarkMode ? dark.lightGreyEFColor : const Color(0xffeaeaff); + static Color get greyF7Color => isDarkMode ? dark.greyF7Color : const Color(0xffF7F7F7); + static Color get greyInfoTextColor => isDarkMode ? dark.greyInfoTextColor : const Color(0xff777777); + static Color get lightGrayColor => isDarkMode ? dark.lightGrayColor : const Color(0xff808080); + static Color get greyTextColorLight => isDarkMode ? dark.greyTextColorLight : const Color(0xFFA2A2A2); + static Color get mainPurple => isDarkMode ? dark.mainPurple : const Color(0xFF7954F7); + + // ── Core Colors ─────────────────────────────────────────────────────────── + static Color get whiteColor => isDarkMode ? dark.whiteColor : const Color(0xFFffffff); + // static const Color primaryRedColor = Color(0xFFED1C2B); + static Color get primaryRedColor => isDarkMode ? dark.primaryRedColor : Color(0xFFED1C2B); + static Color get secondaryLightRedColor => isDarkMode ? dark.secondaryLightRedColor : const Color(0xFFFEE9EA); + static const Color successColor = Color(0xFF18C273); + static Color get successLightBgColor => isDarkMode ? dark.successLightBgColor : const Color(0xffDDF6EA); + static Color get greyColor => isDarkMode ? dark.greyColor : const Color(0xFFEFEFF0); + static Color get chipBgColor => isDarkMode ? dark.chipBgColor : const Color(0xFFEFEFF0); + static Color get textColor => isDarkMode ? dark.textColor : const Color(0xFF2E3039); + static Color get iconColor => isDarkMode ? dark.iconColor : const Color(0xFF2E3039); + static Color get borderGrayColor => isDarkMode ? dark.borderGrayColor : const Color(0x332E3039); + static Color get textColorLight => isDarkMode ? dark.textColorLight : const Color(0xFF5E5E5E); + static Color get dividerColor => isDarkMode ? dark.dividerColor : const Color(0x40D2D2D2); + static Color get warningColorYellow => isDarkMode ? dark.warningColorYellow : const Color(0xFFF4A308); + static Color get inputLabelTextColor => isDarkMode ? dark.inputLabelTextColor : const Color(0xff898A8D); + static Color get greyTextColor => isDarkMode ? dark.greyTextColor : const Color(0xFF8F9AA3); + static Color get lightGrayBGColor => isDarkMode ? dark.lightGrayBGColor : const Color(0x142E3039); + static Color get checkBoxBorderColor => isDarkMode ? dark.checkBoxBorderColor : const Color(0xffD2D2D2); + static Color get pharmacyBGColor => isDarkMode ? dark.pharmacyBGColor : const Color(0xFF359846); + static Color get lightGreenColor => isDarkMode ? dark.lightGreenColor : const Color(0xFF0ccedde); + static Color get ratingColorYellow => isDarkMode ? dark.ratingColorYellow : const Color(0xFFFFAF15); + static Color get spacerLineColor => isDarkMode ? dark.spacerLineColor : const Color(0x2E30391A); + + // ── Semantic / Status Colors ────────────────────────────────────────────── + static Color get errorColor => isDarkMode ? dark.errorColor : const Color(0xFFED1C2B); + static Color get alertColor => isDarkMode ? dark.alertColor : const Color(0xFFD48D05); + static Color get infoColor => isDarkMode ? dark.infoColor : const Color(0xFF0B85F7); + static Color get warningColor => isDarkMode ? dark.warningColor : const Color(0xFFFFCC00); + static Color get switchBackgroundColor => isDarkMode ? dark.switchBackgroundColor : const Color(0x2618C273); + static Color get bottomNAVBorder => isDarkMode ? dark.bottomNAVBorder : const Color(0xFFEEEEEE); + static Color get quickLoginColor => isDarkMode ? dark.quickLoginColor : const Color(0xFF666666); + static Color get tooltipTextColor => isDarkMode ? dark.tooltipTextColor : const Color(0xFF414D55); + static Color get graphGridColor => isDarkMode ? dark.graphGridColor : const Color(0x4D18C273); + static Color get highAndLow => isDarkMode ? dark.highAndLow : const Color(0xFFFFAF15); + static Color get labelTextColor => isDarkMode ? dark.labelTextColor : const Color(0xFF838383); + static Color get calenderTextColor => isDarkMode ? dark.calenderTextColor : const Color(0xFFD0D0D0); + static Color get lightGreenButtonColor => isDarkMode ? dark.lightGreenButtonColor : const Color(0x2618C273); + static Color get lightRedButtonColor => isDarkMode ? dark.lightRedButtonColor : const Color(0x1AED1C2B); + + // ── Status Colors ───────────────────────────────────────────────────────── + static Color get statusPendingColor => isDarkMode ? dark.statusPendingColor : const Color(0xffCC9B14); + static Color get statusProcessingColor => isDarkMode ? dark.statusProcessingColor : const Color(0xff2E303A); + static Color get statusCompletedColor => isDarkMode ? dark.statusCompletedColor : const Color(0xff359846); + static Color get statusRejectedColor => isDarkMode ? dark.statusRejectedColor : const Color(0xffD02127); + + // ── Info Banner Colors ──────────────────────────────────────────────────── + static Color get infoBannerBgColor => isDarkMode ? dark.infoBannerBgColor : const Color(0xFFFFF4E6); + static Color get infoBannerBorderColor => isDarkMode ? dark.infoBannerBorderColor : const Color(0xFFFFE5B4); + static Color get infoBannerIconColor => isDarkMode ? dark.infoBannerIconColor : const Color(0xFFCC9B14); + static Color get infoBannerTextColor => isDarkMode ? dark.infoBannerTextColor : const Color(0xFF856404); + + // ── Symptoms Checker ─────────────────────────────────────────────��──────── + static Color get chipColorSeekMedicalAdvice => isDarkMode ? dark.chipColorSeekMedicalAdvice : const Color(0xFFFFAF15); + static Color get chipTextColorSeekMedicalAdvice => isDarkMode ? dark.chipTextColorSeekMedicalAdvice : const Color(0xFFD48D05); + + // ── Services Page Colors ────────────────────────────────────────────────── + static Color get eReferralCardColor => isDarkMode ? dark.eReferralCardColor : const Color(0xFFFF8012); + static Color get bloodDonationCardColor => isDarkMode ? dark.bloodDonationCardColor : const Color(0xFFFF5662); + static Color get myChildVaccineCardColor => isDarkMode ? dark.myChildVaccineCardColor : const Color(0xFFFF2D78); + static Color get bookAppointment => isDarkMode ? dark.bookAppointment : const Color(0xFF415364); + + // ── Water Monitor ───────────────────────────────────────────────────────── + static Color get blueColor => isDarkMode ? dark.blueColor : const Color(0xFF4EB5FF); + static Color get blueGradientColorOne => isDarkMode ? dark.blueGradientColorOne : const Color(0xFFF1F7FD); + static Color get blueGradientColorTwo => isDarkMode ? dark.blueGradientColorTwo : const Color(0xFFD9EFFF); + + // ── Shimmer ─────────────────────────────────────────────────────────────── + static Color get shimmerBaseColor => isDarkMode ? dark.shimmerBaseColor : const Color(0xFFE0E0E0); + static Color get shimmerHighlightColor => isDarkMode ? dark.shimmerHighlightColor : const Color(0xFFF5F5F5); + static Color get covid29Color => isDarkMode ? dark.covid29Color : const Color(0xff2563EB); + static Color get lightGreyTextColor => isDarkMode ? dark.lightGreyTextColor : const Color(0xFF959595); + static Color get labelColorYellow => isDarkMode ? dark.labelColorYellow : const Color(0xFFFBCB6E); + + static const LinearGradient aiLinearGradient = + LinearGradient(colors: [Color(0xFF8A38F5), Color(0xFFE20BBB)], begin: Alignment.topLeft, end: Alignment.bottomRight); + + // ── Aliases ─────────────────────────────────────────────────────────────── + static Color get bgScaffoldColor => scaffoldBgColor; + static Color get primaryRedBorderColor => primaryRedColor; + static Color get chipPrimaryRedBorderColor => primaryRedColor; + static Color get criticalLowAndHigh => primaryRedColor; + static Color get chipColorEmergency => primaryRedColor; + static Color get errorLightColor => primaryRedColor; + static Color get secondaryLightRedBorderColor => secondaryLightRedColor; + static Color get bgRedLightColor => secondaryLightRedColor; + static Color get chipSecondaryLightRedColor => secondaryLightRedColor; + static Color get blackBgColor => textColor; + static Color get blackColor => textColor; + static Color get borderOnlyColor => textColor; + static Color get chipBorderColorOpacity20 => borderGrayColor; + static Color get bgGreenColor => successColor; + static Color get textGreenColor => successColor; + static Color get successLightColor => successColor; + static Color get thumbColor => successColor; + static Color get chipColorMonitor => successColor; + static Color get greyLightColor => greyColor; + static Color get alertLightColor => alertColor; + static Color get infoLightColor => infoColor; + static Color get warningLightColor => warningColor; + + // ── Dark Mode Palette ───────────────────────────────────────────────────── + 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); + Color get bottomSheetBgColor => const Color(0xFF1C1C1E); + 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); + + // ⚠️ NEW — was missing from AppColorsDark + Color get mainPurple => const Color(0xFF9B7AFF); // brighter purple for dark surfaces + + // Core + Color get baseColor => const Color(0xFF1E1E1E); + // ⚠️ NEW — maps whiteColor → dark surface color + Color get whiteColor => const Color(0xFF1E1E1E); // surface replacement for white + Color get primaryRedColor => const Color(0xFFDE5C5D); + Color get secondaryLightRedColor => const Color(0xFF3A1015); + Color get successColor => const Color(0xFF18C273); + Color get successLightBgColor => const Color(0xFF0D2E1F); + Color get textColor => const Color(0xFFFFFFFF); + Color get iconColor => const Color(0xFFFFFFFF); + Color get borderGrayColor => const Color(0x55ECECEC); + Color get textColorLight => const Color(0xFFB0B0B0); + Color get dividerColor => const Color(0x33FFFFFF); + Color get warningColorYellow => const Color(0xFFF4A308); + Color get inputLabelTextColor => const Color(0xFF9E9E9E); + Color get greyTextColor => const Color(0xFF8F9AA3); + Color get lightGrayBGColor => const Color(0x22FFFFFF); + Color get checkBoxBorderColor => const Color(0xFF555555); + Color get pharmacyBGColor => const Color(0xFF359846); + // ⚠️ NEW — was missing from AppColorsDark + Color get lightGreenColor => const Color(0xFF0ccedde); // same teal accent — works on dark + Color get ratingColorYellow => const Color(0xFFFFAF15); + Color get spacerLineColor => const Color(0x22FFFFFF); + + // Semantic / Status + Color get errorColor => const Color(0xFFD63D48); + Color get alertColor => const Color(0xFFD48D05); + Color get infoColor => const Color(0xFF4DA6FF); + Color get warningColor => const Color(0xFFFFCC00); + Color get greyColor => const Color(0xFF2C2C2E); + Color get chipBgColor => const Color(0xFF3E3E3E); + Color get cardDarkBorderColor => const Color(0x0DEAEAEA); + Color get serviceCardButtonColor => const Color(0xFF3E3E3E); + 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 { + bool get _isDark => Theme.of(this).brightness == Brightness.dark; + + // Scaffold / Background + Color get scaffoldBgColor => _isDark ? AppColors.dark.scaffoldBgColor : const Color(0xFFF8F8F8); + Color get bottomSheetBgColor => _isDark ? AppColors.dark.bottomSheetBgColor : const Color(0xFFF8F8FA); + Color get greyF7Color => _isDark ? AppColors.dark.greyF7Color : const Color(0xffF7F7F7); + Color get greyInfoTextColor => _isDark ? AppColors.dark.greyInfoTextColor : const Color(0xff777777); + Color get lightGrayColor => _isDark ? AppColors.dark.lightGrayColor : const Color(0xff808080); + + // Core + Color get cardBaseColor => _isDark ? AppColors.dark.baseColor : const Color(0xFFFFFFFF); + Color get primaryRedColor => _isDark ? AppColors.dark.primaryRedColor : AppColors.primaryRedColor; + Color get secondaryLightRedColor => _isDark ? AppColors.dark.serviceCardButtonColor : const Color(0xFFFEE9EA); + Color get secondaryLightRedForegroundColor => _isDark ? const Color(0xFFFFFFFF) : AppColors.primaryRedColor; + Color get successColor => AppColors.successColor; + Color get successLightBgColor => _isDark ? AppColors.dark.successLightBgColor : const Color(0xffDDF6EA); + Color get textColor => _isDark ? AppColors.dark.textColor : const Color(0xFF2E3039); + Color get iconColor => _isDark ? AppColors.dark.iconColor : const Color(0xFF2E3039); + Color get borderGrayColor => _isDark ? AppColors.dark.borderGrayColor : const Color(0x332E3039); + Color get textColorLight => _isDark ? AppColors.dark.textColorLight : const Color(0xFF5E5E5E); + Color get dividerColor => _isDark ? AppColors.dark.dividerColor : const Color(0x40D2D2D2); + Color get inputLabelTextColor => _isDark ? AppColors.dark.inputLabelTextColor : const Color(0xff898A8D); + Color get greyTextColor => AppColors.greyTextColor; + Color get lightGrayBGColor => _isDark ? AppColors.dark.lightGrayBGColor : const Color(0x142E3039); + Color get checkBoxBorderColor => _isDark ? AppColors.dark.checkBoxBorderColor : const Color(0xffD2D2D2); + + // Status / Semantic + Color get errorColor => _isDark ? AppColors.dark.errorColor : const Color(0xFFED1C2B); + Color get alertColor => AppColors.alertColor; + Color get infoColor => _isDark ? AppColors.dark.infoColor : const Color(0xFF0B85F7); + Color get warningColor => AppColors.warningColor; + Color get greyColor => _isDark ? AppColors.dark.greyColor : const Color(0xFFEFEFF0); + Color get chipBgColor => _isDark ? AppColors.dark.chipBgColor : const Color(0xFFEFEFF0); + Color get cardDarkBorderColor => _isDark ? AppColors.dark.cardDarkBorderColor : Colors.transparent; + Color get serviceCardButtonColor => _isDark ? AppColors.dark.serviceCardButtonColor : const Color(0xFF2E3039); + Color get bottomNAVBorder => _isDark ? AppColors.dark.bottomNAVBorder : const Color(0xFFEEEEEE); + Color get labelTextColor => _isDark ? AppColors.dark.labelTextColor : const Color(0xFF838383); + Color get lightGreyTextColor => _isDark ? AppColors.dark.lightGreyTextColor : const Color(0xFF959595); + + // Info Banner + Color get infoBannerBgColor => _isDark ? AppColors.dark.infoBannerBgColor : const Color(0xFFFFF4E6); + Color get infoBannerBorderColor => _isDark ? AppColors.dark.infoBannerBorderColor : const Color(0xFFFFE5B4); + Color get infoBannerIconColor => AppColors.infoBannerIconColor; + Color get infoBannerTextColor => _isDark ? AppColors.dark.infoBannerTextColor : const Color(0xFF856404); // Water Monitor - static const Color blueColor = Color(0xFF4EB5FF); // #4EB5FF - static const Color blueGradientColorOne = Color(0xFFF1F7FD); // #F1F7FD - static const Color blueGradientColorTwo = Color(0xFFD9EFFF); // #D9EFFF + Color get blueColor => AppColors.blueColor; + Color get blueGradientColorOne => _isDark ? AppColors.dark.blueGradientColorOne : const Color(0xFFF1F7FD); + Color get blueGradientColorTwo => _isDark ? AppColors.dark.blueGradientColorTwo : const Color(0xFFD9EFFF); // Shimmer - 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); + Color get shimmerBaseColor => _isDark ? AppColors.dark.shimmerBaseColor : const Color(0xFFE0E0E0); + Color get shimmerHighlightColor => _isDark ? AppColors.dark.shimmerHighlightColor : const Color(0xFFF5F5F5); - static const LinearGradient aiLinearGradient = LinearGradient(colors: [Color(0xFF8A38F5), Color(0xFFE20BBB)], begin: Alignment.topLeft, end: Alignment.bottomRight); + // Aliases + Color get bgScaffoldColor => scaffoldBgColor; + Color get bgGreenColor => successColor; + Color get bgRedLightColor => secondaryLightRedColor; + Color get blackColor => textColor; + Color get blackBgColor => textColor; } diff --git a/lib/widgets/appbar/app_bar_widget.dart b/lib/widgets/appbar/app_bar_widget.dart index 942a93f2..05db7724 100644 --- a/lib/widgets/appbar/app_bar_widget.dart +++ b/lib/widgets/appbar/app_bar_widget.dart @@ -57,7 +57,7 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget { ), // Logo - if (!hideLogoAndLang) Utils.buildSvgWithAssets(icon: AppAssets.habiblogo, height: 24.h), + if (!hideLogoAndLang) Utils.buildSvgWithAssets(icon: AppAssets.habiblogo, height: 24.h, applyThemeColor: false), if (!hideLogoAndLang) Expanded( diff --git a/lib/widgets/appbar/collapsing_toolbar.dart b/lib/widgets/appbar/collapsing_toolbar.dart index 8bf1e4b4..9b1d4854 100644 --- a/lib/widgets/appbar/collapsing_toolbar.dart +++ b/lib/widgets/appbar/collapsing_toolbar.dart @@ -96,7 +96,7 @@ class _CollapsingToolbarState extends State { ? Transform.flip( flipX: appState.isArabic(), child: IconButton( - icon: Utils.buildSvgWithAssets(icon: widget.isClose ? AppAssets.closeBottomNav : AppAssets.arrow_back, width: 32.h, height: 32.h), + icon: Utils.buildSvgWithAssets(icon: widget.isClose ? AppAssets.closeBottomNav : AppAssets.arrow_back, width: 32.h, height: 32.h, applyThemeColor: false), padding: EdgeInsets.only(left: 12), onPressed: () => Navigator.pop(context), highlightColor: Colors.transparent, diff --git a/lib/widgets/arrow_back.dart b/lib/widgets/arrow_back.dart index cf3e52ef..4446ea9b 100644 --- a/lib/widgets/arrow_back.dart +++ b/lib/widgets/arrow_back.dart @@ -3,12 +3,13 @@ import 'package:flutter/material.dart'; class ArrowBack extends StatelessWidget { final Function? onTap; - final Color color; + final Color? color; - ArrowBack({Key? key, this.onTap, this.color = AppColors.whiteColor}) : super(key: key); + ArrowBack({Key? key, this.onTap, this.color}) : super(key: key); @override Widget build(BuildContext context) { + final resolvedColor = color ?? AppColors.whiteColor; // ProjectViewModel projectViewModel = Provider.of(context); return GestureDetector( behavior: HitTestBehavior.opaque, @@ -17,7 +18,7 @@ class ArrowBack extends StatelessWidget { }, context), child: Icon( Icons.arrow_back_ios, - color: color, + color: resolvedColor, ), ); } diff --git a/lib/widgets/bottom_navigation/bottom_navigation.dart b/lib/widgets/bottom_navigation/bottom_navigation.dart index 46067dfe..9d390388 100644 --- a/lib/widgets/bottom_navigation/bottom_navigation.dart +++ b/lib/widgets/bottom_navigation/bottom_navigation.dart @@ -28,9 +28,7 @@ class BottomNavigation extends StatelessWidget { icon: AppAssets.bookAppoBottom, fillIcon: AppAssets.bookAppoBottom, label: LocaleKeys.appointment.tr(context: context), - iconSize: 32, - isSpecial: true, - ), + iconSize: 32, 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)) @@ -39,8 +37,16 @@ class BottomNavigation extends StatelessWidget { ]; return Container( - decoration: _containerDecoration, - padding: _containerPadding, + decoration: BoxDecoration( + color: AppColors.whiteColor, + border: Border( + top: BorderSide( + color: AppColors.bottomNAVBorder, + width: 0.5, + ), + ), + ), + padding: const EdgeInsets.all(15), // height: 84.h, child: Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, @@ -69,6 +75,7 @@ class BottomNavigation extends StatelessWidget { icon: isSelected ? item.fillIcon : item.icon, height: item.iconSize.h, width: item.iconSize.w, + applyThemeColor: !item.isSpecial // iconColor: isSelected ? Colors.black87 : Colors.black87, ), // const SizedBox(height: 10), @@ -100,14 +107,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/bottom_sheet.dart b/lib/widgets/bottom_sheet.dart index 4aef0efa..ee70782b 100644 --- a/lib/widgets/bottom_sheet.dart +++ b/lib/widgets/bottom_sheet.dart @@ -1,5 +1,6 @@ import 'package:hmg_patient_app_new/extensions/int_extensions.dart'; import 'package:flutter/material.dart'; +import 'package:hmg_patient_app_new/theme/colors.dart'; void showMyBottomSheet(BuildContext context, {required Widget child, required VoidCallback callBackFunc, String? type}) { showModalBottomSheet( @@ -10,8 +11,8 @@ void showMyBottomSheet(BuildContext context, {required Widget child, required Vo return Container( constraints: BoxConstraints( maxHeight: type =='CONTINUE_ACTION' ? MediaQuery.of(context).size.height *.75 : double.infinity,), - decoration: const BoxDecoration( - color: Colors.white, + decoration: BoxDecoration( + color: AppColors.whiteColor, borderRadius: BorderRadius.only( topRight: Radius.circular(25), topLeft: Radius.circular(25), diff --git a/lib/widgets/buttons/default_button.dart b/lib/widgets/buttons/default_button.dart index d8d8cacd..f6a47a1c 100644 --- a/lib/widgets/buttons/default_button.dart +++ b/lib/widgets/buttons/default_button.dart @@ -1,10 +1,11 @@ import 'package:flutter/material.dart'; import 'package:flutter_svg/svg.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; +import 'package:hmg_patient_app_new/theme/colors.dart'; extension WithContainer on Widget { Widget get insideContainer => Container( - color: Colors.white, + color: AppColors.whiteColor, padding: const EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), child: this, ); diff --git a/lib/widgets/chip/app_custom_chip_widget.dart b/lib/widgets/chip/app_custom_chip_widget.dart index 8597b3ed..77345933 100644 --- a/lib/widgets/chip/app_custom_chip_widget.dart +++ b/lib/widgets/chip/app_custom_chip_widget.dart @@ -9,23 +9,24 @@ class AppCustomChipWidget extends StatelessWidget { const AppCustomChipWidget({ super.key, this.labelText, - this.textColor = AppColors.textColor, - this.backgroundColor = AppColors.greyColor, + this.textColor, + this.backgroundColor, this.iconSize, this.icon = "", - this.iconColor = AppColors.textColor, + this.iconColor, this.richText, this.iconHasColor = true, this.shape, this.deleteIcon, this.deleteIconSize, - this.deleteIconColor = AppColors.textColor, + this.deleteIconColor, this.deleteIconHasColor = false, this.padding = EdgeInsets.zero, this.isIconPNG = false, this.onChipTap, this.labelPadding, this.onDeleteTap, + this.applyThemeColor = true, }); final String? labelText; @@ -36,7 +37,7 @@ class AppCustomChipWidget extends StatelessWidget { final String icon; final String? deleteIcon; final Size? deleteIconSize; - final Color iconColor; + final Color? iconColor; final Color? deleteIconColor; final bool iconHasColor; final bool deleteIconHasColor; @@ -46,10 +47,15 @@ class AppCustomChipWidget extends StatelessWidget { final bool isIconPNG; final void Function()? onChipTap; final void Function()? onDeleteTap; + final bool applyThemeColor; @override Widget build(BuildContext context) { final iconS = iconSize ?? 12.w; + final resolvedTextColor = textColor ?? AppColors.textColor; + final resolvedBackgroundColor = backgroundColor ?? AppColors.greyColor; + final resolvedIconColor = iconColor ?? AppColors.textColor; + final resolvedDeleteIconColor = deleteIconColor ?? AppColors.textColor; return GestureDetector( onTap: onChipTap, child: SizedBox( @@ -74,15 +80,16 @@ class AppCustomChipWidget extends StatelessWidget { icon: icon, width: iconS, height: iconS, - iconColor: iconHasColor ? iconColor : null, + iconColor: iconHasColor ? resolvedIconColor : null, fit: BoxFit.contain, + applyThemeColor: applyThemeColor, ) : SizedBox.shrink(), - label: richText ?? (labelText?? "").toText10(weight: FontWeight.w500, letterSpacing: 0, color: textColor), + label: richText ?? (labelText?? "").toText10(weight: FontWeight.w500, letterSpacing: 0, color: resolvedTextColor), padding: padding, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, labelPadding: labelPadding ?? EdgeInsetsDirectional.only(end: deleteIcon?.isNotEmpty == true ? 2.w : 8.w), - backgroundColor: backgroundColor, + backgroundColor: resolvedBackgroundColor, shape: shape ?? SmoothRectangleBorder( borderRadius: BorderRadius.circular(8.r), @@ -96,7 +103,8 @@ class AppCustomChipWidget extends StatelessWidget { icon: deleteIcon!, width: iconS, height: iconS, - iconColor: deleteIconHasColor ? deleteIconColor : null, + iconColor: deleteIconHasColor ? resolvedDeleteIconColor : null, + applyThemeColor: applyThemeColor, ), ) : null, @@ -104,9 +112,9 @@ 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: resolvedTextColor, isCenter: true), padding: EdgeInsets.zero, - backgroundColor: backgroundColor, + backgroundColor: resolvedBackgroundColor, shape: shape ?? SmoothRectangleBorder( borderRadius: BorderRadius.circular(8.r), @@ -118,7 +126,7 @@ class AppCustomChipWidget extends StatelessWidget { ? InkWell( onTap: onDeleteTap, child: Utils.buildSvgWithAssets( - icon: deleteIcon!, width: iconS, height: iconS, iconColor: deleteIconHasColor ? deleteIconColor : null)) + icon: deleteIcon!, width: iconS, height: iconS, iconColor: deleteIconHasColor ? resolvedDeleteIconColor : null, applyThemeColor: applyThemeColor)) : null, onDeleted: deleteIcon?.isNotEmpty == true ? () {} : null, ), diff --git a/lib/widgets/chip/custom_selectable_chip.dart b/lib/widgets/chip/custom_selectable_chip.dart index be42bfd9..06ccb95f 100644 --- a/lib/widgets/chip/custom_selectable_chip.dart +++ b/lib/widgets/chip/custom_selectable_chip.dart @@ -9,7 +9,7 @@ class CustomSelectableChip extends StatelessWidget { final Color activeColor; final Color activeTextColor; final Color inactiveBorderColor; - final Color inactiveTextColor; + final Color? inactiveTextColor; const CustomSelectableChip({ super.key, @@ -19,11 +19,12 @@ class CustomSelectableChip extends StatelessWidget { this.activeColor = const Color(0xFFD03C32), // red accent this.activeTextColor = Colors.white, this.inactiveBorderColor = const Color(0xFFE8E8E8), - this.inactiveTextColor = const Color(0xFF222222), + this.inactiveTextColor, }); @override Widget build(BuildContext context) { + final resolvedInactiveTextColor = inactiveTextColor ?? AppColors.textColor; final double radius = 8.0; return AnimatedContainer( duration: const Duration(milliseconds: 180), @@ -44,7 +45,7 @@ class CustomSelectableChip extends StatelessWidget { style: TextStyle( fontSize: 12.f, fontWeight: FontWeight.w500, - color: selected ? activeTextColor : inactiveTextColor, + color: selected ? activeTextColor : resolvedInactiveTextColor, letterSpacing: -0.02 * 18, height: 1.0, ), diff --git a/lib/widgets/common_bottom_sheet.dart b/lib/widgets/common_bottom_sheet.dart index 515d1f72..5269a8dc 100644 --- a/lib/widgets/common_bottom_sheet.dart +++ b/lib/widgets/common_bottom_sheet.dart @@ -134,7 +134,7 @@ class ButtonSheetContent extends StatelessWidget { padding: EdgeInsets.symmetric( horizontal: 16, ), - child: Utils.buildSvgWithAssets(icon: AppAssets.closeBottomNav, width: 32, height: 32).onPress(() { + child: Utils.buildSvgWithAssets(icon: AppAssets.closeBottomNav, width: 32, height: 32, applyThemeColor: false).onPress(() { Navigator.of(context).pop(); }), ) @@ -169,9 +169,10 @@ void showCommonBottomSheetWithoutHeight( bool useSafeArea = false, bool hasBottomPadding = true, EdgeInsets? padding, - Color backgroundColor = AppColors.bottomSheetBgColor, + Color? backgroundColor, VoidCallback? onCloseClicked, }) { + final resolvedBgColor = backgroundColor ?? AppColors.bottomSheetBgColor; showModalBottomSheet( sheetAnimationStyle: AnimationStyle( duration: Duration(milliseconds: 500), @@ -184,7 +185,7 @@ void showCommonBottomSheetWithoutHeight( showDragHandle: false, isDismissible: isDismissible, enableDrag: isDismissible, - backgroundColor: backgroundColor, + backgroundColor: resolvedBgColor, useSafeArea: useSafeArea, builder: (BuildContext context) { return SafeArea( @@ -228,7 +229,7 @@ void showCommonBottomSheetWithoutHeight( if (isCloseButtonVisible) ...[ Utils.buildSvgWithAssets( icon: AppAssets.close_bottom_sheet_icon, - iconColor: Color(0xff2B353E), + iconColor: AppColors.textColor, ).onPress(() { onCloseClicked?.call(); Navigator.of(context).pop(); diff --git a/lib/widgets/countdown_timer.dart b/lib/widgets/countdown_timer.dart index 1722ebfa..7f8304e6 100644 --- a/lib/widgets/countdown_timer.dart +++ b/lib/widgets/countdown_timer.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/extensions/string_extensions.dart'; import 'package:hmg_patient_app_new/generated/locale_keys.g.dart'; +import 'package:hmg_patient_app_new/theme/colors.dart'; Widget buildTime(Duration duration, {bool isHomePage = false}) { String twoDigits(int n) => n.toString().padLeft(2, '0'); @@ -41,7 +42,7 @@ Widget buildDigit(String digit) { padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4), // margin: const EdgeInsets.symmetric(horizontal: 2), decoration: BoxDecoration( - color: Colors.white, + color: AppColors.whiteColor, borderRadius: BorderRadius.circular(8), ), child: ClipRect( diff --git a/lib/widgets/custom_tab_bar.dart b/lib/widgets/custom_tab_bar.dart index c30c0700..0fd354e0 100644 --- a/lib/widgets/custom_tab_bar.dart +++ b/lib/widgets/custom_tab_bar.dart @@ -16,20 +16,20 @@ class CustomTabBarModel { class CustomTabBar extends StatefulWidget { final int initialIndex; final List tabs; - final Color activeTextColor; - final Color activeBackgroundColor; - final Color inActiveTextColor; - final Color inActiveBackgroundColor; + final Color? activeTextColor; + final Color? activeBackgroundColor; + final Color? inActiveTextColor; + final Color? inActiveBackgroundColor; final Function(int)? onTabChange; const CustomTabBar({ super.key, required this.tabs, this.initialIndex = 0, - this.activeTextColor = const Color(0xff2E3039), - this.inActiveTextColor = const Color(0xff898A8D), - this.activeBackgroundColor = const Color(0x142E3039), - this.inActiveBackgroundColor = Colors.white, + this.activeTextColor, + this.inActiveTextColor, + this.activeBackgroundColor, + this.inActiveBackgroundColor, this.onTabChange, }); @@ -57,6 +57,10 @@ class CustomTabBarState extends State { @override Widget build(BuildContext context) { + final resolvedActiveTextColor = widget.activeTextColor ?? AppColors.textColor; + final resolvedInActiveTextColor = widget.inActiveTextColor ?? AppColors.inputLabelTextColor; + final resolvedActiveBgColor = widget.activeBackgroundColor ?? AppColors.lightGrayBGColor; + final resolvedInActiveBgColor = widget.inActiveBackgroundColor ?? AppColors.whiteColor; late Widget parentWidget; if (widget.tabs.length > 3) { @@ -65,7 +69,7 @@ class CustomTabBarState extends State { scrollDirection: Axis.horizontal, padding: EdgeInsets.zero, physics: const BouncingScrollPhysics(), - itemBuilder: (cxt, index) => myTab(widget.tabs[index], index), + itemBuilder: (cxt, index) => myTab(widget.tabs[index], index, resolvedActiveTextColor, resolvedInActiveTextColor, resolvedActiveBgColor, resolvedInActiveBgColor), separatorBuilder: (cxt, index) => 4.width, itemCount: widget.tabs.length, ); @@ -73,7 +77,7 @@ class CustomTabBarState extends State { parentWidget = Row( mainAxisAlignment: MainAxisAlignment.center, spacing: 4.w, - children: [for (int i = 0; i < widget.tabs.length; i++) myTab(widget.tabs[i], i).expanded], + children: [for (int i = 0; i < widget.tabs.length; i++) myTab(widget.tabs[i], i, resolvedActiveTextColor, resolvedInActiveTextColor, resolvedActiveBgColor, resolvedInActiveBgColor).expanded], ); } @@ -87,14 +91,14 @@ class CustomTabBarState extends State { child: Center(child: parentWidget)); } - Widget myTab(CustomTabBarModel tabBar, int currentIndex) { + Widget myTab(CustomTabBarModel tabBar, int currentIndex, Color activeTextColor, Color inActiveTextColor, Color activeBgColor, Color inActiveBgColor) { bool isSelected = selectedIndex == currentIndex; return Container( height: (isTablet || isFoldable) ? 60.h : 54.h, padding: EdgeInsets.only(top: 4.h, bottom: 4.h, left: 14.w, right: 14.w), alignment: Alignment.center, decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: isSelected ? widget.activeBackgroundColor : widget.inActiveBackgroundColor, + color: isSelected ? activeBgColor : inActiveBgColor, borderRadius: 10.r, ), child: Row( @@ -106,11 +110,11 @@ class CustomTabBarState extends State { icon: tabBar.image!, height: 18.h, width: 18.w, - iconColor: isSelected ? widget.activeTextColor : widget.inActiveTextColor, + iconColor: isSelected ? activeTextColor : inActiveTextColor, ), tabBar.title.toText13( weight: isSelected ? FontWeight.w600 : FontWeight.w500, - color: isSelected ? widget.activeTextColor : widget.inActiveTextColor, + color: isSelected ? activeTextColor : inActiveTextColor, letterSpacing: isSelected ? -0.3 : -0.1), ], )).onPress(() { diff --git a/lib/widgets/date_range_selector/date_range_calender.dart b/lib/widgets/date_range_selector/date_range_calender.dart index 89725f32..0f6c9b99 100644 --- a/lib/widgets/date_range_selector/date_range_calender.dart +++ b/lib/widgets/date_range_selector/date_range_calender.dart @@ -87,15 +87,15 @@ class _DateRangeSelectorState extends State { thickness: 1, ).paddingOnly(bottom: 16.h, top: 16.h), Material( - color: Colors.white, + color: AppColors.whiteColor, child: SfDateRangePicker( controller: _calendarController, selectionMode: DateRangePickerSelectionMode.range, showNavigationArrow: true, headerHeight: 40.h, - backgroundColor: Colors.white, + backgroundColor: AppColors.whiteColor, headerStyle: DateRangePickerHeaderStyle( - backgroundColor: Colors.white, + backgroundColor: AppColors.whiteColor, textAlign: TextAlign.start, textStyle: TextStyle( fontSize: 18.f, @@ -107,7 +107,7 @@ class _DateRangeSelectorState extends State { ), monthViewSettings: DateRangePickerMonthViewSettings( viewHeaderStyle: DateRangePickerViewHeaderStyle( - backgroundColor: Colors.white, + backgroundColor: AppColors.whiteColor, textStyle: TextStyle( fontSize: 14.f, fontWeight: FontWeight.w600, diff --git a/lib/widgets/datepicker_widget.dart b/lib/widgets/datepicker_widget.dart index 6ca9fe1f..1a5444a0 100644 --- a/lib/widgets/datepicker_widget.dart +++ b/lib/widgets/datepicker_widget.dart @@ -33,7 +33,7 @@ class DatePickerWidget extends StatelessWidget { padding: padding, alignment: Alignment.center, decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: Colors.white, + color: AppColors.whiteColor, borderRadius: isAllowRadius ? 15 : null, side: isBorderAllowed ? BorderSide(color: const Color(0xffefefef), width: 1) : null, ), diff --git a/lib/widgets/dialogs/confirm_dialog.dart b/lib/widgets/dialogs/confirm_dialog.dart index ce597c2d..5f7782fa 100644 --- a/lib/widgets/dialogs/confirm_dialog.dart +++ b/lib/widgets/dialogs/confirm_dialog.dart @@ -20,7 +20,7 @@ class ConfirmDialog extends StatelessWidget { @override Widget build(BuildContext context) { return Dialog( - backgroundColor: Colors.white, + backgroundColor: AppColors.whiteColor, shape: const RoundedRectangleBorder(), insetPadding: const EdgeInsets.only(left: 21, right: 21), child: Padding( @@ -35,7 +35,7 @@ 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: TextStyle(fontSize: 24, fontWeight: FontWeight.w600, color: AppColors.blackColor, height: 35 / 24, letterSpacing: -0.96), ).paddingOnly(top: 16), ), IconButton( diff --git a/lib/widgets/dropdown/country_dropdown_widget.dart b/lib/widgets/dropdown/country_dropdown_widget.dart index 1cd387f9..bc4b5edf 100644 --- a/lib/widgets/dropdown/country_dropdown_widget.dart +++ b/lib/widgets/dropdown/country_dropdown_widget.dart @@ -73,7 +73,7 @@ class CustomCountryDropdownState extends State { }, child: Row( children: [ - Utils.buildSvgWithAssets(icon: selectedCountry != null ? selectedCountry!.iconPath : AppAssets.ksa, width: 40.h, height: 40.h), + Utils.buildSvgWithAssets(icon: selectedCountry != null ? selectedCountry!.iconPath : AppAssets.ksa, width: 40.h, height: 40.h, applyThemeColor: false), SizedBox(width: 8.h), Utils.buildSvgWithAssets(icon: _isDropdownOpen ? AppAssets.dropdow_icon : AppAssets.dropdow_icon), ], @@ -189,7 +189,7 @@ class CustomCountryDropdownState extends State { decoration: RoundedRectangleBorder().toSmoothCornerDecoration(borderRadius: 16.h), child: Row( children: [ - Utils.buildSvgWithAssets(icon: country.iconPath, width: 38.h, height: 38.h), + Utils.buildSvgWithAssets(icon: country.iconPath, width: 38.h, height: 38.h, applyThemeColor: false), if (!widget.isFromBottomSheet) SizedBox(width: 12.h), if (!widget.isFromBottomSheet) Text(appState.getLanguageCode() == "ar" ? country.nameArabic : country.displayName, diff --git a/lib/widgets/dropdown/dropdown_widget.dart b/lib/widgets/dropdown/dropdown_widget.dart index 5ef5e580..a78b8fa5 100644 --- a/lib/widgets/dropdown/dropdown_widget.dart +++ b/lib/widgets/dropdown/dropdown_widget.dart @@ -55,8 +55,8 @@ class DropdownWidget extends StatelessWidget { padding: padding, alignment: Alignment.center, // This might need adjustment based on layout decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: Colors.white, - borderRadius: isAllowRadius ? 15.h : null, + color: AppColors.whiteColor, + borderRadius: isAllowRadius ? 15.h : null, side: isBorderAllowed ? BorderSide(color: hasError! ? Colors.red: const Color(0xffefefef), width: 1) : null, ), child: Row( @@ -92,7 +92,8 @@ class DropdownWidget extends StatelessWidget { margin: EdgeInsets.only(right: 10.h), padding: EdgeInsets.all(8.h), decoration: RoundedRectangleBorder().toSmoothCornerDecoration(borderRadius: 10.h, color: AppColors.greyColor), - child: Utils.buildSvgWithAssets(icon: leadingIcon!)); + child: Utils.buildSvgWithAssets(icon: leadingIcon!), + ); } Widget _buildLabelText(Color? labelColor) { @@ -142,7 +143,7 @@ class DropdownWidget extends StatelessWidget { borderRadius: BorderRadius.circular(12), ), - color: AppColors.scaffoldBgColor + color: Colors.black ); if (selected != null && onChange != null) { @@ -163,7 +164,8 @@ class DropdownWidget extends StatelessWidget { fontSize: 14.f, height: 21 / 14, fontWeight: FontWeight.w500, - color: (selectedValue != null && selectedValue!.isNotEmpty) ? const Color(0xff2E3039) : const Color(0xffB0B0B0), + // color: (selectedValue != null && selectedValue!.isNotEmpty) ? const Color(0xff2E3039) : const Color(0xffB0B0B0), + color: AppColors.textColor, letterSpacing: -0.2, ), ), diff --git a/lib/widgets/expandable_list_widget.dart b/lib/widgets/expandable_list_widget.dart index db4e3980..d6d2efdf 100644 --- a/lib/widgets/expandable_list_widget.dart +++ b/lib/widgets/expandable_list_widget.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; +import 'package:hmg_patient_app_new/theme/colors.dart'; // ==================== MAIN CUSTOM WIDGET ==================== @@ -251,12 +252,12 @@ class ExpandableListTheme { }); factory ExpandableListTheme.defaultTheme(BuildContext context) { - final textColor = Theme.of(context).textTheme.bodyLarge?.color ?? Colors.black; + final textColor = Theme.of(context).textTheme.bodyLarge?.color ?? AppColors.textColor; return ExpandableListTheme( backgroundColor: Colors.transparent, expandedBackgroundColor: Colors.transparent, - dividerColor: Colors.grey.shade300, + dividerColor: AppColors.dividerColor, defaultTrailingIcon: Icon( Icons.keyboard_arrow_down, color: textColor, @@ -278,10 +279,10 @@ class ExpandableListTheme { }) { return ExpandableListTheme( backgroundColor: backgroundColor ?? Colors.transparent, - expandedBackgroundColor: expandedBackgroundColor ?? Colors.grey.shade50, - dividerColor: dividerColor ?? Colors.grey.shade300, + expandedBackgroundColor: expandedBackgroundColor ?? AppColors.whiteColor, + dividerColor: dividerColor ?? AppColors.dividerColor, defaultTrailingIcon: defaultTrailingIcon ?? - Icon(Icons.keyboard_arrow_down, color: Colors.black, size: 24), + Icon(Icons.keyboard_arrow_down, color: AppColors.textColor, size: 24), itemPadding: itemPadding ?? EdgeInsets.symmetric(horizontal: 16.w, vertical: 12.h), contentPadding: contentPadding ?? EdgeInsets.only(left: 16.w, right: 16.w, bottom: 16.h), leadingSpacing: leadingSpacing ?? 12.w, diff --git a/lib/widgets/family_files/family_file_add_widget.dart b/lib/widgets/family_files/family_file_add_widget.dart index 15751e93..d8b4d13e 100644 --- a/lib/widgets/family_files/family_file_add_widget.dart +++ b/lib/widgets/family_files/family_file_add_widget.dart @@ -39,7 +39,7 @@ class _FamilyFileAddWidgetState extends State { widget.message.toText16(color: AppColors.textColor, weight: FontWeight.w500), SizedBox(height: 20.h), Container( - decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(24)), + decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(24)), padding: EdgeInsets.symmetric(horizontal: 16.h, vertical: 8.h), child: Column( children: [ diff --git a/lib/widgets/graph/custom_graph.dart b/lib/widgets/graph/custom_graph.dart index f1145212..d9a69a99 100644 --- a/lib/widgets/graph/custom_graph.dart +++ b/lib/widgets/graph/custom_graph.dart @@ -51,12 +51,12 @@ class CustomGraph extends StatelessWidget { final double? maxY; final double? maxX; final double? minX; - final Color spotColor; - final Color graphColor; + final Color? spotColor; + final Color? graphColor; final Color? secondaryGraphColor; // Color for secondary line - final Color graphShadowColor; - final Color graphGridColor; - final Color bottomLabelColor; + final Color? graphShadowColor; + final Color? graphGridColor; + final Color? bottomLabelColor; final double? bottomLabelSize; final FontWeight? bottomLabelFontWeight; final double? leftLabelInterval; @@ -92,12 +92,12 @@ class CustomGraph extends StatelessWidget { this.maxX, this.showBottomTitleDates = true, this.isFullScreeGraph = false, - this.spotColor = AppColors.bgGreenColor, - this.graphColor = AppColors.bgGreenColor, + this.spotColor, + this.graphColor, this.secondaryGraphColor, - this.graphShadowColor = AppColors.graphGridColor, - this.graphGridColor = AppColors.graphGridColor, - this.bottomLabelColor = AppColors.textColor, + this.graphShadowColor, + this.graphGridColor, + this.bottomLabelColor, this.bottomLabelFontWeight = FontWeight.w500, this.bottomLabelSize, this.leftLabelInterval, @@ -117,8 +117,13 @@ class CustomGraph extends StatelessWidget { @override Widget build(BuildContext context) { + final resolvedSpotColor = spotColor ?? AppColors.bgGreenColor; + final resolvedGraphColor = graphColor ?? AppColors.bgGreenColor; + final resolvedGraphShadowColor = graphShadowColor ?? AppColors.graphGridColor; + final resolvedGraphGridColor = graphGridColor ?? AppColors.graphGridColor; + return Material( - color: Colors.white, + color: AppColors.whiteColor, child: SizedBox( width: width, height: height, @@ -138,7 +143,7 @@ class CustomGraph extends StatelessWidget { // Show custom marker for touched spot with correct color per line return indicators.map((int index) { // Determine which line is being touched based on barData - Color dotColor = spotColor; + Color dotColor = resolvedSpotColor; if (secondaryDataPoints != null && barData.spots.length > 0) { // Check if this is the secondary line by comparing the first spot's color final gradient = barData.gradient; @@ -218,7 +223,7 @@ class CustomGraph extends StatelessWidget { top: BorderSide.none, ), ), - lineBarsData: _buildColoredLineSegments(dataPoints, showLinePoints), + lineBarsData: _buildColoredLineSegments(dataPoints, showLinePoints, resolvedGraphColor, resolvedGraphShadowColor), gridData: FlGridData( show: showGridLines ?? true, drawVerticalLine: false, @@ -228,7 +233,7 @@ class CustomGraph extends StatelessWidget { getDrawingHorizontalLine: getDrawingHorizontalLine ?? (value) { return FlLine( - color: graphGridColor, + color: resolvedGraphGridColor, strokeWidth: 1, dashArray: [5, 5], ); @@ -240,7 +245,7 @@ class CustomGraph extends StatelessWidget { ); } - List _buildColoredLineSegments(List dataPoints, bool showLinePoints) { + List _buildColoredLineSegments(List dataPoints, bool showLinePoints, Color resolvedGraphColor, Color resolvedGraphShadowColor) { final List allSpots = dataPoints.asMap().entries.map((entry) { double value = (makeGraphBasedOnActualValue) ? double.tryParse(entry.value.actualValue) ?? 0.0 : entry.value.value; return FlSpot(entry.key.toDouble(), value); @@ -254,7 +259,7 @@ class CustomGraph extends StatelessWidget { isStrokeJoinRound: true, barWidth: 2, gradient: LinearGradient( - colors: [graphColor, graphColor], + colors: [resolvedGraphColor, resolvedGraphColor], begin: Alignment.centerLeft, end: Alignment.centerRight, ), @@ -265,7 +270,7 @@ class CustomGraph extends StatelessWidget { cutOffY: cutOffY ?? 0, gradient: LinearGradient( colors: [ - graphShadowColor, + resolvedGraphShadowColor, Colors.white, ], begin: Alignment.topCenter, diff --git a/lib/widgets/image_picker.dart b/lib/widgets/image_picker.dart index e25b1176..eb3021f5 100644 --- a/lib/widgets/image_picker.dart +++ b/lib/widgets/image_picker.dart @@ -182,12 +182,13 @@ class _BottomSheetItem extends StatelessWidget { final Function onTap; final IconData icon; final String title; - final Color color; + final Color? color; - _BottomSheetItem({Key? key, required this.onTap, required this.title, required this.icon, this.color = AppColors.mainPurple}) : super(key: key); + _BottomSheetItem({Key? key, required this.onTap, required this.title, required this.icon, this.color}) : super(key: key); @override Widget build(BuildContext context) { + final resolvedColor = color ?? AppColors.mainPurple; return InkWell( onTap: () { if (onTap != null) { @@ -202,7 +203,7 @@ class _BottomSheetItem extends StatelessWidget { if (icon != null) Icon( icon, - color: color, + color: resolvedColor, size: 18.0, ), if (icon != null) const SizedBox(width: 24.0), diff --git a/lib/widgets/input_widget.dart b/lib/widgets/input_widget.dart index aae196cf..25dd4580 100644 --- a/lib/widgets/input_widget.dart +++ b/lib/widgets/input_widget.dart @@ -133,7 +133,7 @@ class TextInputWidget extends StatelessWidget { // height: isMultiline ? null : 64.h, alignment: Alignment.center, decoration: RoundedRectangleBorder().toSmoothCornerDecoration( - color: Colors.white, + color: AppColors.whiteColor, borderRadius: isAllowRadius ? (12.r) : null, side: isBorderAllowed ? BorderSide(color: hasError ? errorColor : const Color(0xffefefef), width: 1) : null, ), @@ -210,7 +210,7 @@ class TextInputWidget extends StatelessWidget { borderRadius: 12.r, color: AppColors.greyColor, ), - child: Utils.buildSvgWithAssets(icon: leadingIcon!)); + child: Utils.buildSvgWithAssets(icon: leadingIcon!, applyThemeColor: false)); } Widget _buildTrailingIcon(BuildContext context, {bool isArrowTrailing = false}) { diff --git a/lib/widgets/loader/bottomsheet_loader.dart b/lib/widgets/loader/bottomsheet_loader.dart index 71b83415..bff293d0 100644 --- a/lib/widgets/loader/bottomsheet_loader.dart +++ b/lib/widgets/loader/bottomsheet_loader.dart @@ -7,6 +7,7 @@ import 'package:hmg_patient_app_new/core/utils/size_utils.dart'; import 'package:hmg_patient_app_new/core/utils/utils.dart'; import 'package:hmg_patient_app_new/extensions/widget_extensions.dart'; import 'package:hmg_patient_app_new/services/navigation_service.dart'; +import 'package:hmg_patient_app_new/theme/colors.dart'; class LoaderBottomSheet { static final NavigationService _navService = GetIt.I(); @@ -27,8 +28,8 @@ class LoaderBottomSheet { builder: (_) { return Container( height: MediaQuery.of(context).size.height * 0.3, - decoration: const BoxDecoration( - color: Colors.white, + decoration: BoxDecoration( + color: AppColors.whiteColor, borderRadius: BorderRadius.vertical(top: Radius.circular(16)), ), child: Center( diff --git a/lib/widgets/map/map_utility_screen.dart b/lib/widgets/map/map_utility_screen.dart index cb3eb8ef..422809cf 100644 --- a/lib/widgets/map/map_utility_screen.dart +++ b/lib/widgets/map/map_utility_screen.dart @@ -80,7 +80,7 @@ class MapUtilityScreen extends StatelessWidget { ), Align( alignment: AlignmentDirectional.topStart, - child: Utils.buildSvgWithAssets(icon: AppAssets.closeBottomNav, width: 32.h, height: 32.h).onPress(() { + child: Utils.buildSvgWithAssets(icon: AppAssets.closeBottomNav, width: 32.h, height: 32.h, applyThemeColor: false).onPress(() { onCrossClicked?.call(); // context // .read() diff --git a/lib/widgets/nfc/nfc_reader_sheet.dart b/lib/widgets/nfc/nfc_reader_sheet.dart index b76b36fc..10228a94 100644 --- a/lib/widgets/nfc/nfc_reader_sheet.dart +++ b/lib/widgets/nfc/nfc_reader_sheet.dart @@ -18,7 +18,7 @@ void showNfcReader(BuildContext context, {required Function onNcfScan, required shape: RoundedRectangleBorder( borderRadius: BorderRadius.only(topLeft: Radius.circular(12), topRight: Radius.circular(12)), ), - backgroundColor: Colors.white, + backgroundColor: AppColors.whiteColor, builder: (context) { return NfcLayout( onNcfScan: onNcfScan,