From 726c6f521349b3b8d7b4560d9ff61704664212f6 Mon Sep 17 00:00:00 2001 From: Yasien Mac Mini Date: Thu, 14 Aug 2025 09:58:28 +0200 Subject: [PATCH] Use Mih Color Red --- .../mih_layout/mih_notification_drawer.dart | 3 +- .../Example/package_test.dart | 5 +- .../package_tools/package_tool_one.dart | 3 +- .../mih_floating_menu.dart | 3 +- .../mih_package_alert.dart | 3 +- .../mih_package_window.dart | 3 +- .../mih_package_components/mih_toggle.dart | 2 +- .../mih_delete_message.dart | 26 ++--- .../mih_error_message.dart | 110 ++++++++---------- .../mih_notification_message.dart | 3 +- .../mih_warning_message.dart | 13 ++- .../builder/build_access_request_list.dart | 6 +- .../builder/build_business_access_list.dart | 21 ++-- .../authentication/biometric_check.dart | 4 +- .../mih_packages/authentication/signin.dart | 2 +- .../package_tools/currency_exchange_rate.dart | 4 +- .../calculator/package_tools/simple_calc.dart | 8 +- .../calculator/package_tools/tip_calc.dart | 8 +- .../builder/build_access_request_list.dart | 6 +- .../calendar/package_tools/appointments.dart | 4 +- .../package_tools/mih_register.dart | 5 +- .../mih_home/mih_home_legacy.dart | 2 +- .../mih_home/mih_profile_getter.dart | 3 +- .../mzansi_ai/package_tools/ai_chat.dart | 4 +- .../package_tools/mih_search_mzansi.dart | 7 +- .../components/mih_add_bookmark_alert.dart | 3 +- .../components/mih_business_info_card.dart | 26 ++--- .../components/mih_delete_bookmark_alert.dart | 3 +- .../mih_review_business_window.dart | 13 +-- .../package_tools/mih_business_details.dart | 7 +- .../mih_business_user_search.dart | 5 +- .../package_tools/mih_my_business_team.dart | 5 +- .../package_tools/mih_my_business_user.dart | 5 +- .../profile_business_add.dart | 3 +- .../package_tools/mih_personal_profile.dart | 6 +- .../package_tools/mih_personal_settings.dart | 9 +- .../builder/build_loyalty_card_list.dart | 7 +- .../components/mih_barcode_scanner.dart | 4 +- .../build_mih_patient_search_list.dart | 31 ++--- .../build_my_patient_list_list.dart | 3 +- .../package_tools/mih_patient_search.dart | 5 +- .../package_tools/my_patient_list.dart | 5 +- .../package_tools/waiting_room.dart | 4 +- .../package_tools/patient_consultation.dart | 2 +- .../pat_profile/patient_edit.dart | 5 +- .../lib/mih_services/mih_alert_services.dart | 8 +- 46 files changed, 181 insertions(+), 236 deletions(-) diff --git a/Frontend/lib/mih_components/mih_layout/mih_notification_drawer.dart b/Frontend/lib/mih_components/mih_layout/mih_notification_drawer.dart index 0bdfb342..12d95cbd 100644 --- a/Frontend/lib/mih_components/mih_layout/mih_notification_drawer.dart +++ b/Frontend/lib/mih_components/mih_layout/mih_notification_drawer.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/notification.dart'; +import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import '../../main.dart'; import 'package:supertokens_flutter/http.dart' as http; @@ -101,7 +102,7 @@ class _MIHNotificationDrawerState extends State { children: [ Icon( Icons.circle_notifications, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), const SizedBox( width: 5, diff --git a/Frontend/lib/mih_components/mih_package_components/Example/package_test.dart b/Frontend/lib/mih_components/mih_package_components/Example/package_test.dart index 003da094..a25b8e6b 100644 --- a/Frontend/lib/mih_components/mih_package_components/Example/package_test.dart +++ b/Frontend/lib/mih_components/mih_package_components/Example/package_test.dart @@ -7,6 +7,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/Exam import 'package:mzansi_innovation_hub/mih_components/mih_package_components/Example/package_tools/package_tool_two.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart'; import 'package:flutter/material.dart'; +import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; class PackageTest extends StatefulWidget { // final AppUser user; @@ -66,7 +67,7 @@ class _PackageTestState extends State { alertIcon: Icon( Icons.warning_amber_rounded, size: 100, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), alertTitle: "Oops! Looks like some fields are missing.", alertBody: Column( @@ -111,7 +112,7 @@ class _PackageTestState extends State { ), ], ), - alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), + alertColour: MihColors.getRedColor(context), ); }, ); diff --git a/Frontend/lib/mih_components/mih_package_components/Example/package_tools/package_tool_one.dart b/Frontend/lib/mih_components/mih_package_components/Example/package_tools/package_tool_one.dart index 52886370..bf25552d 100644 --- a/Frontend/lib/mih_components/mih_package_components/Example/package_tools/package_tool_one.dart +++ b/Frontend/lib/mih_components/mih_package_components/Example/package_tools/package_tool_one.dart @@ -721,8 +721,7 @@ class _PackageToolOneState extends State { onPressed: () { print("Button Pressed"); }, - buttonColor: - MzansiInnovationHub.of(context)!.theme.errorColor(), + buttonColor: MihColors.getRedColor(context), width: 300, child: Text( "Click Me", diff --git a/Frontend/lib/mih_components/mih_package_components/mih_floating_menu.dart b/Frontend/lib/mih_components/mih_package_components/mih_floating_menu.dart index 36ae5dcc..e710a9db 100644 --- a/Frontend/lib/mih_components/mih_package_components/mih_floating_menu.dart +++ b/Frontend/lib/mih_components/mih_package_components/mih_floating_menu.dart @@ -32,8 +32,7 @@ class _MihFloatingMenuState extends State { direction: widget.direction ?? SpeedDialDirection.up, activeIcon: Icons.close, backgroundColor: MihColors.getGreenColor(context), - activeBackgroundColor: - MzansiInnovationHub.of(context)!.theme.errorColor(), + activeBackgroundColor: MihColors.getRedColor(context), foregroundColor: MzansiInnovationHub.of(context)!.theme.primaryColor(), overlayColor: Colors.black, overlayOpacity: 0.5, diff --git a/Frontend/lib/mih_components/mih_package_components/mih_package_alert.dart b/Frontend/lib/mih_components/mih_package_components/mih_package_alert.dart index aa6cf0bc..8e890311 100644 --- a/Frontend/lib/mih_components/mih_package_components/mih_package_alert.dart +++ b/Frontend/lib/mih_components/mih_package_components/mih_package_alert.dart @@ -1,5 +1,6 @@ import 'package:mzansi_innovation_hub/main.dart'; import 'package:flutter/material.dart'; +import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; class MihPackageAlert extends StatefulWidget { final Widget alertIcon; @@ -101,7 +102,7 @@ class _MihPackageAlertState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), diff --git a/Frontend/lib/mih_components/mih_package_components/mih_package_window.dart b/Frontend/lib/mih_components/mih_package_components/mih_package_window.dart index 2106dbf6..0fe91e9a 100644 --- a/Frontend/lib/mih_components/mih_package_components/mih_package_window.dart +++ b/Frontend/lib/mih_components/mih_package_components/mih_package_window.dart @@ -3,6 +3,7 @@ import 'package:flutter_speed_dial/flutter_speed_dial.dart'; import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_floating_menu.dart'; +import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; class MihPackageWindow extends StatefulWidget { final String windowTitle; @@ -84,7 +85,7 @@ class _MihPackageWindowState extends State { child: IconButton.filled( style: ButtonStyle( backgroundColor: WidgetStateProperty.all( - MzansiInnovationHub.of(context)!.theme.errorColor()), + MihColors.getRedColor(context)), ), color: MzansiInnovationHub.of(context)!.theme.primaryColor(), iconSize: 20, diff --git a/Frontend/lib/mih_components/mih_package_components/mih_toggle.dart b/Frontend/lib/mih_components/mih_package_components/mih_toggle.dart index b0e804dd..fc815372 100644 --- a/Frontend/lib/mih_components/mih_package_components/mih_toggle.dart +++ b/Frontend/lib/mih_components/mih_package_components/mih_toggle.dart @@ -85,7 +85,7 @@ class _MihToggleState extends State { widget.readOnly == true ? Colors.grey : widget.secondaryFillColor, inactiveTrackColor: widget.readOnly == true ? Colors.grey.shade400 - : MzansiInnovationHub.of(context)!.theme.errorColor(), + : MihColors.getRedColor(context), // activeColor: widget.secondaryFillColor, // activeTrackColor: widget.fillColor, // inactiveThumbColor: widget.fillColor, diff --git a/Frontend/lib/mih_components/mih_pop_up_messages/mih_delete_message.dart b/Frontend/lib/mih_components/mih_pop_up_messages/mih_delete_message.dart index 23493ad8..92d36623 100644 --- a/Frontend/lib/mih_components/mih_pop_up_messages/mih_delete_message.dart +++ b/Frontend/lib/mih_components/mih_pop_up_messages/mih_delete_message.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart'; +import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import '../../main.dart'; class MIHDeleteMessage extends StatefulWidget { @@ -99,8 +100,7 @@ class _MIHDeleteMessageState extends State { const SizedBox(height: 15), MihButton( onPressed: widget.onTap, - buttonColor: - MzansiInnovationHub.of(context)!.theme.errorColor(), + buttonColor: MihColors.getRedColor(context), width: 300, child: Text( "Delete", @@ -127,7 +127,7 @@ class _MIHDeleteMessageState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), @@ -184,8 +184,7 @@ class _MIHDeleteMessageState extends State { const SizedBox(height: 15), MihButton( onPressed: widget.onTap, - buttonColor: - MzansiInnovationHub.of(context)!.theme.errorColor(), + buttonColor: MihColors.getRedColor(context), width: 300, child: Text( "Delete", @@ -212,7 +211,7 @@ class _MIHDeleteMessageState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), @@ -270,8 +269,7 @@ class _MIHDeleteMessageState extends State { MihButton( onPressed: widget.onTap, - buttonColor: - MzansiInnovationHub.of(context)!.theme.errorColor(), + buttonColor: MihColors.getRedColor(context), width: 300, child: Text( "Delete", @@ -298,7 +296,7 @@ class _MIHDeleteMessageState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), @@ -355,8 +353,7 @@ class _MIHDeleteMessageState extends State { const SizedBox(height: 15), MihButton( onPressed: widget.onTap, - buttonColor: - MzansiInnovationHub.of(context)!.theme.errorColor(), + buttonColor: MihColors.getRedColor(context), width: 300, child: Text( "Delete", @@ -383,7 +380,7 @@ class _MIHDeleteMessageState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), @@ -440,8 +437,7 @@ class _MIHDeleteMessageState extends State { const SizedBox(height: 15), MihButton( onPressed: widget.onTap, - buttonColor: - MzansiInnovationHub.of(context)!.theme.errorColor(), + buttonColor: MihColors.getRedColor(context), width: 300, child: Text( "Delete", @@ -468,7 +464,7 @@ class _MIHDeleteMessageState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), diff --git a/Frontend/lib/mih_components/mih_pop_up_messages/mih_error_message.dart b/Frontend/lib/mih_components/mih_pop_up_messages/mih_error_message.dart index 9bff754d..191da4c7 100644 --- a/Frontend/lib/mih_components/mih_pop_up_messages/mih_error_message.dart +++ b/Frontend/lib/mih_components/mih_pop_up_messages/mih_error_message.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import '../../main.dart'; class MIHErrorMessage extends StatefulWidget { @@ -57,9 +58,8 @@ class _MIHErrorMessageState extends State { decoration: BoxDecoration( color: MzansiInnovationHub.of(context)!.theme.primaryColor(), borderRadius: BorderRadius.circular(25.0), - border: Border.all( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), - width: 5.0), + border: + Border.all(color: MihColors.getRedColor(context), width: 5.0), ), child: SingleChildScrollView( child: Column( @@ -68,14 +68,14 @@ class _MIHErrorMessageState extends State { Icon( Icons.warning_amber_rounded, size: popUpIconSize, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), //const SizedBox(height: 5), Text( "Oops! Looks like some fields are missing.", textAlign: TextAlign.center, style: TextStyle( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), fontSize: popUpTitleSize, fontWeight: FontWeight.bold, ), @@ -137,7 +137,7 @@ class _MIHErrorMessageState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), @@ -156,9 +156,8 @@ class _MIHErrorMessageState extends State { decoration: BoxDecoration( color: MzansiInnovationHub.of(context)!.theme.primaryColor(), borderRadius: BorderRadius.circular(25.0), - border: Border.all( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), - width: 5.0), + border: + Border.all(color: MihColors.getRedColor(context), width: 5.0), ), child: SingleChildScrollView( child: Column( @@ -167,14 +166,14 @@ class _MIHErrorMessageState extends State { Icon( Icons.warning_amber_rounded, size: popUpIconSize, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), //const SizedBox(height: 15), Text( "Password Doesn't Meet Requirements", textAlign: TextAlign.center, style: TextStyle( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), fontSize: popUpTitleSize, fontWeight: FontWeight.bold, ), @@ -243,7 +242,7 @@ class _MIHErrorMessageState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), @@ -262,9 +261,8 @@ class _MIHErrorMessageState extends State { decoration: BoxDecoration( color: MzansiInnovationHub.of(context)!.theme.primaryColor(), borderRadius: BorderRadius.circular(25.0), - border: Border.all( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), - width: 5.0), + border: + Border.all(color: MihColors.getRedColor(context), width: 5.0), ), child: SingleChildScrollView( child: Column( @@ -273,14 +271,14 @@ class _MIHErrorMessageState extends State { Icon( Icons.warning_amber_rounded, size: popUpIconSize, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), //const SizedBox(height: 15), Text( "Let's Fix That Username", textAlign: TextAlign.center, style: TextStyle( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), fontSize: popUpTitleSize, fontWeight: FontWeight.bold, ), @@ -311,7 +309,7 @@ class _MIHErrorMessageState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), @@ -330,9 +328,8 @@ class _MIHErrorMessageState extends State { decoration: BoxDecoration( color: MzansiInnovationHub.of(context)!.theme.primaryColor(), borderRadius: BorderRadius.circular(25.0), - border: Border.all( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), - width: 5.0), + border: + Border.all(color: MihColors.getRedColor(context), width: 5.0), ), child: SingleChildScrollView( child: Column( @@ -341,14 +338,14 @@ class _MIHErrorMessageState extends State { Icon( Icons.warning_amber_rounded, size: popUpIconSize, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), //const SizedBox(height: 15), Text( "Oops! Invalid Email", textAlign: TextAlign.center, style: TextStyle( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), fontSize: popUpTitleSize, fontWeight: FontWeight.bold, ), @@ -379,7 +376,7 @@ class _MIHErrorMessageState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), @@ -398,9 +395,8 @@ class _MIHErrorMessageState extends State { decoration: BoxDecoration( color: MzansiInnovationHub.of(context)!.theme.primaryColor(), borderRadius: BorderRadius.circular(25.0), - border: Border.all( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), - width: 5.0), + border: + Border.all(color: MihColors.getRedColor(context), width: 5.0), ), child: SingleChildScrollView( child: Column( @@ -409,14 +405,14 @@ class _MIHErrorMessageState extends State { Icon( Icons.warning_amber_rounded, size: popUpIconSize, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), //SizedBox(height: 15), Text( "Email Already Exists", textAlign: TextAlign.center, style: TextStyle( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), fontSize: popUpTitleSize, fontWeight: FontWeight.bold, ), @@ -435,7 +431,7 @@ class _MIHErrorMessageState extends State { Text( "Here are some things to keep in mind:", style: TextStyle( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), fontSize: popUpSubtitleSize, fontWeight: FontWeight.bold, ), @@ -466,7 +462,7 @@ class _MIHErrorMessageState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), @@ -485,9 +481,8 @@ class _MIHErrorMessageState extends State { decoration: BoxDecoration( color: MzansiInnovationHub.of(context)!.theme.primaryColor(), borderRadius: BorderRadius.circular(25.0), - border: Border.all( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), - width: 5.0), + border: + Border.all(color: MihColors.getRedColor(context), width: 5.0), ), child: SingleChildScrollView( child: Column( @@ -496,14 +491,14 @@ class _MIHErrorMessageState extends State { Icon( Icons.warning_amber_rounded, size: popUpIconSize, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), //SizedBox(height: 15), Text( "Passwords Don't Match", textAlign: TextAlign.center, style: TextStyle( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), fontSize: popUpTitleSize, fontWeight: FontWeight.bold, ), @@ -522,7 +517,7 @@ class _MIHErrorMessageState extends State { Text( "Here are some things to keep in mind:", style: TextStyle( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), fontSize: popUpSubtitleSize, fontWeight: FontWeight.bold, ), @@ -554,7 +549,7 @@ class _MIHErrorMessageState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), @@ -573,9 +568,8 @@ class _MIHErrorMessageState extends State { decoration: BoxDecoration( color: MzansiInnovationHub.of(context)!.theme.primaryColor(), borderRadius: BorderRadius.circular(25.0), - border: Border.all( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), - width: 5.0), + border: + Border.all(color: MihColors.getRedColor(context), width: 5.0), ), child: SingleChildScrollView( child: Column( @@ -584,14 +578,14 @@ class _MIHErrorMessageState extends State { Icon( Icons.warning_amber_rounded, size: popUpIconSize, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), //SizedBox(height: 15), Text( "Uh oh! Login attempt unsuccessful.", textAlign: TextAlign.center, style: TextStyle( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), fontSize: popUpTitleSize, fontWeight: FontWeight.bold, ), @@ -610,7 +604,7 @@ class _MIHErrorMessageState extends State { Text( "Here are some things to keep in mind:", style: TextStyle( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), fontSize: popUpSubtitleSize, fontWeight: FontWeight.bold, ), @@ -642,7 +636,7 @@ class _MIHErrorMessageState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), @@ -661,9 +655,8 @@ class _MIHErrorMessageState extends State { decoration: BoxDecoration( color: MzansiInnovationHub.of(context)!.theme.primaryColor(), borderRadius: BorderRadius.circular(25.0), - border: Border.all( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), - width: 5.0), + border: + Border.all(color: MihColors.getRedColor(context), width: 5.0), ), child: SingleChildScrollView( child: Column( @@ -672,14 +665,14 @@ class _MIHErrorMessageState extends State { Icon( Icons.warning_amber_rounded, size: popUpIconSize, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), //const SizedBox(height: 15), Text( "Internet Connection Lost!", textAlign: TextAlign.center, style: TextStyle( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), fontSize: popUpTitleSize, fontWeight: FontWeight.bold, ), @@ -698,7 +691,7 @@ class _MIHErrorMessageState extends State { Text( "Here are a few things you can try:", style: TextStyle( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), fontSize: popUpSubtitleSize, fontWeight: FontWeight.bold, ), @@ -730,7 +723,7 @@ class _MIHErrorMessageState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), @@ -749,9 +742,8 @@ class _MIHErrorMessageState extends State { decoration: BoxDecoration( color: MzansiInnovationHub.of(context)!.theme.primaryColor(), borderRadius: BorderRadius.circular(25.0), - border: Border.all( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), - width: 5.0), + border: + Border.all(color: MihColors.getRedColor(context), width: 5.0), ), child: SingleChildScrollView( child: Column( @@ -760,14 +752,14 @@ class _MIHErrorMessageState extends State { Icon( Icons.warning_amber_rounded, size: popUpIconSize, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), //const SizedBox(height: 15), Text( "Location Services Not Enabled", textAlign: TextAlign.center, style: TextStyle( - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), fontSize: popUpTitleSize, fontWeight: FontWeight.bold, ), @@ -786,7 +778,7 @@ class _MIHErrorMessageState extends State { // Text( // "Here are a few things you can try:", // style: TextStyle( - // color: MzansiInnovationHub.of(context)!.theme.errorColor(), + // color: MihColors.getRedColor(context), // fontSize: popUpSubtitleSize, // fontWeight: FontWeight.bold, // ), @@ -818,7 +810,7 @@ class _MIHErrorMessageState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), diff --git a/Frontend/lib/mih_components/mih_pop_up_messages/mih_notification_message.dart b/Frontend/lib/mih_components/mih_pop_up_messages/mih_notification_message.dart index 31a44246..52d662eb 100644 --- a/Frontend/lib/mih_components/mih_pop_up_messages/mih_notification_message.dart +++ b/Frontend/lib/mih_components/mih_pop_up_messages/mih_notification_message.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import '../../main.dart'; import '../../mih_components/mih_objects/arguments.dart'; @@ -132,7 +133,7 @@ class _MIHNotificationMessageState extends State super.initState(); setState(() { primary = MzansiInnovationHub.of(context)!.theme.primaryColor(); - secondary = MzansiInnovationHub.of(context)!.theme.errorColor(); + secondary = MihColors.getRedColor(context); }); _animationController = AnimationController( vsync: this, diff --git a/Frontend/lib/mih_components/mih_pop_up_messages/mih_warning_message.dart b/Frontend/lib/mih_components/mih_pop_up_messages/mih_warning_message.dart index b6b002ca..0a8f5f2e 100644 --- a/Frontend/lib/mih_components/mih_pop_up_messages/mih_warning_message.dart +++ b/Frontend/lib/mih_components/mih_pop_up_messages/mih_warning_message.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import '../../main.dart'; class MIHWarningMessage extends StatefulWidget { @@ -109,7 +110,7 @@ class _MIHDeleteMessageState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), @@ -179,7 +180,7 @@ class _MIHDeleteMessageState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), @@ -249,7 +250,7 @@ class _MIHDeleteMessageState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), @@ -319,7 +320,7 @@ class _MIHDeleteMessageState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), @@ -389,7 +390,7 @@ class _MIHDeleteMessageState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), @@ -459,7 +460,7 @@ class _MIHDeleteMessageState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), diff --git a/Frontend/lib/mih_packages/access_review/builder/build_access_request_list.dart b/Frontend/lib/mih_packages/access_review/builder/build_access_request_list.dart index aff1475b..95dd7ebb 100644 --- a/Frontend/lib/mih_packages/access_review/builder/build_access_request_list.dart +++ b/Frontend/lib/mih_packages/access_review/builder/build_access_request_list.dart @@ -142,8 +142,7 @@ class _BuildPatientsListState extends State { } else { accessWithColour = TextSpan( text: "$access\n", - style: TextStyle( - color: MzansiInnovationHub.of(context)!.theme.errorColor())); + style: TextStyle(color: MihColors.getRedColor(context))); } return ListTile( @@ -248,8 +247,7 @@ class _BuildPatientsListState extends State { onPressed: () { updateAccessAPICall(index, "declined"); }, - buttonColor: - MzansiInnovationHub.of(context)!.theme.errorColor(), + buttonColor: MihColors.getRedColor(context), width: 300, child: Text( "Decline", diff --git a/Frontend/lib/mih_packages/access_review/builder/build_business_access_list.dart b/Frontend/lib/mih_packages/access_review/builder/build_business_access_list.dart index def3f24a..e429a0af 100644 --- a/Frontend/lib/mih_packages/access_review/builder/build_business_access_list.dart +++ b/Frontend/lib/mih_packages/access_review/builder/build_business_access_list.dart @@ -95,8 +95,7 @@ class _BuildPatientsListState extends State { } else { accessWithColour = TextSpan( text: "$access\n", - style: TextStyle( - color: MzansiInnovationHub.of(context)!.theme.errorColor())); + style: TextStyle(color: MihColors.getRedColor(context))); } return ListTile( @@ -212,16 +211,14 @@ class _BuildPatientsListState extends State { "Important Notice: Approving Profile Access", style: TextStyle( fontWeight: FontWeight.bold, - color: - MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), ), Text( "You are about to accept access to your patient's profile. Please be aware of the following important points:", style: TextStyle( fontWeight: FontWeight.normal, - color: - MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), ), SizedBox( @@ -264,8 +261,7 @@ class _BuildPatientsListState extends State { "By pressing the \"Approve\" button you accept the above terms.", style: TextStyle( fontWeight: FontWeight.bold, - color: - MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), ), ], @@ -281,16 +277,14 @@ class _BuildPatientsListState extends State { "Important Notice: Approved Profile Access", style: TextStyle( fontWeight: FontWeight.bold, - color: - MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), ), Text( "You have accepted access to your patient's profile. Please be aware of the following important points:", style: TextStyle( fontWeight: FontWeight.normal, - color: - MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), ), SizedBox( @@ -355,8 +349,7 @@ class _BuildPatientsListState extends State { context, ); }, - buttonColor: - MzansiInnovationHub.of(context)!.theme.errorColor(), + buttonColor: MihColors.getRedColor(context), width: 300, child: Text( "Decline", diff --git a/Frontend/lib/mih_packages/authentication/biometric_check.dart b/Frontend/lib/mih_packages/authentication/biometric_check.dart index 10b918d3..29450b93 100644 --- a/Frontend/lib/mih_packages/authentication/biometric_check.dart +++ b/Frontend/lib/mih_packages/authentication/biometric_check.dart @@ -110,7 +110,7 @@ class _BiometricCheckState extends State { Widget alertpopUp = MihPackageAlert( alertIcon: Icon( Icons.fingerprint, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 100, ), alertTitle: "Biometric Authentication Error", @@ -172,7 +172,7 @@ class _BiometricCheckState extends State { ), ], ), - alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), + alertColour: MihColors.getRedColor(context), ); showDialog( context: context, diff --git a/Frontend/lib/mih_packages/authentication/signin.dart b/Frontend/lib/mih_packages/authentication/signin.dart index 4ec7d03a..2af687a6 100644 --- a/Frontend/lib/mih_packages/authentication/signin.dart +++ b/Frontend/lib/mih_packages/authentication/signin.dart @@ -282,7 +282,7 @@ class _SignInState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), diff --git a/Frontend/lib/mih_packages/calculator/package_tools/currency_exchange_rate.dart b/Frontend/lib/mih_packages/calculator/package_tools/currency_exchange_rate.dart index d00de2f7..b727be5a 100644 --- a/Frontend/lib/mih_packages/calculator/package_tools/currency_exchange_rate.dart +++ b/Frontend/lib/mih_packages/calculator/package_tools/currency_exchange_rate.dart @@ -10,6 +10,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_text_form_field.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart'; +import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_currency_exchange_rate_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart'; @@ -436,8 +437,7 @@ class _CurrencyExchangeRateState extends State { child: Text( "Error pulling Currency Exchange Data.", style: TextStyle( - fontSize: 25, - color: MzansiInnovationHub.of(context)!.theme.errorColor()), + fontSize: 25, color: MihColors.getRedColor(context)), textAlign: TextAlign.center, ), ); diff --git a/Frontend/lib/mih_packages/calculator/package_tools/simple_calc.dart b/Frontend/lib/mih_packages/calculator/package_tools/simple_calc.dart index 054fb93f..f71725c4 100644 --- a/Frontend/lib/mih_packages/calculator/package_tools/simple_calc.dart +++ b/Frontend/lib/mih_packages/calculator/package_tools/simple_calc.dart @@ -4,6 +4,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart'; import 'package:flutter/material.dart'; import 'package:math_expressions/math_expressions.dart'; +import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; class SimpleCalc extends StatefulWidget { const SimpleCalc({super.key}); @@ -295,8 +296,7 @@ class _SimpleCalcState extends State { equalPressed(); }); }, - buttonColor: - MzansiInnovationHub.of(context)!.theme.errorColor(), + buttonColor: MihColors.getRedColor(context), width: 50, height: 50, borderRadius: 5, @@ -320,9 +320,7 @@ class _SimpleCalcState extends State { userInput = answer; }); }, - buttonColor: MzansiInnovationHub.of(context)! - .theme - .successColor(), + buttonColor: MihColors.getGreenColor(context), width: 50, height: 50, borderRadius: 5, diff --git a/Frontend/lib/mih_packages/calculator/package_tools/tip_calc.dart b/Frontend/lib/mih_packages/calculator/package_tools/tip_calc.dart index 3ec8ffed..e5ac3c16 100644 --- a/Frontend/lib/mih_packages/calculator/package_tools/tip_calc.dart +++ b/Frontend/lib/mih_packages/calculator/package_tools/tip_calc.dart @@ -1,5 +1,6 @@ import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_banner_ad.dart'; +import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart'; @@ -392,9 +393,7 @@ class _TipCalcState extends State { MihAlertServices().formNotFilledCompletely(context); } }, - buttonColor: MzansiInnovationHub.of(context)! - .theme - .successColor(), + buttonColor: MihColors.getGreenColor(context), width: 300, child: Text( "Calculate", @@ -411,8 +410,7 @@ class _TipCalcState extends State { onPressed: () { clearInput(); }, - buttonColor: - MzansiInnovationHub.of(context)!.theme.errorColor(), + buttonColor: MihColors.getRedColor(context), width: 300, child: Text( "Clear", diff --git a/Frontend/lib/mih_packages/calendar/builder/build_access_request_list.dart b/Frontend/lib/mih_packages/calendar/builder/build_access_request_list.dart index 9d1dcd16..f551fd20 100644 --- a/Frontend/lib/mih_packages/calendar/builder/build_access_request_list.dart +++ b/Frontend/lib/mih_packages/calendar/builder/build_access_request_list.dart @@ -144,8 +144,7 @@ class _BuildPatientsListState extends State { } else { accessWithColour = TextSpan( text: "$access\n", - style: TextStyle( - color: MzansiInnovationHub.of(context)!.theme.errorColor())); + style: TextStyle(color: MihColors.getRedColor(context))); } return ListTile( @@ -250,8 +249,7 @@ class _BuildPatientsListState extends State { onPressed: () { updateAccessAPICall(index, "declined"); }, - buttonColor: - MzansiInnovationHub.of(context)!.theme.errorColor(), + buttonColor: MihColors.getRedColor(context), width: 300, child: Text( "Decline", diff --git a/Frontend/lib/mih_packages/calendar/package_tools/appointments.dart b/Frontend/lib/mih_packages/calendar/package_tools/appointments.dart index bfb7c56f..b4542e01 100644 --- a/Frontend/lib/mih_packages/calendar/package_tools/appointments.dart +++ b/Frontend/lib/mih_packages/calendar/package_tools/appointments.dart @@ -243,9 +243,7 @@ class _PatientAccessRequestState extends State { MihAlertServices().formNotFilledCompletely(context); } }, - buttonColor: MzansiInnovationHub.of(context)! - .theme - .successColor(), + buttonColor: MihColors.getGreenColor(context), width: 300, child: Text( "Add", diff --git a/Frontend/lib/mih_packages/mih_authentication/package_tools/mih_register.dart b/Frontend/lib/mih_packages/mih_authentication/package_tools/mih_register.dart index 862f1bc0..df89c31a 100644 --- a/Frontend/lib/mih_packages/mih_authentication/package_tools/mih_register.dart +++ b/Frontend/lib/mih_packages/mih_authentication/package_tools/mih_register.dart @@ -11,6 +11,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_text_form_field.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart'; +import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import 'package:mzansi_innovation_hub/mih_config/mih_env.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_user_services.dart'; @@ -159,7 +160,7 @@ class _MihRegisterState extends State { return MihPackageAlert( alertIcon: Icon( Icons.warning_amber_rounded, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 100, ), alertTitle: "Error While Signing Up", @@ -170,7 +171,7 @@ class _MihRegisterState extends State { fontSize: 18, ), ), - alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), + alertColour: MihColors.getRedColor(context), ); }, ); diff --git a/Frontend/lib/mih_packages/mih_home/mih_home_legacy.dart b/Frontend/lib/mih_packages/mih_home/mih_home_legacy.dart index 4d2b7a66..7fe283df 100644 --- a/Frontend/lib/mih_packages/mih_home/mih_home_legacy.dart +++ b/Frontend/lib/mih_packages/mih_home/mih_home_legacy.dart @@ -1021,7 +1021,7 @@ class _MIHHomeLegacyState extends State { child: Icon( Icons.circle, size: 10, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), ) ], diff --git a/Frontend/lib/mih_packages/mih_home/mih_profile_getter.dart b/Frontend/lib/mih_packages/mih_home/mih_profile_getter.dart index 3b44db14..4af5036b 100644 --- a/Frontend/lib/mih_packages/mih_home/mih_profile_getter.dart +++ b/Frontend/lib/mih_packages/mih_home/mih_profile_getter.dart @@ -142,8 +142,7 @@ class _MIHProfileGetterState extends State { "Error: $error", textAlign: TextAlign.left, style: TextStyle( - color: - MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), fontSize: 15, fontWeight: FontWeight.bold, ), diff --git a/Frontend/lib/mih_packages/mzansi_ai/package_tools/ai_chat.dart b/Frontend/lib/mih_packages/mzansi_ai/package_tools/ai_chat.dart index 2288a069..777aeff9 100644 --- a/Frontend/lib/mih_packages/mzansi_ai/package_tools/ai_chat.dart +++ b/Frontend/lib/mih_packages/mzansi_ai/package_tools/ai_chat.dart @@ -313,7 +313,7 @@ class _AiChatState extends State { MzansiInnovationHub.of(context)!.theme.primaryColor(), primaryColor: MzansiInnovationHub.of(context)!.theme.secondaryColor(), secondaryColor: MihColors.getGreenColor(context), - errorColor: MzansiInnovationHub.of(context)!.theme.errorColor(), + errorColor: MihColors.getRedColor(context), sentMessageBodyTextStyle: TextStyle( color: MzansiInnovationHub.of(context)!.theme.primaryColor(), fontSize: _chatFrontSize, @@ -697,7 +697,7 @@ class _AiChatState extends State { child: IconButton.filled( style: ButtonStyle( backgroundColor: WidgetStateProperty.all( - MzansiInnovationHub.of(context)!.theme.errorColor()), + MihColors.getRedColor(context)), ), color: MzansiInnovationHub.of(context)!.theme.primaryColor(), diff --git a/Frontend/lib/mih_packages/mzansi_directory/package_tools/mih_search_mzansi.dart b/Frontend/lib/mih_packages/mzansi_directory/package_tools/mih_search_mzansi.dart index 550e9ea2..b09410ea 100644 --- a/Frontend/lib/mih_packages/mzansi_directory/package_tools/mih_search_mzansi.dart +++ b/Frontend/lib/mih_packages/mzansi_directory/package_tools/mih_search_mzansi.dart @@ -9,6 +9,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_search_bar.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart'; +import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import 'package:mzansi_innovation_hub/mih_packages/mzansi_directory/builders/build_business_search_resultsList.dart'; import 'package:mzansi_innovation_hub/mih_packages/mzansi_directory/builders/build_user_search_results_list.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart'; @@ -397,8 +398,7 @@ class _MihSearchMzansiState extends State { child: Text( "Error pulling Patients Data\n/users/search/${mzansiSearchController.text}", style: TextStyle( - fontSize: 25, - color: MzansiInnovationHub.of(context)!.theme.errorColor()), + fontSize: 25, color: MihColors.getRedColor(context)), textAlign: TextAlign.center, ), ); @@ -550,8 +550,7 @@ class _MihSearchMzansiState extends State { child: Text( "Error pulling Patients Data\n/users/search/${mzansiSearchController.text}", style: TextStyle( - fontSize: 25, - color: MzansiInnovationHub.of(context)!.theme.errorColor()), + fontSize: 25, color: MihColors.getRedColor(context)), textAlign: TextAlign.center, ), ); diff --git a/Frontend/lib/mih_packages/mzansi_profile/business_profile/components/mih_add_bookmark_alert.dart b/Frontend/lib/mih_packages/mzansi_profile/business_profile/components/mih_add_bookmark_alert.dart index 302fb6c7..bac0f167 100644 --- a/Frontend/lib/mih_packages/mzansi_profile/business_profile/components/mih_add_bookmark_alert.dart +++ b/Frontend/lib/mih_packages/mzansi_profile/business_profile/components/mih_add_bookmark_alert.dart @@ -88,8 +88,7 @@ class _MihAddBookmarkAlertState extends State { onPressed: () async { Navigator.of(context).pop(); }, - buttonColor: - MzansiInnovationHub.of(context)!.theme.errorColor(), + buttonColor: MihColors.getRedColor(context), child: Text( "Cancel", style: TextStyle( diff --git a/Frontend/lib/mih_packages/mzansi_profile/business_profile/components/mih_business_info_card.dart b/Frontend/lib/mih_packages/mzansi_profile/business_profile/components/mih_business_info_card.dart index 3ca50400..c678ea60 100644 --- a/Frontend/lib/mih_packages/mzansi_profile/business_profile/components/mih_business_info_card.dart +++ b/Frontend/lib/mih_packages/mzansi_profile/business_profile/components/mih_business_info_card.dart @@ -52,7 +52,7 @@ class _MihBusinessCardState extends State { alertIcon: Icon( Icons.warning_rounded, size: 100, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), alertTitle: "Error Making Call", alertBody: Column( @@ -68,7 +68,7 @@ class _MihBusinessCardState extends State { ), ], ), - alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), + alertColour: MihColors.getRedColor(context), ); }); } @@ -102,7 +102,7 @@ class _MihBusinessCardState extends State { alertIcon: Icon( Icons.warning_rounded, size: 100, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), alertTitle: "Error Creating Email", alertBody: Column( @@ -118,7 +118,7 @@ class _MihBusinessCardState extends State { ), ], ), - alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), + alertColour: MihColors.getRedColor(context), ); }); } @@ -143,7 +143,7 @@ class _MihBusinessCardState extends State { alertIcon: Icon( Icons.warning_rounded, size: 100, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), alertTitle: "Error Creating Maps", alertBody: Column( @@ -159,8 +159,7 @@ class _MihBusinessCardState extends State { ), ], ), - alertColour: - MzansiInnovationHub.of(context)!.theme.errorColor(), + alertColour: MihColors.getRedColor(context), ); }); } @@ -172,7 +171,7 @@ class _MihBusinessCardState extends State { alertIcon: Icon( Icons.warning_rounded, size: 100, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), alertTitle: "Error Creating Maps", alertBody: Column( @@ -188,7 +187,7 @@ class _MihBusinessCardState extends State { ), ], ), - alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), + alertColour: MihColors.getRedColor(context), ); }); } @@ -212,7 +211,7 @@ class _MihBusinessCardState extends State { alertIcon: Icon( Icons.warning_rounded, size: 100, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), alertTitle: "Error Opening Website", alertBody: Column( @@ -228,8 +227,7 @@ class _MihBusinessCardState extends State { ), ], ), - alertColour: - MzansiInnovationHub.of(context)!.theme.errorColor(), + alertColour: MihColors.getRedColor(context), ); }); } @@ -241,7 +239,7 @@ class _MihBusinessCardState extends State { alertIcon: Icon( Icons.warning_rounded, size: 100, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), alertTitle: "Error Opening Website", alertBody: Column( @@ -257,7 +255,7 @@ class _MihBusinessCardState extends State { ), ], ), - alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), + alertColour: MihColors.getRedColor(context), ); }); } diff --git a/Frontend/lib/mih_packages/mzansi_profile/business_profile/components/mih_delete_bookmark_alert.dart b/Frontend/lib/mih_packages/mzansi_profile/business_profile/components/mih_delete_bookmark_alert.dart index 3d6ea82a..bf12f343 100644 --- a/Frontend/lib/mih_packages/mzansi_profile/business_profile/components/mih_delete_bookmark_alert.dart +++ b/Frontend/lib/mih_packages/mzansi_profile/business_profile/components/mih_delete_bookmark_alert.dart @@ -121,8 +121,7 @@ class _MihDeleteBookmarkAlertState extends State { deleteBookmark( widget.bookmarkBusiness!.idbookmarked_businesses); }, - buttonColor: - MzansiInnovationHub.of(context)!.theme.errorColor(), + buttonColor: MihColors.getRedColor(context), child: Text( "Remove Business", style: TextStyle( diff --git a/Frontend/lib/mih_packages/mzansi_profile/business_profile/components/mih_review_business_window.dart b/Frontend/lib/mih_packages/mzansi_profile/business_profile/components/mih_review_business_window.dart index 083127aa..dba24806 100644 --- a/Frontend/lib/mih_packages/mzansi_profile/business_profile/components/mih_review_business_window.dart +++ b/Frontend/lib/mih_packages/mzansi_profile/business_profile/components/mih_review_business_window.dart @@ -52,11 +52,11 @@ class _MihReviewBusinessWindowState extends State { showDialog( context: context, builder: (context) => MihPackageAlert( - alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), + alertColour: MihColors.getRedColor(context), alertIcon: Icon( Icons.warning_rounded, size: 100, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), alertTitle: "Delete Review", alertBody: Column( @@ -117,8 +117,7 @@ class _MihReviewBusinessWindowState extends State { } }); }, - buttonColor: - MzansiInnovationHub.of(context)!.theme.errorColor(), + buttonColor: MihColors.getRedColor(context), child: Text( "Delete", style: TextStyle( @@ -157,7 +156,7 @@ class _MihReviewBusinessWindowState extends State { if (_counter.value <= limit) { return MzansiInnovationHub.of(context)!.theme.secondaryColor(); } else { - return MzansiInnovationHub.of(context)!.theme.errorColor(); + return MihColors.getRedColor(context); } } @@ -501,9 +500,7 @@ class _MihReviewBusinessWindowState extends State { MihAlertServices().formNotFilledCompletely(context); } }, - buttonColor: MzansiInnovationHub.of(context)! - .theme - .successColor(), + buttonColor: MihColors.getGreenColor(context), width: 300, child: Text( widget.businessReview != null diff --git a/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_business_details.dart b/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_business_details.dart index f417ef12..3be979cf 100644 --- a/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_business_details.dart +++ b/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_business_details.dart @@ -105,7 +105,7 @@ class _MihBusinessDetailsState extends State { return MihPackageAlert( alertIcon: Icon( Icons.warning_rounded, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), alertTitle: "Error Updating Business Details", alertBody: Column( @@ -120,8 +120,7 @@ class _MihBusinessDetailsState extends State { ), ], ), - alertColour: - MzansiInnovationHub.of(context)!.theme.errorColor(), + alertColour: MihColors.getRedColor(context), ); }, ); @@ -605,7 +604,7 @@ class _MihBusinessDetailsState extends State { if (_counter.value <= limit) { return MzansiInnovationHub.of(context)!.theme.secondaryColor(); } else { - return MzansiInnovationHub.of(context)!.theme.errorColor(); + return MihColors.getRedColor(context); } } diff --git a/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_business_user_search.dart b/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_business_user_search.dart index 289ba0dc..86120f62 100644 --- a/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_business_user_search.dart +++ b/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_business_user_search.dart @@ -6,6 +6,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_ import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart'; +import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/business_profile/builders/build_user_list.dart'; import 'package:flutter/material.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_user_services.dart'; @@ -223,9 +224,7 @@ class _MihBusinessUserSearchState extends State { child: Text( "$errorCode: Error pulling Patients Data\n/users/search/$userSearch\n$errorBody", style: TextStyle( - fontSize: 25, - color: - MzansiInnovationHub.of(context)!.theme.errorColor()), + fontSize: 25, color: MihColors.getRedColor(context)), textAlign: TextAlign.center, ), ); diff --git a/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_my_business_team.dart b/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_my_business_team.dart index 610b5a88..6832f576 100644 --- a/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_my_business_team.dart +++ b/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_my_business_team.dart @@ -4,6 +4,7 @@ import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart'; +import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import 'package:mzansi_innovation_hub/mih_config/mih_env.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/arguments.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_objects/business_employee.dart'; @@ -104,9 +105,7 @@ class _MihMyBusinessTeamState extends State { child: Text( "$errorCode: Error pulling Patients Data\n${AppEnviroment.baseApiUrl}/business-user/users/${widget.arguments.businessUser!.business_id}\n$errorBody", style: TextStyle( - fontSize: 25, - color: - MzansiInnovationHub.of(context)!.theme.errorColor()), + fontSize: 25, color: MihColors.getRedColor(context)), textAlign: TextAlign.center, ), ); diff --git a/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_my_business_user.dart b/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_my_business_user.dart index cd2b3164..b2bbaef8 100644 --- a/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_my_business_user.dart +++ b/Frontend/lib/mih_packages/mzansi_profile/business_profile/package_tools/mih_my_business_user.dart @@ -127,7 +127,7 @@ class _MihMyBusinessUserState extends State { return MihPackageAlert( alertIcon: Icon( Icons.warning_rounded, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), alertTitle: "Error Updating Business User Details", alertBody: Column( @@ -142,8 +142,7 @@ class _MihMyBusinessUserState extends State { ), ], ), - alertColour: - MzansiInnovationHub.of(context)!.theme.errorColor(), + alertColour: MihColors.getRedColor(context), ); }, ); diff --git a/Frontend/lib/mih_packages/mzansi_profile/business_profile/profile_business_add.dart b/Frontend/lib/mih_packages/mzansi_profile/business_profile/profile_business_add.dart index 2bd8596f..6e101128 100644 --- a/Frontend/lib/mih_packages/mzansi_profile/business_profile/profile_business_add.dart +++ b/Frontend/lib/mih_packages/mzansi_profile/business_profile/profile_business_add.dart @@ -4,6 +4,7 @@ import 'package:country_code_picker/country_code_picker.dart'; import 'package:http/http.dart'; import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart'; +import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_business_details_services.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_file_services.dart'; @@ -259,7 +260,7 @@ class _ProfileBusinessAddState extends State { if (_counter.value <= limit) { return MzansiInnovationHub.of(context)!.theme.secondaryColor(); } else { - return MzansiInnovationHub.of(context)!.theme.errorColor(); + return MihColors.getRedColor(context); } } diff --git a/Frontend/lib/mih_packages/mzansi_profile/personal_profile/package_tools/mih_personal_profile.dart b/Frontend/lib/mih_packages/mzansi_profile/personal_profile/package_tools/mih_personal_profile.dart index 85b8b2c1..2a5fa115 100644 --- a/Frontend/lib/mih_packages/mzansi_profile/personal_profile/package_tools/mih_personal_profile.dart +++ b/Frontend/lib/mih_packages/mzansi_profile/personal_profile/package_tools/mih_personal_profile.dart @@ -54,7 +54,7 @@ class _MihPersonalProfileState extends State { alertIcon: Icon( Icons.warning_amber_rounded, size: 100, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), alertTitle: "Too Slow, That Username is Taken", alertBody: const Text( @@ -63,7 +63,7 @@ class _MihPersonalProfileState extends State { fontSize: 15, ), ), - alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), + alertColour: MihColors.getRedColor(context), ); }, ); @@ -196,7 +196,7 @@ class _MihPersonalProfileState extends State { if (_counter.value <= limit) { return MzansiInnovationHub.of(context)!.theme.secondaryColor(); } else { - return MzansiInnovationHub.of(context)!.theme.errorColor(); + return MihColors.getRedColor(context); } } diff --git a/Frontend/lib/mih_packages/mzansi_profile/personal_profile/package_tools/mih_personal_settings.dart b/Frontend/lib/mih_packages/mzansi_profile/personal_profile/package_tools/mih_personal_settings.dart index 944a7e7a..159e0909 100644 --- a/Frontend/lib/mih_packages/mzansi_profile/personal_profile/package_tools/mih_personal_settings.dart +++ b/Frontend/lib/mih_packages/mzansi_profile/personal_profile/package_tools/mih_personal_settings.dart @@ -39,7 +39,7 @@ class _MihPersonalSettingsState extends State { alertIcon: Icon( Icons.warning_amber_rounded, size: 100, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), alertTitle: "Are you sure you want to permanently delete your MIH account?", @@ -65,8 +65,7 @@ class _MihPersonalSettingsState extends State { MihUserServices.deleteAccount( widget.signedInUser.app_id, context); }, - buttonColor: - MzansiInnovationHub.of(context)!.theme.errorColor(), + buttonColor: MihColors.getRedColor(context), width: 300, child: Text( "Delete", @@ -100,7 +99,7 @@ class _MihPersonalSettingsState extends State { ) ], ), - alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), + alertColour: MihColors.getRedColor(context), ); }, ); @@ -132,7 +131,7 @@ class _MihPersonalSettingsState extends State { onPressed: () { deleteAccountPopUp(context); }, - buttonColor: MzansiInnovationHub.of(context)!.theme.errorColor(), + buttonColor: MihColors.getRedColor(context), width: 300, child: Text( "Delete Account", diff --git a/Frontend/lib/mih_packages/mzansi_wallet/builder/build_loyalty_card_list.dart b/Frontend/lib/mih_packages/mzansi_wallet/builder/build_loyalty_card_list.dart index f9ced553..62d48733 100644 --- a/Frontend/lib/mih_packages/mzansi_wallet/builder/build_loyalty_card_list.dart +++ b/Frontend/lib/mih_packages/mzansi_wallet/builder/build_loyalty_card_list.dart @@ -258,10 +258,10 @@ class _BuildLoyaltyCardListState extends State { barrierDismissible: false, builder: (context) { return MihPackageAlert( - alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), + alertColour: MihColors.getRedColor(context), alertIcon: Icon( Icons.favorite_border, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 100, ), alertTitle: "Remove From Favourites", @@ -291,8 +291,7 @@ class _BuildLoyaltyCardListState extends State { ctxt, ); }, - buttonColor: - MzansiInnovationHub.of(context)!.theme.errorColor(), + buttonColor: MihColors.getRedColor(context), width: 300, child: Text( "Remove", diff --git a/Frontend/lib/mih_packages/mzansi_wallet/components/mih_barcode_scanner.dart b/Frontend/lib/mih_packages/mzansi_wallet/components/mih_barcode_scanner.dart index 0e6abcc6..d983dbf5 100644 --- a/Frontend/lib/mih_packages/mzansi_wallet/components/mih_barcode_scanner.dart +++ b/Frontend/lib/mih_packages/mzansi_wallet/components/mih_barcode_scanner.dart @@ -4,6 +4,7 @@ import 'package:mzansi_innovation_hub/main.dart'; import 'package:flutter/material.dart'; import 'package:mobile_scanner/mobile_scanner.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart'; +import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; class MihBarcodeScanner extends StatefulWidget { final TextEditingController cardNumberController; @@ -125,8 +126,7 @@ class _MihBarcodeScannerState extends State _scannerController.stop(); Navigator.of(context).pop(); }, - buttonColor: - MzansiInnovationHub.of(context)!.theme.errorColor(), + buttonColor: MihColors.getRedColor(context), width: 100, height: 50, child: Text( diff --git a/Frontend/lib/mih_packages/patient_profile/pat_manager/list_builders/build_mih_patient_search_list.dart b/Frontend/lib/mih_packages/patient_profile/pat_manager/list_builders/build_mih_patient_search_list.dart index 958170dd..cc985d02 100644 --- a/Frontend/lib/mih_packages/patient_profile/pat_manager/list_builders/build_mih_patient_search_list.dart +++ b/Frontend/lib/mih_packages/patient_profile/pat_manager/list_builders/build_mih_patient_search_list.dart @@ -1,6 +1,7 @@ import 'dart:convert'; import 'package:mzansi_innovation_hub/main.dart'; +import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_service_calls.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_validation_services.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_button.dart'; @@ -283,16 +284,14 @@ class _BuildPatientsListState extends State { "Important Notice: Requesting Patient Profile Access", style: TextStyle( fontWeight: FontWeight.bold, - color: - MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), ), Text( "You are about to request access to a patient's profile. Please be aware of the following important points:", style: TextStyle( fontWeight: FontWeight.normal, - color: - MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), ), SizedBox( @@ -301,8 +300,7 @@ class _BuildPatientsListState extends State { "1. Permanent Access: Once the patient accepts your access request, it will become permanent.", style: TextStyle( fontWeight: FontWeight.normal, - color: - MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), ), ), @@ -312,8 +310,7 @@ class _BuildPatientsListState extends State { "2. Shared Information: Any updates you make to the patient's profile will be visible to others who have access to the profile.", style: TextStyle( fontWeight: FontWeight.normal, - color: - MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), ), ), @@ -323,8 +320,7 @@ class _BuildPatientsListState extends State { "3. Irreversible Access: Once granted, you cannot revoke your access to the patient's profile.", style: TextStyle( fontWeight: FontWeight.normal, - color: - MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), ), ), @@ -332,8 +328,7 @@ class _BuildPatientsListState extends State { "By pressing the \"Request Access\" button you accept the above terms.\n", style: TextStyle( fontWeight: FontWeight.bold, - color: - MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), ), ], @@ -366,9 +361,7 @@ class _BuildPatientsListState extends State { noAccessWarning(); } }, - buttonColor: MzansiInnovationHub.of(context)! - .theme - .successColor(), + buttonColor: MihColors.getGreenColor(context), width: 300, child: Text( "View Profile", @@ -402,9 +395,7 @@ class _BuildPatientsListState extends State { context, ); }, - buttonColor: MzansiInnovationHub.of(context)! - .theme - .successColor(), + buttonColor: MihColors.getGreenColor(context), width: 300, child: Text( "Request Access", @@ -436,9 +427,7 @@ class _BuildPatientsListState extends State { context, ); }, - buttonColor: MzansiInnovationHub.of(context)! - .theme - .successColor(), + buttonColor: MihColors.getGreenColor(context), width: 300, child: Text( "Re-apply", diff --git a/Frontend/lib/mih_packages/patient_profile/pat_manager/list_builders/build_my_patient_list_list.dart b/Frontend/lib/mih_packages/patient_profile/pat_manager/list_builders/build_my_patient_list_list.dart index 709bbb65..ced1f4d0 100644 --- a/Frontend/lib/mih_packages/patient_profile/pat_manager/list_builders/build_my_patient_list_list.dart +++ b/Frontend/lib/mih_packages/patient_profile/pat_manager/list_builders/build_my_patient_list_list.dart @@ -399,8 +399,7 @@ class _BuildPatientsListState extends State { lastName = "${widget.patientAccesses[index].lname[0]}********"; accessWithColour = TextSpan( text: "$access\n", - style: TextStyle( - color: MzansiInnovationHub.of(context)!.theme.errorColor())); + style: TextStyle(color: MihColors.getRedColor(context))); } return ListTile( diff --git a/Frontend/lib/mih_packages/patient_profile/pat_manager/package_tools/mih_patient_search.dart b/Frontend/lib/mih_packages/patient_profile/pat_manager/package_tools/mih_patient_search.dart index ac367f65..3dcc5dd0 100644 --- a/Frontend/lib/mih_packages/patient_profile/pat_manager/package_tools/mih_patient_search.dart +++ b/Frontend/lib/mih_packages/patient_profile/pat_manager/package_tools/mih_patient_search.dart @@ -1,5 +1,6 @@ import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart'; +import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_service_calls.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart'; @@ -91,9 +92,7 @@ class _MihPatientSearchState extends State { child: Text( "Error pulling Patients Data\n$baseUrl/patients/search/$_mihPatientSearchString", style: TextStyle( - fontSize: 25, - color: - MzansiInnovationHub.of(context)!.theme.errorColor()), + fontSize: 25, color: MihColors.getRedColor(context)), textAlign: TextAlign.center, ), ); diff --git a/Frontend/lib/mih_packages/patient_profile/pat_manager/package_tools/my_patient_list.dart b/Frontend/lib/mih_packages/patient_profile/pat_manager/package_tools/my_patient_list.dart index 56f7685e..e14a1480 100644 --- a/Frontend/lib/mih_packages/patient_profile/pat_manager/package_tools/my_patient_list.dart +++ b/Frontend/lib/mih_packages/patient_profile/pat_manager/package_tools/my_patient_list.dart @@ -1,5 +1,6 @@ import 'package:mzansi_innovation_hub/main.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_icons.dart'; +import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart'; import 'package:mzansi_innovation_hub/mih_services/mih_service_calls.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_single_child_scroll.dart'; import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_tool_body.dart'; @@ -93,9 +94,7 @@ class _MyPatientListState extends State { child: Text( "Error pulling Patient Access Data\n$baseUrl/access-requests/business/patient/${widget.business!.business_id}", style: TextStyle( - fontSize: 25, - color: - MzansiInnovationHub.of(context)!.theme.errorColor()), + fontSize: 25, color: MihColors.getRedColor(context)), textAlign: TextAlign.center, ), ); diff --git a/Frontend/lib/mih_packages/patient_profile/pat_manager/package_tools/waiting_room.dart b/Frontend/lib/mih_packages/patient_profile/pat_manager/package_tools/waiting_room.dart index eb38d033..b9f50ca5 100644 --- a/Frontend/lib/mih_packages/patient_profile/pat_manager/package_tools/waiting_room.dart +++ b/Frontend/lib/mih_packages/patient_profile/pat_manager/package_tools/waiting_room.dart @@ -419,9 +419,7 @@ class _WaitingRoomState extends State { MihAlertServices().formNotFilledCompletely(context); } }, - buttonColor: MzansiInnovationHub.of(context)! - .theme - .successColor(), + buttonColor: MihColors.getGreenColor(context), width: 300, child: Text( "Add", diff --git a/Frontend/lib/mih_packages/patient_profile/pat_profile/package_tools/patient_consultation.dart b/Frontend/lib/mih_packages/patient_profile/pat_profile/package_tools/patient_consultation.dart index d5e5d55a..e5ab765f 100644 --- a/Frontend/lib/mih_packages/patient_profile/pat_profile/package_tools/patient_consultation.dart +++ b/Frontend/lib/mih_packages/patient_profile/pat_profile/package_tools/patient_consultation.dart @@ -280,7 +280,7 @@ class _PatientConsultationState extends State { if (_counter.value <= 512) { return MzansiInnovationHub.of(context)!.theme.secondaryColor(); } else { - return MzansiInnovationHub.of(context)!.theme.errorColor(); + return MihColors.getRedColor(context); } } diff --git a/Frontend/lib/mih_packages/patient_profile/pat_profile/patient_edit.dart b/Frontend/lib/mih_packages/patient_profile/pat_profile/patient_edit.dart index 1422739f..989f7328 100644 --- a/Frontend/lib/mih_packages/patient_profile/pat_profile/patient_edit.dart +++ b/Frontend/lib/mih_packages/patient_profile/pat_profile/patient_edit.dart @@ -281,8 +281,7 @@ class _EditPatientState extends State { ), MihButton( onPressed: deletePatientApiCall, - buttonColor: - MzansiInnovationHub.of(context)!.theme.errorColor(), + buttonColor: MihColors.getRedColor(context), width: 300, child: Text( "Delete", @@ -310,7 +309,7 @@ class _EditPatientState extends State { }, icon: Icon( Icons.close, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), size: 35, ), ), diff --git a/Frontend/lib/mih_services/mih_alert_services.dart b/Frontend/lib/mih_services/mih_alert_services.dart index 070497d1..81961075 100644 --- a/Frontend/lib/mih_services/mih_alert_services.dart +++ b/Frontend/lib/mih_services/mih_alert_services.dart @@ -12,7 +12,7 @@ class MihAlertServices { alertIcon: Icon( Icons.warning_amber_rounded, size: 150, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), alertTitle: "Oops! Looks like some fields are missing.", alertBody: Column( @@ -51,7 +51,7 @@ class MihAlertServices { ), ], ), - alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), + alertColour: MihColors.getRedColor(context), ); }, ); @@ -96,7 +96,7 @@ class MihAlertServices { alertIcon: Icon( Icons.warning_amber_rounded, size: 150, - color: MzansiInnovationHub.of(context)!.theme.errorColor(), + color: MihColors.getRedColor(context), ), alertTitle: title, alertBody: Column( @@ -113,7 +113,7 @@ class MihAlertServices { const SizedBox(height: 25), ], ), - alertColour: MzansiInnovationHub.of(context)!.theme.errorColor(), + alertColour: MihColors.getRedColor(context), ); }, );