diff --git a/assets/images/svg/dark_mode_icon.svg b/assets/images/svg/dark_mode_icon.svg
new file mode 100644
index 00000000..501ece9d
--- /dev/null
+++ b/assets/images/svg/dark_mode_icon.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json
index 3635e650..e663c2bb 100644
--- a/assets/langs/ar-SA.json
+++ b/assets/langs/ar-SA.json
@@ -873,7 +873,7 @@
"walkin": "زيارة بدون موعد",
"laserClinic": "عيادة الليزر",
"continueString": "يكمل",
- "covid_info": "تجري مستشفيات د. سليمان الحبيب فحص فيروس كورونا المستجد وتصدر شهادات السفر على مدار الساعة، طوال أيام الأسبوع، وبسرعة ودقة عالية. يمكن للراغبين في الاستفادة من هذه الخدمة زيارة أحد فروع مستشفيات د. سليمان الحبيب وإجراء فحص كورونا خلال بضع دقائق والحصول على النتائج خلال عدة ساعات خدمة فحص فيروس كورونا Covid 19 بتقنية PCR للكشف عن الفيروس وفقاً لأعلى المعايير العالمية وبأحدث أجهزة RT-PCR عالية الدقة (GeneXpert الأمريكي وغيره)، وهي طرق معتمدة من قبل هيئة الغذاء والدواء وكذلك من قبل المركز السعودي للوقاية من الأمراض المُعدية",
+ "covid_info": "تجري مستشفيات د. سليمان الحبيب فحص فيروس كورونا المستجد وتصدر شهادات السفر على مدار الساعة، طوال أيام الأسبوع، وبسرعة ودقة عالية. يمكن للراغبين في الاستفادة من هذه الخدمة زيارة أحد فروع مستشفيات د. سليمان الحبيب وإجراء فحص كورونا خلال بضع دقائق والحصول على النتائج خلال عدة ساعات خدمة فحص فيروس كورونا Covid 19 بتقنية PCR للكشف عن الفيروس وفقاً لأعلى المعايير العالمية وبأحدث أجهزة RT-PCR عالية الدقة (GeneXpert الأمريكي وغيره)، وهي طرق معتمدة من قبل هيئة الغذاء والدواء وكذلك من قبل المركز السعودي للوقاية من الأمراض المُعدية",
"appointmentDetails": "تفاصيل الموعد",
"checkingDoctorAvailability": "جاري التحقق من توفر الطبيب...",
"cancellingAppointmentPleaseWait": "جاري إلغاء الموعد، يرجى الانتظار...",
@@ -1581,5 +1581,6 @@
"invalidInsurance": "لا يمكنك إجراء الدفع عبر الإنترنت لأنه ليس لديك تأمين صالح.",
"continueCash": "متابعة الدفع نقدًا",
"timeFor": "الوقت",
- "hmgPolicies": "سياسات مجموعة الحبيب الطبية"
+ "hmgPolicies": "سياسات مجموعة الحبيب الطبية",
+ "darkMode": "الوضع الليلي"
}
diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json
index 15d78000..3f5a1e57 100644
--- a/assets/langs/en-US.json
+++ b/assets/langs/en-US.json
@@ -853,7 +853,7 @@
"setTheDateRange": "Set The Date Range",
"historyFlowchart": "History FlowChart",
"to": "to",
- "startDate" : "Start Date",
+ "startDate": "Start Date",
"endDate": "End Date",
"hmgHospitals": "HMG Hospitals",
"hmcMedicalClinic": "HMC Medical Centers",
@@ -866,7 +866,7 @@
"walkin": "Walk In",
"continueString": "Continue",
"laserClinic": "Laser Clinic",
- "covid_info" :"Dr. Sulaiman Al Habib hospitals are conducting a test for the emerging corona virus and issuing travel certificates 24/7 in a short time and with high accuracy. Those wishing to benefit from this service can visit one of Dr. Sulaiman Al Habib branches to conduct a corona test within few minutes, and obtain the result within several hours. Corona Virus Covid 19 testing service with PCR technology to detect the virus according to the highest international standards and with the latest high-precision RT-PCR devices (American GeneXpert and others), That is approved by the Food and Drug Authority as well as by the Saudi Center for Infectious Diseases Prevention.",
+ "covid_info": "Dr. Sulaiman Al Habib hospitals are conducting a test for the emerging corona virus and issuing travel certificates 24/7 in a short time and with high accuracy. Those wishing to benefit from this service can visit one of Dr. Sulaiman Al Habib branches to conduct a corona test within few minutes, and obtain the result within several hours. Corona Virus Covid 19 testing service with PCR technology to detect the virus according to the highest international standards and with the latest high-precision RT-PCR devices (American GeneXpert and others), That is approved by the Food and Drug Authority as well as by the Saudi Center for Infectious Diseases Prevention.",
"appointmentDetails": "Appointment Details",
"checkingDoctorAvailability": "Checking doctor availability...",
"cancellingAppointmentPleaseWait": "Cancelling Appointment, Please Wait...",
@@ -1574,5 +1574,6 @@
"invalidInsurance": "You cannot make online payment because you do not have a valid insurance.",
"continueCash": "Continue as cash",
"timeFor": "Time For",
- "hmgPolicies": "HMG Policies"
+ "hmgPolicies": "HMG Policies",
+ "darkMode": "Dark Mode"
}
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
index e031a976..96a3df06 100644
--- a/ios/Runner.xcodeproj/project.pbxproj
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -17,15 +17,14 @@
61243B542EC5FA3700D46FA0 /* PenguinPlugin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B442EC5FA3700D46FA0 /* PenguinPlugin.swift */; };
61243B562EC5FA3700D46FA0 /* PenguinNavigator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B432EC5FA3700D46FA0 /* PenguinNavigator.swift */; };
61243B572EC5FA3700D46FA0 /* PenguinViewFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61243B462EC5FA3700D46FA0 /* PenguinViewFactory.swift */; };
+ 68D4441D2F3BBBD900995552 /* PenNavUI.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68D4441A2F3BBBD900995552 /* PenNavUI.xcframework */; };
+ 68D4441E2F3BBBD900995552 /* PenNavUI.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 68D4441A2F3BBBD900995552 /* PenNavUI.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ 68D4441F2F3BBBDA00995552 /* PenguinINRenderer.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68D4441B2F3BBBD900995552 /* PenguinINRenderer.xcframework */; };
+ 68D444202F3BBBDA00995552 /* PenguinINRenderer.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 68D4441B2F3BBBD900995552 /* PenguinINRenderer.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ 68D444212F3BBBDA00995552 /* Penguin.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 68D4441C2F3BBBD900995552 /* Penguin.xcframework */; };
+ 68D444222F3BBBDA00995552 /* Penguin.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 68D4441C2F3BBBD900995552 /* Penguin.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
- 765A5A8C2F35CD8B0003FF7D /* Penguin.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 765A5A802F35CD730003FF7D /* Penguin.xcframework */; };
- 765A5A8D2F35CD8B0003FF7D /* Penguin.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 765A5A802F35CD730003FF7D /* Penguin.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
- 765A5A8E2F35CD8B0003FF7D /* PenguinINRenderer.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 765A5A812F35CD730003FF7D /* PenguinINRenderer.xcframework */; };
- 765A5A8F2F35CD8B0003FF7D /* PenguinINRenderer.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 765A5A812F35CD730003FF7D /* PenguinINRenderer.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
- 765A5A902F35CD8B0003FF7D /* PenNavUI.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 765A5A822F35CD730003FF7D /* PenNavUI.xcframework */; };
- 765A5A912F35CD8B0003FF7D /* PenNavUI.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 765A5A822F35CD730003FF7D /* PenNavUI.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
76AA18AE2F3B2A4D00DC8DFC /* ring_30Sec.caf in Resources */ = {isa = PBXBuildFile; fileRef = 76AA18AC2F3B2A4D00DC8DFC /* ring_30Sec.caf */; };
- 76AA18AF2F3B2A4D00DC8DFC /* ring_30Sec.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 76AA18AD2F3B2A4D00DC8DFC /* ring_30Sec.mp3 */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
@@ -49,9 +48,9 @@
dstPath = "";
dstSubfolderSpec = 10;
files = (
- 765A5A8F2F35CD8B0003FF7D /* PenguinINRenderer.xcframework in Embed Frameworks */,
- 765A5A8D2F35CD8B0003FF7D /* Penguin.xcframework in Embed Frameworks */,
- 765A5A912F35CD8B0003FF7D /* PenNavUI.xcframework in Embed Frameworks */,
+ 68D444222F3BBBDA00995552 /* Penguin.xcframework in Embed Frameworks */,
+ 68D444202F3BBBDA00995552 /* PenguinINRenderer.xcframework in Embed Frameworks */,
+ 68D4441E2F3BBBD900995552 /* PenNavUI.xcframework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
@@ -72,15 +71,14 @@
61243B442EC5FA3700D46FA0 /* PenguinPlugin.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinPlugin.swift; sourceTree = ""; };
61243B452EC5FA3700D46FA0 /* PenguinView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinView.swift; sourceTree = ""; };
61243B462EC5FA3700D46FA0 /* PenguinViewFactory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PenguinViewFactory.swift; sourceTree = ""; };
+ 68D4441A2F3BBBD900995552 /* PenNavUI.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenNavUI.xcframework; path = Frameworks/PenNavUI.xcframework; sourceTree = ""; };
+ 68D4441B2F3BBBD900995552 /* PenguinINRenderer.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PenguinINRenderer.xcframework; path = Frameworks/PenguinINRenderer.xcframework; sourceTree = ""; };
+ 68D4441C2F3BBBD900995552 /* Penguin.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Penguin.xcframework; path = Frameworks/Penguin.xcframework; sourceTree = ""; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
7595037DD52211B91157B0F3 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
- 765A5A802F35CD730003FF7D /* Penguin.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = Penguin.xcframework; sourceTree = ""; };
- 765A5A812F35CD730003FF7D /* PenguinINRenderer.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = PenguinINRenderer.xcframework; sourceTree = ""; };
- 765A5A822F35CD730003FF7D /* PenNavUI.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; path = PenNavUI.xcframework; sourceTree = ""; };
769C9BF82E6F106D009F68A9 /* RunnerDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerDebug.entitlements; sourceTree = ""; };
76AA18AC2F3B2A4D00DC8DFC /* ring_30Sec.caf */ = {isa = PBXFileReference; lastKnownFileType = file; path = ring_30Sec.caf; sourceTree = ""; };
- 76AA18AD2F3B2A4D00DC8DFC /* ring_30Sec.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = ring_30Sec.mp3; sourceTree = ""; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
8E12CEEB8E334EE22D5259D7 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
@@ -99,10 +97,10 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 765A5A8C2F35CD8B0003FF7D /* Penguin.xcframework in Frameworks */,
- 765A5A902F35CD8B0003FF7D /* PenNavUI.xcframework in Frameworks */,
- 765A5A8E2F35CD8B0003FF7D /* PenguinINRenderer.xcframework in Frameworks */,
+ 68D444212F3BBBDA00995552 /* Penguin.xcframework in Frameworks */,
DE1EF78253E64BE86845D2CC /* Pods_Runner.framework in Frameworks */,
+ 68D4441F2F3BBBDA00995552 /* PenguinINRenderer.xcframework in Frameworks */,
+ 68D4441D2F3BBBD900995552 /* PenNavUI.xcframework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -140,9 +138,9 @@
766D8CB22EC60BE600D05E07 /* Frameworks */ = {
isa = PBXGroup;
children = (
- 765A5A802F35CD730003FF7D /* Penguin.xcframework */,
- 765A5A812F35CD730003FF7D /* PenguinINRenderer.xcframework */,
- 765A5A822F35CD730003FF7D /* PenNavUI.xcframework */,
+ 68D4441C2F3BBBD900995552 /* Penguin.xcframework */,
+ 68D4441B2F3BBBD900995552 /* PenguinINRenderer.xcframework */,
+ 68D4441A2F3BBBD900995552 /* PenNavUI.xcframework */,
D562310E31D1DDEFA02A6C12 /* Pods_Runner.framework */,
);
name = Frameworks;
@@ -194,7 +192,6 @@
isa = PBXGroup;
children = (
76AA18AC2F3B2A4D00DC8DFC /* ring_30Sec.caf */,
- 76AA18AD2F3B2A4D00DC8DFC /* ring_30Sec.mp3 */,
61243B412EC5FA3700D46FA0 /* Helper */,
61243B472EC5FA3700D46FA0 /* Penguin */,
769C9BF82E6F106D009F68A9 /* RunnerDebug.entitlements */,
@@ -307,7 +304,6 @@
buildActionMask = 2147483647;
files = (
76AA18AE2F3B2A4D00DC8DFC /* ring_30Sec.caf in Resources */,
- 76AA18AF2F3B2A4D00DC8DFC /* ring_30Sec.mp3 in Resources */,
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
478CFA942E638C8E0064F3D7 /* GoogleService-Info.plist in Resources */,
diff --git a/lib/core/app_assets.dart b/lib/core/app_assets.dart
index 942eb46b..efe62775 100644
--- a/lib/core/app_assets.dart
+++ b/lib/core/app_assets.dart
@@ -331,6 +331,7 @@ class AppAssets {
static const String doctorResponseIcon = '$svgBasePath/doctor_response_icon.svg';
static const String changeLanguageHomePageIcon = '$svgBasePath/change_language_home_page.svg';
static const String aiOverView = '$svgBasePath/ai_overview.svg';
+ static const String darkModeIcon = '$svgBasePath/dark_mode_icon.svg';
// PNGS //
static const String hmgLogo = '$pngBasePath/hmg_logo.png';
diff --git a/lib/core/dependencies.dart b/lib/core/dependencies.dart
index e7ac0515..1b3bca61 100644
--- a/lib/core/dependencies.dart
+++ b/lib/core/dependencies.dart
@@ -224,7 +224,7 @@ class AppDependencies {
authenticationRepo: getIt(), cacheService: getIt(), navigationService: getIt(), dialogService: getIt(), appState: getIt(), errorHandlerService: getIt(), localAuthService: getIt()),
);
- getIt.registerLazySingleton(() => ProfileSettingsViewModel());
+ getIt.registerLazySingleton(() => ProfileSettingsViewModel(cacheService: getIt()));
getIt.registerLazySingleton(() => DateRangeSelectorRangeViewModel());
diff --git a/lib/core/utils/loading_utils.dart b/lib/core/utils/loading_utils.dart
index bd24d30c..1a58a852 100644
--- a/lib/core/utils/loading_utils.dart
+++ b/lib/core/utils/loading_utils.dart
@@ -25,7 +25,7 @@ class LoadingUtils {
showDialog(
barrierDismissible: barrierDismissible,
context: context,
- barrierColor: AppColors.blackColor.withOpacity(0.5),
+ barrierColor: AppColors.textColor.withOpacity(0.5),
useRootNavigator: false,
useSafeArea: false,
builder: (BuildContext context) {
diff --git a/lib/core/utils/utils.dart b/lib/core/utils/utils.dart
index 8b5b2849..fa76e46e 100644
--- a/lib/core/utils/utils.dart
+++ b/lib/core/utils/utils.dart
@@ -91,7 +91,7 @@ class Utils {
toastLength: longDuration ? Toast.LENGTH_LONG : Toast.LENGTH_SHORT,
gravity: ToastGravity.BOTTOM,
timeInSecForIosWeb: 1,
- backgroundColor: AppColors.blackColor,
+ backgroundColor: AppColors.textColor,
textColor: AppColors.whiteColor,
fontSize: 16.0);
}
@@ -268,7 +268,7 @@ class Utils {
_isLoadingVisible = true;
showDialog(
context: navigationService.navigatorKey.currentContext!,
- barrierColor: AppColors.blackColor,
+ barrierColor: AppColors.textColor,
builder: (BuildContext context) => LoadingDialog(),
)
.then((value) {
@@ -369,7 +369,7 @@ class Utils {
Lottie.asset(AppAnimations.loadingAnimation,
repeat: true, reverse: false, frameRate: FrameRate(60), width: 80.h, height: 80.h, fit: BoxFit.fill),
SizedBox(height: 8.h),
- (loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.blackColor, isCenter: true),
+ (loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.textColor, isCenter: true),
SizedBox(height: 8.h),
],
).center;
@@ -382,7 +382,7 @@ class Utils {
children: [
Lottie.asset(AppAnimations.checkmark, repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill),
SizedBox(height: 8.h),
- (loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.blackColor),
+ (loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.textColor),
SizedBox(height: 8.h),
],
).center;
@@ -396,7 +396,7 @@ class Utils {
Lottie.asset(AppAnimations.errorAnimation,
repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill),
SizedBox(height: 8.h),
- (loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.blackColor),
+ (loadingText ?? LocaleKeys.loadingText.tr()).toText16(color: AppColors.textColor),
SizedBox(height: 8.h),
],
).center;
@@ -418,7 +418,7 @@ class Utils {
Lottie.asset(AppAnimations.warningAnimation,
repeat: false, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill),
SizedBox(height: 8.h),
- (loadingText ?? LocaleKeys.loadingText.tr()).toText15(color: AppColors.blackColor, letterSpacing: 0),
+ (loadingText ?? LocaleKeys.loadingText.tr()).toText15(color: AppColors.textColor, letterSpacing: 0),
SizedBox(height: 16.h),
bodyWidget ?? SizedBox.shrink(),
SizedBox(height: 16.h),
@@ -802,7 +802,7 @@ class Utils {
double? letterSpacing,
FontWeight? fontWeight,
Color iconColor = AppColors.textColor,
- Color textColor = AppColors.blackColor,
+ Color textColor = AppColors.textColor,
bool isSaudiCurrency = true,
bool isExpanded = true,
}) {
diff --git a/lib/extensions/string_extensions.dart b/lib/extensions/string_extensions.dart
index 792bff50..46fe995e 100644
--- a/lib/extensions/string_extensions.dart
+++ b/lib/extensions/string_extensions.dart
@@ -5,9 +5,20 @@ import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/enums.dart';
import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
+import 'package:hmg_patient_app_new/services/navigation_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:intl/intl.dart';
+/// Global context from the navigator key — available after first route is built.
+/// Used by toText* extensions to resolve theme-aware colors.
+BuildContext? get _globalContext => getIt.get().context;
+
+Color get _defaultTextColor {
+ final ctx = _globalContext;
+ if (ctx == null) return AppColors.textColor;
+ return ctx.textColor;
+}
+
extension CapExtension on String {
String get toCamelCase => "${this[0].toUpperCase()}${substring(1)}";
@@ -31,61 +42,40 @@ extension EmailValidator on String {
fontSize: 8.f,
fontStyle: fontStyle ?? FontStyle.normal,
fontWeight: fontWeight ?? (isBold ? FontWeight.bold : FontWeight.normal),
- color: color ?? AppColors.blackColor,
+ color: color ?? _defaultTextColor,
letterSpacing: 0,
),
);
- Widget toText10(
- {bool isEnglishOnly = false,
- Color? color,
- FontWeight? weight,
- bool isBold = false,
- bool isUnderLine = false,
- bool isCenter = false,
- int? maxlines,
- FontStyle? fontStyle,
- TextOverflow? textOverflow,
- double letterSpacing = 0}) =>
- Text(
+ Widget toText9({Color? color, FontWeight? weight, bool isBold = false, bool isUnderLine = false, bool isCenter = false, int? maxlines, FontStyle? fontStyle, TextOverflow? textOverflow, double letterSpacing = 0}) => Text(
this,
textAlign: isCenter ? TextAlign.center : null,
maxLines: maxlines,
overflow: textOverflow,
style: TextStyle(
- fontSize: 10.f,
+ fontSize: 9.f,
fontStyle: fontStyle ?? FontStyle.normal,
fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal),
- color: color ?? AppColors.blackColor,
+ color: color ?? _defaultTextColor,
letterSpacing: letterSpacing,
decoration: isUnderLine ? TextDecoration.underline : null,
- fontFamily: isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins',
- decorationColor: color ?? AppColors.blackColor),
+ decorationColor: color ?? _defaultTextColor),
);
- Widget toText9(
- {Color? color,
- FontWeight? weight,
- bool isBold = false,
- bool isUnderLine = false,
- bool isCenter = false,
- int? maxlines,
- FontStyle? fontStyle,
- TextOverflow? textOverflow,
- double letterSpacing = 0}) =>
- Text(
+ Widget toText10({bool isEnglishOnly = false, Color? color, FontWeight? weight, bool isBold = false, bool isUnderLine = false, bool isCenter = false, int? maxlines, FontStyle? fontStyle, TextOverflow? textOverflow, double letterSpacing = 0}) => Text(
this,
textAlign: isCenter ? TextAlign.center : null,
maxLines: maxlines,
overflow: textOverflow,
style: TextStyle(
- fontSize: 9.f,
+ fontSize: 10.f,
fontStyle: fontStyle ?? FontStyle.normal,
fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal),
- color: color ?? AppColors.blackColor,
+ color: color ?? _defaultTextColor,
letterSpacing: letterSpacing,
decoration: isUnderLine ? TextDecoration.underline : null,
- decorationColor: color ?? AppColors.blackColor),
+ fontFamily: isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins',
+ decorationColor: color ?? _defaultTextColor),
);
Widget toText11({Color? color, FontWeight? weight, bool isUnderLine = false, bool isCenter = false, bool isBold = false, int maxLine = 0, double letterSpacing = 0}) => Text(
@@ -96,33 +86,23 @@ extension EmailValidator on String {
style: TextStyle(
fontSize: 11.f,
fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal),
- color: color ?? AppColors.blackColor,
+ color: color ?? _defaultTextColor,
letterSpacing: letterSpacing,
decoration: isUnderLine ? TextDecoration.underline : null,
),
);
- Widget toText12(
- {bool isEnglishOnly = false, Color? color,
- bool isUnderLine = false,
- TextAlign textAlignment = TextAlign.start,
- bool isBold = false,
- FontWeight? fontWeight,
- bool isCenter = false,
- double? height,
- double? letterSpacing,
- int maxLine = 0}) =>
- Text(
+ Widget toText12({bool isEnglishOnly = false, Color? color, bool isUnderLine = false, TextAlign textAlignment = TextAlign.start, bool isBold = false, FontWeight? fontWeight, bool isCenter = false, double? height, double? letterSpacing, int maxLine = 0}) => Text(
this,
textAlign: isCenter ? TextAlign.center : textAlignment,
maxLines: (maxLine > 0) ? maxLine : null,
style: TextStyle(
fontSize: 12.f,
fontWeight: fontWeight ?? (isBold ? FontWeight.bold : FontWeight.normal),
- color: color ?? AppColors.blackColor,
+ color: color ?? _defaultTextColor,
letterSpacing: letterSpacing ?? 0,
height: height,
- decorationColor: isUnderLine ? AppColors.blackColor : null,
+ decorationColor: isUnderLine ? color ?? _defaultTextColor : null,
decoration: isUnderLine ? TextDecoration.underline : null,
fontFamily: isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins',
),
@@ -136,25 +116,13 @@ extension EmailValidator on String {
style: TextStyle(
fontSize: 12.f,
fontWeight: isBold ? FontWeight.bold : FontWeight.normal,
- color: color ?? AppColors.blackColor,
+ color: color ?? _defaultTextColor,
letterSpacing: 0,
decoration: isUnderLine ? TextDecoration.underline : null,
),
);
- Widget toTextAuto({
- Color? color,
- bool isUnderLine = false,
- bool isBold = false,
- bool isCenter = false,
- int maxLine = 0,
- double fontSize = 12,
- double letterSpacing = 0.64,
- double height = 1,
- TextOverflow? textOverflow,
- FontWeight? fontWeight,
- }) =>
- AutoSizeText(
+ Widget toTextAuto({Color? color, bool isUnderLine = false, bool isBold = false, bool isCenter = false, int maxLine = 0, double fontSize = 12, double letterSpacing = 0.64, double height = 1, TextOverflow? textOverflow, FontWeight? fontWeight}) => AutoSizeText(
this,
textAlign: isCenter ? TextAlign.center : null,
maxLines: (maxLine > 0) ? maxLine : null,
@@ -164,7 +132,7 @@ extension EmailValidator on String {
style: TextStyle(
fontSize: fontSize,
fontWeight: fontWeight ?? (isBold ? FontWeight.bold : FontWeight.normal),
- color: color ?? AppColors.blackColor,
+ color: color ?? _defaultTextColor,
letterSpacing: letterSpacing,
decoration: isUnderLine ? TextDecoration.underline : null,
),
@@ -177,38 +145,25 @@ extension EmailValidator on String {
style: TextStyle(
fontSize: 13.f,
fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal),
- color: color ?? AppColors.blackColor,
+ color: color ?? _defaultTextColor,
letterSpacing: letterSpacing,
decoration: isUnderLine ? TextDecoration.underline : null),
);
- Widget toText14({
- bool isEnglishOnly = false,
- Color? color,
- bool isUnderLine = false,
- bool isBold = false,
- bool isCenter = false,
- FontWeight? weight,
- int? maxlines,
- double? letterSpacing = 0,
- double? height,
- String? fontFamily,
- TextOverflow? textOverflow,
- }) =>
- Text(
+ Widget toText14({bool isEnglishOnly = false, Color? color, bool isUnderLine = false, bool isBold = false, bool isCenter = false, FontWeight? weight, int? maxlines, double? letterSpacing = 0, double? height, String? fontFamily, TextOverflow? textOverflow}) => Text(
this,
textAlign: isCenter ? TextAlign.center : null,
maxLines: maxlines,
overflow: textOverflow,
style: TextStyle(
- color: color ?? AppColors.blackColor,
+ color: color ?? _defaultTextColor,
fontSize: 14.f,
letterSpacing: letterSpacing,
height: height,
fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal),
decoration: isUnderLine ? TextDecoration.underline : null,
fontFamily: fontFamily ?? (isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'),
- decorationColor: color ?? AppColors.blackColor),
+ decorationColor: color ?? _defaultTextColor),
);
Widget toText15({Color? color, bool isUnderLine = false, bool isBold = false, bool isCenter = false, FontWeight? weight, int? maxlines, double? letterSpacing = -1}) => Text(
@@ -216,32 +171,19 @@ extension EmailValidator on String {
textAlign: isCenter ? TextAlign.center : null,
maxLines: maxlines,
style: TextStyle(
- color: color ?? AppColors.blackColor,
+ color: color ?? _defaultTextColor,
fontSize: 15.f,
letterSpacing: letterSpacing,
fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal),
decoration: isUnderLine ? TextDecoration.underline : null),
);
- Widget toText16({bool isEnglishOnly = false, Color? color,
- bool isUnderLine = false,
- bool isBold = false,
- bool isCenter = false,
- int? maxlines,
- double? height,
- TextAlign? textAlign,
- FontWeight? weight,
- TextOverflow? textOverflow,
- String? fontFamily,
- double? letterSpacing = -0.4,
- Color decorationColor = AppColors.errorColor}) =>
- Text(
+ Widget toText16({bool isEnglishOnly = false, Color? color, bool isUnderLine = false, bool isBold = false, bool isCenter = false, int? maxlines, double? height, TextAlign? textAlign, FontWeight? weight, TextOverflow? textOverflow, String? fontFamily, double? letterSpacing = -0.4, Color? decorationColor}) => Text(
this,
maxLines: maxlines,
textAlign: isCenter ? textAlign ?? TextAlign.center : null,
- // locale: Locale('en', 'US'),
style: TextStyle(
- color: color ?? AppColors.blackColor,
+ color: color ?? _defaultTextColor,
fontSize: 16.f,
letterSpacing: letterSpacing,
height: height,
@@ -255,74 +197,93 @@ extension EmailValidator on String {
Widget toText17({bool isEnglishOnly = false, Color? color, bool isBold = false, bool isCenter = false}) => Text(
this,
textAlign: isCenter ? TextAlign.center : null,
- style: TextStyle(color: color ?? AppColors.blackColor, fontSize: 17.f, letterSpacing: -1, fontWeight: isBold ? FontWeight.bold : FontWeight.normal, fontFamily: isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'),
+ style: TextStyle(
+ color: color ?? _defaultTextColor,
+ fontSize: 17.f,
+ letterSpacing: -1,
+ fontWeight: isBold ? FontWeight.bold : FontWeight.normal,
+ fontFamily: isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'),
);
Widget toText18({Color? color, FontWeight? weight, bool isBold = false, bool isCenter = false, int? maxlines, TextOverflow? textOverflow}) => Text(
+ this,
maxLines: maxlines,
textAlign: isCenter ? TextAlign.center : null,
- this,
overflow: textOverflow,
- style: TextStyle(fontSize: 18.f, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal), color: color ?? AppColors.blackColor, letterSpacing: -0.4),
+ style: TextStyle(fontSize: 18.f, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal), color: color ?? _defaultTextColor, letterSpacing: -0.4),
);
Widget toText19({Color? color, bool isBold = false}) => Text(
this,
- style: TextStyle(fontSize: 19.f, fontWeight: isBold ? FontWeight.bold : FontWeight.normal, color: color ?? AppColors.blackColor, letterSpacing: -0.4),
+ style: TextStyle(fontSize: 19.f, fontWeight: isBold ? FontWeight.bold : FontWeight.normal, color: color ?? _defaultTextColor, letterSpacing: -0.4),
);
- Widget toText20({
- Color? color,
- FontWeight? weight,
- bool isBold = false,
- }) =>
- Text(
+ Widget toText20({Color? color, FontWeight? weight, bool isBold = false}) => Text(
this,
- style: TextStyle(fontSize: 20.f, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal), color: color ?? AppColors.blackColor, letterSpacing: -0.4),
+ style: TextStyle(fontSize: 20.f, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal), color: color ?? _defaultTextColor, letterSpacing: -0.4),
);
Widget toText21({Color? color, bool isBold = false, FontWeight? weight, int? maxlines}) => Text(
this,
maxLines: maxlines,
- style: TextStyle(color: color ?? AppColors.blackColor, fontSize: 21.f, letterSpacing: -1, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal)),
+ style: TextStyle(color: color ?? _defaultTextColor, fontSize: 21.f, letterSpacing: -1, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal)),
);
Widget toText22({Color? color, bool isBold = false, bool isCenter = false}) => Text(
this,
textAlign: isCenter ? TextAlign.center : null,
- style: TextStyle(height: 1, color: color ?? AppColors.blackColor, fontSize: 22.f, letterSpacing: -1, fontWeight: isBold ? FontWeight.bold : FontWeight.normal),
+ style: TextStyle(height: 1, color: color ?? _defaultTextColor, fontSize: 22.f, letterSpacing: -1, fontWeight: isBold ? FontWeight.bold : FontWeight.normal),
);
Widget toText24({Color? color, bool isBold = false, bool isCenter = false, FontWeight? fontWeight, double? letterSpacing}) => Text(
this,
textAlign: isCenter ? TextAlign.center : null,
style: TextStyle(
- height: 23 / 24, color: color ?? AppColors.blackColor, fontSize: 24.f, letterSpacing: letterSpacing ?? -1, fontWeight: isBold ? FontWeight.bold : fontWeight ?? FontWeight.normal),
+ height: 23 / 24,
+ color: color ?? _defaultTextColor,
+ fontSize: 24.f,
+ letterSpacing: letterSpacing ?? -1,
+ fontWeight: isBold ? FontWeight.bold : fontWeight ?? FontWeight.normal),
);
Widget toText26({Color? color, bool isBold = false, double? height, bool isCenter = false, FontWeight? weight, double? letterSpacing}) => Text(
this,
textAlign: isCenter ? TextAlign.center : null,
style: TextStyle(
- height: height ?? 23 / 26, color: color ?? AppColors.blackColor, fontSize: 26.f, letterSpacing: letterSpacing ?? -1, fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal)),
+ height: height ?? 23 / 26,
+ color: color ?? _defaultTextColor,
+ fontSize: 26.f,
+ letterSpacing: letterSpacing ?? -1,
+ fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal)),
);
Widget toText28({bool isEnglishOnly = false, Color? color, bool isBold = false, double? height, bool isCenter = false, double? letterSpacing}) => Text(
this,
textAlign: isCenter ? TextAlign.center : null,
- style: TextStyle(height: height ?? 23 / 28, color: color ?? AppColors.blackColor, fontSize: 28.f, letterSpacing: letterSpacing ?? -1, fontWeight: isBold ? FontWeight.bold : FontWeight.normal, fontFamily: isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'),
+ style: TextStyle(
+ height: height ?? 23 / 28,
+ color: color ?? _defaultTextColor,
+ fontSize: 28.f,
+ letterSpacing: letterSpacing ?? -1,
+ fontWeight: isBold ? FontWeight.bold : FontWeight.normal,
+ fontFamily: isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'),
);
Widget toText32({bool isEnglishOnly = false, FontWeight? weight, Color? color, bool isBold = false, bool isCenter = false}) => Text(
this,
textAlign: isCenter ? TextAlign.center : null,
style: TextStyle(
- height: 32 / 32, color: color ?? AppColors.blackColor, fontSize: 32.f, letterSpacing: -1, fontFamily: isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins', fontWeight: isBold ? FontWeight.bold : weight ?? FontWeight.normal),
+ height: 32 / 32,
+ color: color ?? _defaultTextColor,
+ fontSize: 32.f,
+ letterSpacing: -1,
+ fontFamily: isEnglishOnly ? "Poppins" : getIt.get().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins',
+ fontWeight: isBold ? FontWeight.bold : weight ?? FontWeight.normal),
);
Widget toText44({Color? color, bool isBold = false}) => Text(
this,
- style: TextStyle(height: 32 / 32, color: color ?? AppColors.blackColor, fontSize: 44.f, letterSpacing: -1, fontWeight: isBold ? FontWeight.bold : FontWeight.normal),
+ style: TextStyle(height: 32 / 32, color: color ?? _defaultTextColor, fontSize: 44.f, letterSpacing: -1, fontWeight: isBold ? FontWeight.bold : FontWeight.normal),
);
Widget toSectionHeading({String upperHeading = "", String lowerHeading = ""}) {
@@ -331,7 +292,6 @@ extension EmailValidator on String {
String heading = this;
if (heading.isNotEmpty) {
List data = heading.split(" ");
-
if (data.length > 1) {
upper = data[0];
data.removeAt(0);
@@ -340,13 +300,8 @@ extension EmailValidator on String {
lower = data[0];
}
}
- if (upperHeading.isNotEmpty) {
- upper = upperHeading;
- }
- if (lowerHeading.isNotEmpty) {
- lower = lowerHeading;
- }
-
+ if (upperHeading.isNotEmpty) upper = upperHeading;
+ if (lowerHeading.isNotEmpty) lower = lowerHeading;
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
@@ -370,32 +325,19 @@ extension EmailValidator on String {
String getMonth(int month) {
switch (month) {
- case 1:
- return "January";
- case 2:
- return "February";
- case 3:
- return "March";
- case 4:
- return "April";
- case 5:
- return "May";
- case 6:
- return "June";
- case 7:
- return "July";
- case 8:
- return "August";
- case 9:
- return "September";
- case 10:
- return "October";
- case 11:
- return "November";
- case 12:
- return "December";
- default:
- return "";
+ case 1: return "January";
+ case 2: return "February";
+ case 3: return "March";
+ case 4: return "April";
+ case 5: return "May";
+ case 6: return "June";
+ case 7: return "July";
+ case 8: return "August";
+ case 9: return "September";
+ case 10: return "October";
+ case 11: return "November";
+ case 12: return "December";
+ default: return "";
}
}
@@ -409,24 +351,24 @@ extension EmailValidator on String {
}
extension DynamicTextStyleExtension on BuildContext {
- TextStyle dynamicTextStyle(
- {double? fontSize,
- FontWeight? fontWeight,
- Color? color,
- double? letterSpacing,
- double? wordSpacing,
- double? height,
- List? shadows,
- Color? backgroundColor,
- TextDecoration? decoration,
- Color? decorationColor,
- TextDecorationStyle? decorationStyle,
- double? decorationThickness,
- Locale? locale,
- TextBaseline? textBaseline,
- FontStyle? fontStyle,
- String? fontFamily,
- bool isLanguageSwitcher = false}) {
+ TextStyle dynamicTextStyle({
+ double? fontSize,
+ FontWeight? fontWeight,
+ Color? color,
+ double? letterSpacing,
+ double? wordSpacing,
+ double? height,
+ List? shadows,
+ Color? backgroundColor,
+ TextDecoration? decoration,
+ Color? decorationColor,
+ TextDecorationStyle? decorationStyle,
+ double? decorationThickness,
+ Locale? locale,
+ TextBaseline? textBaseline,
+ FontStyle? fontStyle,
+ String? fontFamily,
+ }) {
AppState appState = getIt.get();
final family = appState.getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins';
return TextStyle(
@@ -450,53 +392,32 @@ extension DynamicTextStyleExtension on BuildContext {
}
}
-class FontUtils {
- /// Get the appropriate font family based on the current language
- static bool getFontFamily(BuildContext context) {
- // final projectViewModel = Provider.of(context, listen: false);
- return true;
- }
-
- /// Get the appropriate font family for a specific language
- static String getFontFamilyForLanguage(bool isArabic) {
- return isArabic ? 'GESSTwo' : 'Poppins';
- }
-}
-
extension CountryExtension on CountryEnum {
String get displayName {
switch (this) {
- case CountryEnum.saudiArabia:
- return "Kingdom Of Saudi Arabia";
- case CountryEnum.unitedArabEmirates:
- return "United Arab Emirates";
+ case CountryEnum.saudiArabia: return "Kingdom Of Saudi Arabia";
+ case CountryEnum.unitedArabEmirates: return "United Arab Emirates";
}
}
String get nameArabic {
switch (this) {
- case CountryEnum.saudiArabia:
- return "المملكة العربية السعودية";
- case CountryEnum.unitedArabEmirates:
- return "الإمارات العربية المتحدة";
+ case CountryEnum.saudiArabia: return "المملكة العربية السعودية";
+ case CountryEnum.unitedArabEmirates: return "الإمارات العربية المتحدة";
}
}
String get iconPath {
switch (this) {
- case CountryEnum.saudiArabia:
- return AppAssets.ksa;
- case CountryEnum.unitedArabEmirates:
- return AppAssets.uae;
+ case CountryEnum.saudiArabia: return AppAssets.ksa;
+ case CountryEnum.unitedArabEmirates: return AppAssets.uae;
}
}
String get countryCode {
switch (this) {
- case CountryEnum.saudiArabia:
- return "966";
- case CountryEnum.unitedArabEmirates:
- return "971";
+ case CountryEnum.saudiArabia: return "966";
+ case CountryEnum.unitedArabEmirates: return "971";
}
}
@@ -516,30 +437,22 @@ extension CountryExtension on CountryEnum {
extension GenderTypeExtension on GenderTypeEnum {
String get value => this == GenderTypeEnum.male ? "M" : "F";
-
String get type => this == GenderTypeEnum.male ? "Male" : "Female";
-
String get typeAr => this == GenderTypeEnum.male ? "ذكر" : "أنثى";
static GenderTypeEnum? fromValue(String? value) {
switch (value) {
- case "M":
- return GenderTypeEnum.male;
- case "F":
- return GenderTypeEnum.female;
- default:
- return null;
+ case "M": return GenderTypeEnum.male;
+ case "F": return GenderTypeEnum.female;
+ default: return null;
}
}
static GenderTypeEnum? fromType(String? type) {
switch (type) {
- case "Male":
- return GenderTypeEnum.male;
- case "Female":
- return GenderTypeEnum.female;
- default:
- return null;
+ case "Male": return GenderTypeEnum.male;
+ case "Female": return GenderTypeEnum.female;
+ default: return null;
}
}
}
@@ -547,70 +460,48 @@ extension GenderTypeExtension on GenderTypeEnum {
extension MaritalStatusTypeExtension on MaritalStatusTypeEnum {
String get value {
switch (this) {
- case MaritalStatusTypeEnum.single:
- return "U";
- case MaritalStatusTypeEnum.married:
- return "M";
- case MaritalStatusTypeEnum.divorced:
- return "D";
- case MaritalStatusTypeEnum.widowed:
- return "W";
+ case MaritalStatusTypeEnum.single: return "U";
+ case MaritalStatusTypeEnum.married: return "M";
+ case MaritalStatusTypeEnum.divorced: return "D";
+ case MaritalStatusTypeEnum.widowed: return "W";
}
}
String get type {
switch (this) {
- case MaritalStatusTypeEnum.single:
- return "Single";
- case MaritalStatusTypeEnum.married:
- return "Married";
- case MaritalStatusTypeEnum.divorced:
- return "Divorced";
- case MaritalStatusTypeEnum.widowed:
- return "Widowed";
+ case MaritalStatusTypeEnum.single: return "Single";
+ case MaritalStatusTypeEnum.married: return "Married";
+ case MaritalStatusTypeEnum.divorced: return "Divorced";
+ case MaritalStatusTypeEnum.widowed: return "Widowed";
}
}
String get typeAr {
switch (this) {
- case MaritalStatusTypeEnum.single:
- return "أعزب";
- case MaritalStatusTypeEnum.married:
- return "متزوج";
- case MaritalStatusTypeEnum.divorced:
- return "مطلق";
- case MaritalStatusTypeEnum.widowed:
- return "أرمل";
+ case MaritalStatusTypeEnum.single: return "أعزب";
+ case MaritalStatusTypeEnum.married: return "متزوج";
+ case MaritalStatusTypeEnum.divorced: return "مطلق";
+ case MaritalStatusTypeEnum.widowed: return "أرمل";
}
}
static MaritalStatusTypeEnum? fromValue(String? value) {
switch (value) {
- case "U":
- return MaritalStatusTypeEnum.single;
- case "M":
- return MaritalStatusTypeEnum.married;
- case "D":
- return MaritalStatusTypeEnum.divorced;
- case "W":
- return MaritalStatusTypeEnum.widowed;
- default:
- return null;
+ case "U": return MaritalStatusTypeEnum.single;
+ case "M": return MaritalStatusTypeEnum.married;
+ case "D": return MaritalStatusTypeEnum.divorced;
+ case "W": return MaritalStatusTypeEnum.widowed;
+ default: return null;
}
}
static MaritalStatusTypeEnum? fromType(String? type) {
switch (type) {
- case "Single":
- return MaritalStatusTypeEnum.single;
- case "Married":
- return MaritalStatusTypeEnum.married;
- case "Divorced":
- return MaritalStatusTypeEnum.divorced;
- case "Widowed":
- return MaritalStatusTypeEnum.widowed;
- default:
- return null;
+ case "Single": return MaritalStatusTypeEnum.single;
+ case "Married": return MaritalStatusTypeEnum.married;
+ case "Divorced": return MaritalStatusTypeEnum.divorced;
+ case "Widowed": return MaritalStatusTypeEnum.widowed;
+ default: return null;
}
}
}
diff --git a/lib/extensions/widget_extensions.dart b/lib/extensions/widget_extensions.dart
index 58754dc9..e29706e0 100644
--- a/lib/extensions/widget_extensions.dart
+++ b/lib/extensions/widget_extensions.dart
@@ -152,26 +152,18 @@ extension SmoothContainerExtension on ShapeBorder {
BorderSide? side,
BorderRadius? customBorder,
bool hasShadow = false,
+ BuildContext? context,
}) {
final bgColor = backgroundColor ?? color;
+ final resolvedSide = side ?? (BorderSide(color: AppColors.dark.cardDarkBorderColor, width: 1));
return ShapeDecoration(
- color: isDisabled ? bgColor.withOpacity(0.5) : bgColor,
+ color: isDisabled ? bgColor.withValues(alpha: 0.5) : bgColor,
shape: SmoothRectangleBorder(
borderRadius: customBorder ?? BorderRadius.circular(borderRadius ?? 0),
smoothness: 1,
- side: side ?? BorderSide.none,
+ side: resolvedSide,
),
- shadows:
- // hasShadow
- // ? [
- // BoxShadow(
- // color: const Color(0xff000000).withOpacity(.05),
- // blurRadius: 32,
- // offset: const Offset(0, 0),
- // )
- // ]
- // :
- [],
+ shadows: [],
);
}
}
@@ -236,28 +228,28 @@ extension ChipTypeEnumExtension on ChipTypeEnum {
case ChipTypeEnum.warning:
return AppColors.warningColor; // Replace with your actual color
case ChipTypeEnum.lightBg:
- return AppColors.chipPrimaryRedBorderColor; // Replace with your actual color
+ return AppColors.primaryRedColor; // Replace with your actual color
case ChipTypeEnum.primaryRed:
- return AppColors.chipSecondaryLightRedColor; // Replace with your actual color
+ return AppColors.secondaryLightRedColor; // Replace with your actual color
}
}
Color get backgroundColor {
switch (this) {
case ChipTypeEnum.success:
- return AppColors.successLightColor; // Replace with your actual color
+ return AppColors.successColor; // Replace with your actual color
case ChipTypeEnum.error:
- return AppColors.errorLightColor; // Replace with your actual color
+ return AppColors.primaryRedColor; // Replace with your actual color
case ChipTypeEnum.alert:
return AppColors.alertLightColor; // Replace with your actual color
case ChipTypeEnum.info:
- return AppColors.infoLightColor; // Replace with your actual color
+ return AppColors.infoColor; // Replace with your actual color
case ChipTypeEnum.warning:
- return AppColors.warningLightColor; // Replace with your actual color
+ return AppColors.warningColor; // Replace with your actual color
case ChipTypeEnum.lightBg:
- return AppColors.chipSecondaryLightRedColor; // Replace with your actual color
+ return AppColors.secondaryLightRedColor; // Replace with your actual color
case ChipTypeEnum.primaryRed:
- return AppColors.chipPrimaryRedBorderColor;
+ return AppColors.primaryRedColor;
}
}
}
diff --git a/lib/features/authentication/widgets/otp_verification_screen.dart b/lib/features/authentication/widgets/otp_verification_screen.dart
index 7ddccda8..60b12c9b 100644
--- a/lib/features/authentication/widgets/otp_verification_screen.dart
+++ b/lib/features/authentication/widgets/otp_verification_screen.dart
@@ -357,7 +357,7 @@ class OTPWidgetState extends State with SingleTickerProviderStateMixi
} else if (text.length == widget.maxLength) {
pinBoxColor = AppColors.successColor;
} else if (i < text.length) {
- pinBoxColor = AppColors.blackBgColor;
+ pinBoxColor = AppColors.textColor;
} else {
pinBoxColor = widget.pinBoxColor;
}
diff --git a/lib/features/blood_donation/widgets/hospital_selection.dart b/lib/features/blood_donation/widgets/hospital_selection.dart
index 9889410c..ad838e40 100644
--- a/lib/features/blood_donation/widgets/hospital_selection.dart
+++ b/lib/features/blood_donation/widgets/hospital_selection.dart
@@ -55,7 +55,7 @@ class HospitalBottomSheetBodySelection extends StatelessWidget {
),
Transform.flip(
flipX: appState.isArabic(),
- child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.blackColor, width: 40.h, height: 40.h, fit: BoxFit.contain),
+ child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.textColor, width: 40.h, height: 40.h, fit: BoxFit.contain),
),
],
).paddingSymmetrical(16.h, 16.h),
@@ -75,7 +75,7 @@ class HospitalBottomSheetBodySelection extends StatelessWidget {
children: [
Utils.buildSvgWithAssets(icon: AppAssets.hmg).paddingOnly(right: 10),
Expanded(
- child: Text(hospital.projectName ?? "", style: TextStyle(fontWeight: FontWeight.w600, fontSize: 16, color: AppColors.blackColor)),
+ child: Text(hospital.projectName ?? "", style: TextStyle(fontWeight: FontWeight.w600, fontSize: 16, color: AppColors.textColor)),
)
],
);
diff --git a/lib/features/hmg_services/models/ui_models/vital_sign_ui_model.dart b/lib/features/hmg_services/models/ui_models/vital_sign_ui_model.dart
index 45b0ab65..baa4dc83 100644
--- a/lib/features/hmg_services/models/ui_models/vital_sign_ui_model.dart
+++ b/lib/features/hmg_services/models/ui_models/vital_sign_ui_model.dart
@@ -41,9 +41,9 @@ class VitalSignUiModel {
if (s.contains('high')) {
return const VitalSignUiModel(
- iconBg: AppColors.chipSecondaryLightRedColor,
+ iconBg: AppColors.secondaryLightRedColor,
iconFg: AppColors.primaryRedColor,
- chipBg: AppColors.chipSecondaryLightRedColor,
+ chipBg: AppColors.secondaryLightRedColor,
chipFg: AppColors.primaryRedColor,
);
}
diff --git a/lib/features/lab/lab_view_model.dart b/lib/features/lab/lab_view_model.dart
index cd062b9e..885c6ad8 100644
--- a/lib/features/lab/lab_view_model.dart
+++ b/lib/features/lab/lab_view_model.dart
@@ -675,9 +675,9 @@ class LabViewModel extends ChangeNotifier {
Color getColor(String flag) {
switch (flag) {
case 'LCL':
- return AppColors.criticalLowAndHigh;
+ return AppColors.primaryRedColor;
case 'CL':
- return AppColors.criticalLowAndHigh;
+ return AppColors.primaryRedColor;
case 'L':
return AppColors.highAndLow;
case 'N':
@@ -685,9 +685,9 @@ class LabViewModel extends ChangeNotifier {
case 'H':
return AppColors.highAndLow;
case 'CH':
- return AppColors.criticalLowAndHigh;
+ return AppColors.primaryRedColor;
case 'HCH':
- return AppColors.criticalLowAndHigh;
+ return AppColors.primaryRedColor;
default:
return Colors.grey;
}
diff --git a/lib/features/profile_settings/profile_settings_view_model.dart b/lib/features/profile_settings/profile_settings_view_model.dart
index 61acb260..7fe44978 100644
--- a/lib/features/profile_settings/profile_settings_view_model.dart
+++ b/lib/features/profile_settings/profile_settings_view_model.dart
@@ -1,8 +1,27 @@
import 'package:flutter/foundation.dart';
+import 'package:hmg_patient_app_new/services/cache_service.dart';
+
+const _kDarkModeKey = 'is_dark_mode_enabled';
class ProfileSettingsViewModel extends ChangeNotifier {
+ final CacheService _cacheService;
+
+ ProfileSettingsViewModel({required CacheService cacheService})
+ : _cacheService = cacheService {
+ _isDarkMode = _cacheService.getBool(key: _kDarkModeKey) ?? false;
+ }
+
+ bool _isDarkMode = false;
+
+ bool get isDarkMode => _isDarkMode;
+
+ Future toggleDarkMode() async {
+ _isDarkMode = !_isDarkMode;
+ await _cacheService.saveBool(key: _kDarkModeKey, value: _isDarkMode);
+ notifyListeners();
+ }
- void notify(){
+ void notify() {
notifyListeners();
}
}
diff --git a/lib/generated/locale_keys.g.dart b/lib/generated/locale_keys.g.dart
index 78d7f8a3..7974eaf5 100644
--- a/lib/generated/locale_keys.g.dart
+++ b/lib/generated/locale_keys.g.dart
@@ -1574,6 +1574,7 @@ abstract class LocaleKeys {
static const invalidInsurance = 'invalidInsurance';
static const continueCash = 'continueCash';
static const hmgPolicies = 'hmgPolicies';
+ static const darkMode = 'darkMode';
static const timeFor = 'Time for';
}
diff --git a/lib/main.dart b/lib/main.dart
index cff0d043..b9ae6981 100644
--- a/lib/main.dart
+++ b/lib/main.dart
@@ -10,15 +10,16 @@ import 'package:flutter/services.dart';
import 'package:hmg_patient_app_new/core/app_state.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart';
+import 'package:hmg_patient_app_new/features/active_prescriptions/active_prescriptions_view_model.dart';
import 'package:hmg_patient_app_new/features/ask_doctor/ask_doctor_view_model.dart';
import 'package:hmg_patient_app_new/features/authentication/authentication_view_model.dart';
import 'package:hmg_patient_app_new/features/blood_donation/blood_donation_view_model.dart';
-import 'package:hmg_patient_app_new/features/active_prescriptions/active_prescriptions_view_model.dart';
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/contact_us/contact_us_view_model.dart';
import 'package:hmg_patient_app_new/features/doctor_filter/doctor_filter_view_model.dart';
import 'package:hmg_patient_app_new/features/emergency_services/emergency_services_view_model.dart';
import 'package:hmg_patient_app_new/features/habib_wallet/habib_wallet_view_model.dart';
+import 'package:hmg_patient_app_new/features/health_trackers/health_trackers_view_model.dart';
import 'package:hmg_patient_app_new/features/hmg_services/hmg_services_view_model.dart';
import 'package:hmg_patient_app_new/features/immediate_livecare/immediate_livecare_view_model.dart';
import 'package:hmg_patient_app_new/features/insurance/insurance_view_model.dart';
@@ -43,7 +44,6 @@ import 'package:hmg_patient_app_new/features/symptoms_checker/symptoms_checker_v
import 'package:hmg_patient_app_new/features/todo_section/todo_section_view_model.dart';
import 'package:hmg_patient_app_new/features/water_monitor/water_monitor_view_model.dart';
import 'package:hmg_patient_app_new/presentation/health_calculators_and_converts/health_calculator_view_model.dart';
-import 'package:hmg_patient_app_new/features/health_trackers/health_trackers_view_model.dart';
import 'package:hmg_patient_app_new/routes/app_routes.dart';
import 'package:hmg_patient_app_new/services/logger_service.dart';
import 'package:hmg_patient_app_new/services/navigation_service.dart';
@@ -228,7 +228,10 @@ void main() async {
),
ChangeNotifierProvider(
create: (_) => getIt.get(),
- )
+ ),
+ ChangeNotifierProvider(
+ create: (_) => getIt.get(),
+ ),
], child: MyApp()),
), // Wrap your app
);
@@ -240,34 +243,39 @@ class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SafeArea(
- top: false, // Set to true if you want to avoid the notch area as well
+ top: false,
bottom: Platform.isIOS ? false : true,
child: LayoutBuilder(
builder: (context, constraints) {
return Sizer(
builder: (context, orientation, deviceType) {
- // SizeConfig().init(constraints, orientation);
- return MaterialApp(
- // title: 'Dr. AlHabib',
- title: 'Dr. AlHabib Beta',
- builder: (context, mchild) {
- return MediaQuery(
- data: MediaQuery.of(context).copyWith(
- textScaler: TextScaler.noScaling,
- alwaysUse24HourFormat: true,
- ),
- child: mchild!,
+ final isArabic = EasyLocalization.of(context)?.locale.languageCode == "ar";
+ return Consumer(
+ builder: (context, profileVm, _) {
+ return MaterialApp(
+ title: 'Dr. AlHabib Beta',
+ builder: (context, mchild) {
+ return MediaQuery(
+ data: MediaQuery.of(context).copyWith(
+ textScaler: TextScaler.noScaling,
+ alwaysUse24HourFormat: true,
+ ),
+ child: mchild!,
+ );
+ },
+ showSemanticsDebugger: false,
+ debugShowCheckedModeBanner: false,
+ localizationsDelegates: context.localizationDelegates,
+ supportedLocales: context.supportedLocales,
+ locale: context.locale,
+ initialRoute: AppRoutes.initialRoute,
+ routes: AppRoutes.routes,
+ theme: AppTheme.getTheme(isArabic),
+ darkTheme: AppTheme.getDarkTheme(isArabic),
+ themeMode: profileVm.isDarkMode ? ThemeMode.dark : ThemeMode.light,
+ navigatorKey: getIt.get().navigatorKey,
);
},
- showSemanticsDebugger: false,
- debugShowCheckedModeBanner: false,
- localizationsDelegates: context.localizationDelegates,
- supportedLocales: context.supportedLocales,
- locale: context.locale,
- initialRoute: AppRoutes.initialRoute,
- routes: AppRoutes.routes,
- theme: AppTheme.getTheme(EasyLocalization.of(context)?.locale.languageCode == "ar"),
- navigatorKey: getIt.get().navigatorKey,
);
},
);
diff --git a/lib/presentation/active_medication/active_medication_page.dart b/lib/presentation/active_medication/active_medication_page.dart
index be6b82a6..3c857aec 100644
--- a/lib/presentation/active_medication/active_medication_page.dart
+++ b/lib/presentation/active_medication/active_medication_page.dart
@@ -193,7 +193,7 @@ class _ActiveMedicationPageState extends State {
),
Text(LocaleKeys.medications.tr(),
style: TextStyle(
- color: AppColors.primaryRedBorderColor,
+ color: AppColors.primaryRedColor,
fontSize: 12.f,
fontWeight: FontWeight.w500)),
SizedBox(height: 16.h),
@@ -467,7 +467,7 @@ class _ActiveMedicationPageState extends State {
decoration: BoxDecoration(
shape: BoxShape.circle,
color: value
- ? AppColors.textGreenColor
+ ? AppColors.successColor
: AppColors.greyTextColor,
),
),
@@ -528,7 +528,7 @@ class _ActiveMedicationPageState extends State {
height: 24.h,
width: 24.h,
iconColor:
- AppColors.blackBgColor,
+ AppColors.textColor,
),
),
],
@@ -539,7 +539,7 @@ class _ActiveMedicationPageState extends State {
itemCount: doses,
itemBuilder: (context, doseIndex) {
final badgeColor = [
- AppColors.textGreenColor,
+ AppColors.successColor,
AppColors.infoColor,
AppColors.labelColorYellow,
AppColors.mainPurple
@@ -702,11 +702,11 @@ class _ActiveMedicationPageState extends State {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
color: isSelected
- ? AppColors.secondaryLightRedBorderColor
+ ? AppColors.secondaryLightRedColor
: Colors.transparent,
border: Border.all(
color: isSelected
- ? AppColors.primaryRedBorderColor
+ ? AppColors.primaryRedColor
: AppColors.spacerLineColor,
width: 1,
),
@@ -720,7 +720,7 @@ class _ActiveMedicationPageState extends State {
date.day == currentDate.day ? "Today" : label,
style: TextStyle(
color: isSelected
- ? AppColors.primaryRedBorderColor
+ ? AppColors.primaryRedColor
: AppColors.greyTextColor,
fontSize: 11.f,
fontWeight: FontWeight.w500),
@@ -731,7 +731,7 @@ class _ActiveMedicationPageState extends State {
fontSize: 16.f,
fontWeight: FontWeight.bold,
color: isSelected
- ? AppColors.primaryRedBorderColor
+ ? AppColors.primaryRedColor
: AppColors.textColor))
]),
),
@@ -859,7 +859,7 @@ class _ReminderTimerDialogState extends State {
height: 24.h,
width: 24.h,
iconColor:
- AppColors.blackBgColor,
+ AppColors.textColor,
),),
],
),
diff --git a/lib/presentation/allergies/allergies_list_page.dart b/lib/presentation/allergies/allergies_list_page.dart
index adb63f02..3ee2de40 100644
--- a/lib/presentation/allergies/allergies_list_page.dart
+++ b/lib/presentation/allergies/allergies_list_page.dart
@@ -21,7 +21,7 @@ class AllergiesListPage extends StatelessWidget {
Widget build(BuildContext context) {
medicalFileViewModel = Provider.of(context, listen: false);
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: CollapsingListView(
title: LocaleKeys.allergies.tr(),
child: SingleChildScrollView(
diff --git a/lib/presentation/appointments/appointment_details_page.dart b/lib/presentation/appointments/appointment_details_page.dart
index e5961e30..8d01b2b4 100644
--- a/lib/presentation/appointments/appointment_details_page.dart
+++ b/lib/presentation/appointments/appointment_details_page.dart
@@ -89,7 +89,7 @@ class _AppointmentDetailsPageState extends State {
labViewModel = Provider.of(context, listen: false);
radiologyViewModel = Provider.of(context, listen: false);
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Column(
children: [
Expanded(
@@ -438,7 +438,7 @@ class _AppointmentDetailsPageState extends State {
children: [
MedicalFileCard(
label: LocaleKeys.labResults.tr(context: context),
- textColor: AppColors.blackColor,
+ textColor: AppColors.textColor,
backgroundColor: AppColors.whiteColor,
svgIcon: AppAssets.lab_result_icon,
isLargeText: true,
@@ -471,7 +471,7 @@ class _AppointmentDetailsPageState extends State {
}),
MedicalFileCard(
label: "${LocaleKeys.radiology.tr(context: context)} ${LocaleKeys.radiologySubtitle.tr(context: context)}",
- textColor: AppColors.blackColor,
+ textColor: AppColors.textColor,
backgroundColor: AppColors.whiteColor,
svgIcon: AppAssets.radiology_icon,
isLargeText: true,
@@ -498,7 +498,7 @@ class _AppointmentDetailsPageState extends State {
}),
MedicalFileCard(
label: LocaleKeys.prescriptions.tr(context: context),
- textColor: AppColors.blackColor,
+ textColor: AppColors.textColor,
backgroundColor: AppColors.whiteColor,
svgIcon: AppAssets.prescription_item_icon,
isLargeText: true,
@@ -654,7 +654,7 @@ class _AppointmentDetailsPageState extends State {
// // flipX: appState.isArabic(),
// // child: Utils.buildSvgWithAssets(
// // icon: AppAssets.forward_arrow_icon,
- // // iconColor: AppColors.blackColor,
+ // // iconColor: AppColors.textColor,
// // width: 18.w,
// // height: 13.h,
// // fit: BoxFit.contain,
@@ -790,7 +790,7 @@ class _AppointmentDetailsPageState extends State {
LocaleKeys.amountBeforeTax.tr(context: context).toText18(isBold: true),
Utils.getPaymentAmountWithSymbol(
widget.patientAppointmentHistoryResponseModel.patientShare!.toString().toText16(isBold: true),
- AppColors.blackColor,
+ AppColors.textColor,
13,
isSaudiCurrency: true),
],
@@ -820,7 +820,7 @@ class _AppointmentDetailsPageState extends State {
children: [
Utils.getPaymentAmountWithSymbol(
widget.patientAppointmentHistoryResponseModel.patientShareWithTax!.toString().toText24(isBold: true),
- AppColors.blackColor,
+ AppColors.textColor,
17,
isSaudiCurrency: true),
],
@@ -928,8 +928,8 @@ class _AppointmentDetailsPageState extends State {
);
});
},
- backgroundColor: AppColors.chipSecondaryLightRedColor,
- borderColor: AppColors.chipSecondaryLightRedColor,
+ backgroundColor: AppColors.secondaryLightRedColor,
+ borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor,
fontSize: 16.f,
fontWeight: FontWeight.w500,
diff --git a/lib/presentation/appointments/appointment_payment_page.dart b/lib/presentation/appointments/appointment_payment_page.dart
index e70ddf49..f3f5766f 100644
--- a/lib/presentation/appointments/appointment_payment_page.dart
+++ b/lib/presentation/appointments/appointment_payment_page.dart
@@ -84,7 +84,7 @@ class _AppointmentPaymentPageState extends State {
myAppointmentsViewModel = Provider.of(context);
payfortViewModel = Provider.of(context);
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Consumer(builder: (context, myAppointmentsVM, child) {
return Column(
children: [
@@ -120,7 +120,7 @@ class _AppointmentPaymentPageState extends State {
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 18.h,
height: 13.h,
fit: BoxFit.contain,
@@ -164,7 +164,7 @@ class _AppointmentPaymentPageState extends State {
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 18.h,
height: 13.h,
fit: BoxFit.contain,
@@ -204,7 +204,7 @@ class _AppointmentPaymentPageState extends State {
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 18.h,
height: 13.h,
fit: BoxFit.contain,
@@ -239,7 +239,7 @@ class _AppointmentPaymentPageState extends State {
? Container(
height: 50.h,
decoration: ShapeDecoration(
- color: AppColors.secondaryLightRedBorderColor,
+ color: AppColors.secondaryLightRedColor,
shape: SmoothRectangleBorder(
borderRadius: BorderRadius.only(topLeft: Radius.circular(24), topRight: Radius.circular(24)),
smoothness: 1,
@@ -261,7 +261,7 @@ class _AppointmentPaymentPageState extends State {
);
},
backgroundColor: AppColors.primaryRedColor,
- borderColor: AppColors.secondaryLightRedBorderColor,
+ borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.whiteColor,
fontSize: 10.f,
fontWeight: FontWeight.w500,
@@ -282,7 +282,7 @@ class _AppointmentPaymentPageState extends State {
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(
myAppointmentsVM.patientAppointmentShareResponseModel!.patientShare!.toString().toText16(isBold: true),
- AppColors.blackColor,
+ AppColors.textColor,
13,
isSaudiCurrency: true),
],
@@ -307,7 +307,7 @@ class _AppointmentPaymentPageState extends State {
"".toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(
myAppointmentsVM.patientAppointmentShareResponseModel!.patientShareWithTax!.toString().toText24(isBold: true),
- AppColors.blackColor,
+ AppColors.textColor,
17,
isSaudiCurrency: true),
],
diff --git a/lib/presentation/appointments/appointment_queue_page.dart b/lib/presentation/appointments/appointment_queue_page.dart
index f205aeb9..495f7c94 100644
--- a/lib/presentation/appointments/appointment_queue_page.dart
+++ b/lib/presentation/appointments/appointment_queue_page.dart
@@ -26,7 +26,7 @@ class AppointmentQueuePage extends StatelessWidget {
Widget build(BuildContext context) {
appState = getIt.get();
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Consumer(builder: (context, myAppointmentsVM, child) {
return Column(
children: [
diff --git a/lib/presentation/appointments/my_appointments_page.dart b/lib/presentation/appointments/my_appointments_page.dart
index c9e70487..cbbf5eb3 100644
--- a/lib/presentation/appointments/my_appointments_page.dart
+++ b/lib/presentation/appointments/my_appointments_page.dart
@@ -54,7 +54,7 @@ class _MyAppointmentsPageState extends State {
myAppointmentsViewModel = Provider.of(context, listen: false);
bookAppointmentsViewModel = Provider.of(context, listen: false);
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: CollapsingListView(
title: LocaleKeys.appointmentsList.tr(context: context),
child: SingleChildScrollView(
@@ -105,9 +105,9 @@ class _MyAppointmentsPageState extends State {
onPressed: () {
myAppointmentsVM.setIsAppointmentsSortByClinic(true);
},
- backgroundColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.bgRedLightColor : AppColors.whiteColor,
+ backgroundColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.secondaryLightRedColor : AppColors.whiteColor,
borderColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withValues(alpha: 0.2),
- textColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor,
+ textColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.primaryRedColor : AppColors.textColor,
fontSize: 12,
fontWeight: FontWeight.w500,
borderRadius: 10,
@@ -120,9 +120,9 @@ class _MyAppointmentsPageState extends State {
onPressed: () {
myAppointmentsVM.setIsAppointmentsSortByClinic(false);
},
- backgroundColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.whiteColor : AppColors.bgRedLightColor,
+ backgroundColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.whiteColor : AppColors.secondaryLightRedColor,
borderColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.textColor.withValues(alpha: 0.2) : AppColors.primaryRedColor,
- textColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor,
+ textColor: myAppointmentsVM.isAppointmentsSortByClinic ? AppColors.textColor : AppColors.primaryRedColor,
fontSize: 12,
fontWeight: FontWeight.w500,
borderRadius: 10,
diff --git a/lib/presentation/appointments/my_doctors_page.dart b/lib/presentation/appointments/my_doctors_page.dart
index fc7798f8..1954f75a 100644
--- a/lib/presentation/appointments/my_doctors_page.dart
+++ b/lib/presentation/appointments/my_doctors_page.dart
@@ -76,9 +76,9 @@ class _MyDoctorsPageState extends State {
expandedIndex = null;
});
},
- backgroundColor: isSortByClinic ? AppColors.bgRedLightColor : AppColors.whiteColor,
+ backgroundColor: isSortByClinic ? AppColors.secondaryLightRedColor : AppColors.whiteColor,
borderColor: isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withValues(alpha: 0.2),
- textColor: isSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor,
+ textColor: isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor,
fontSize: 12,
fontWeight: FontWeight.w500,
borderRadius: 10,
@@ -96,9 +96,9 @@ class _MyDoctorsPageState extends State {
expandedIndex = null;
});
},
- backgroundColor: isSortByClinic ? AppColors.whiteColor : AppColors.bgRedLightColor,
+ backgroundColor: isSortByClinic ? AppColors.whiteColor : AppColors.secondaryLightRedColor,
borderColor: isSortByClinic ? AppColors.textColor.withValues(alpha: 0.2) : AppColors.primaryRedColor,
- textColor: isSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor,
+ textColor: isSortByClinic ? AppColors.textColor : AppColors.primaryRedColor,
fontSize: 12,
fontWeight: FontWeight.w500,
borderRadius: 10,
diff --git a/lib/presentation/appointments/widgets/AppointmentFilter.dart b/lib/presentation/appointments/widgets/AppointmentFilter.dart
index 6546c650..4c60b4be 100644
--- a/lib/presentation/appointments/widgets/AppointmentFilter.dart
+++ b/lib/presentation/appointments/widgets/AppointmentFilter.dart
@@ -21,14 +21,14 @@ class AppointmentFilters extends StatelessWidget {
@override
Widget build(BuildContext context) {
return AppCustomChipWidget(
- backgroundColor: selectedFilter?.contains(item) == true?AppColors.chipSecondaryLightRedColor:AppColors.whiteColor,
+ backgroundColor: selectedFilter?.contains(item) == true?AppColors.secondaryLightRedColor:AppColors.whiteColor,
icon: item.leadingIcon,
textColor: selectedFilter?.contains(item) == true
- ? AppColors.chipPrimaryRedBorderColor: AppColors.blackColor,
+ ? AppColors.primaryRedColor: AppColors.textColor,
labelText: item.labelText.isNotEmpty?item.labelText.tr():"",
iconHasColor: true,
iconColor: selectedFilter?.contains(item) == true
- ? AppColors.chipPrimaryRedBorderColor:AppColors.blackColor,
+ ? AppColors.primaryRedColor:AppColors.textColor,
iconSize: 16,
deleteIcon: item.trailingIcon,
labelPadding: EdgeInsetsDirectional.only(start: 8.h, end: 0.h),
@@ -39,7 +39,7 @@ class AppointmentFilters extends StatelessWidget {
smoothness: 10.h,
side: BorderSide(
color: selectedFilter?.contains(item) == true
- ? AppColors.chipPrimaryRedBorderColor
+ ? AppColors.primaryRedColor
: AppColors.borderGrayColor,
width: 1),
)).onPress(onClicked);
diff --git a/lib/presentation/appointments/widgets/appointment_card.dart b/lib/presentation/appointments/widgets/appointment_card.dart
index 971e9ca8..af16e438 100644
--- a/lib/presentation/appointments/widgets/appointment_card.dart
+++ b/lib/presentation/appointments/widgets/appointment_card.dart
@@ -1,3 +1,5 @@
+import 'dart:ui' as ui;
+
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
@@ -26,7 +28,6 @@ import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart';
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
-import 'dart:ui' as ui;
class AppointmentCard extends StatelessWidget {
final PatientAppointmentHistoryResponseModel patientAppointmentHistoryResponseModel;
@@ -41,36 +42,44 @@ class AppointmentCard extends StatelessWidget {
final BookAppointmentsViewModel bookAppointmentsViewModel;
final bool isForRate;
- const AppointmentCard(
- {super.key,
- required this.patientAppointmentHistoryResponseModel,
- required this.myAppointmentsViewModel,
- required this.bookAppointmentsViewModel,
- this.isLoading = false,
- this.isFromHomePage = false,
- this.isFromMedicalReport = false,
- this.isForEyeMeasurements = false,
- this.isForFeedback = false,
- this.medicalFileViewModel,
- this.contactUsViewModel,
- this.isForRate = false});
+ const AppointmentCard({
+ super.key,
+ required this.patientAppointmentHistoryResponseModel,
+ required this.myAppointmentsViewModel,
+ required this.bookAppointmentsViewModel,
+ this.isLoading = false,
+ this.isFromHomePage = false,
+ this.isFromMedicalReport = false,
+ this.isForEyeMeasurements = false,
+ this.isForFeedback = false,
+ this.medicalFileViewModel,
+ this.contactUsViewModel,
+ this.isForRate = false,
+ });
@override
Widget build(BuildContext context) {
final appState = getIt.get();
- return InkWell(
- onTap: () => _goToDetails(context),
- child: Padding(
- padding: EdgeInsets.all(14.h),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- isForRate ? SizedBox() : _buildHeader(context, appState),
- SizedBox(height: 16.h),
- _buildDoctorRow(context),
- SizedBox(height: 16.h),
- isForRate ? SizedBox() : _buildActionArea(context, appState),
- ],
+ return Container(
+ decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
+ color: Colors.transparent,
+ borderRadius: 24.r,
+ context: context,
+ ),
+ child: InkWell(
+ onTap: () => _goToDetails(context),
+ child: Padding(
+ padding: EdgeInsets.all(14.h),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ isForRate ? SizedBox() : _buildHeader(context, appState),
+ SizedBox(height: 16.h),
+ _buildDoctorRow(context),
+ SizedBox(height: 16.h),
+ isForRate ? SizedBox() : _buildActionArea(context, appState),
+ ],
+ ),
),
),
);
@@ -96,14 +105,19 @@ class AppointmentCard extends StatelessWidget {
children: [
AppCustomChipWidget(
icon: isLoading ? AppAssets.walkin_appointment_icon : (isLiveCare ? AppAssets.small_livecare_icon : AppAssets.walkin_appointment_icon),
- iconColor: isLoading ? AppColors.textColor : (isLiveCare ? AppColors.whiteColor : AppColors.textColor),
- labelText: isLoading ? LocaleKeys.walkin.tr(context: context) : (isLiveCare ? LocaleKeys.livecare.tr(context: context) : LocaleKeys.walkin.tr(context: context)),
- backgroundColor: isLoading ? AppColors.greyColor : (isLiveCare ? AppColors.successColor : AppColors.greyColor),
- textColor: isLoading ? AppColors.textColor : (isLiveCare ? AppColors.whiteColor : AppColors.textColor),
+ iconColor: isLoading ? context.iconColor : (isLiveCare ? AppColors.whiteColor : context.iconColor),
+ labelText: isLoading
+ ? LocaleKeys.walkin.tr(context: context)
+ : (isLiveCare ? LocaleKeys.livecare.tr(context: context) : LocaleKeys.walkin.tr(context: context)),
+ backgroundColor: isLoading ? context.chipBgColor : (isLiveCare ? AppColors.successColor : context.chipBgColor),
+ textColor: isLoading ? context.textColor : (isLiveCare ? AppColors.whiteColor : context.textColor),
).toShimmer2(isShow: isLoading),
AppCustomChipWidget(
- labelText:
- isLoading ? 'OutPatient' : (appState.isArabic() ? patientAppointmentHistoryResponseModel.isInOutPatientDescriptionN! : patientAppointmentHistoryResponseModel.isInOutPatientDescription!),
+ labelText: isLoading
+ ? 'OutPatient'
+ : (appState.isArabic()
+ ? patientAppointmentHistoryResponseModel.isInOutPatientDescriptionN!
+ : patientAppointmentHistoryResponseModel.isInOutPatientDescription!),
backgroundColor: AppColors.primaryRedColor.withValues(alpha: 0.1),
textColor: AppColors.primaryRedColor,
).toShimmer2(isShow: isLoading),
@@ -124,7 +138,9 @@ class AppointmentCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.network(
- isLoading ? 'https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png' : patientAppointmentHistoryResponseModel.doctorImageURL!,
+ isLoading
+ ? 'https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown_female.png'
+ : patientAppointmentHistoryResponseModel.doctorImageURL!,
width: 63.h,
height: 63.h,
fit: BoxFit.cover,
@@ -135,12 +151,9 @@ class AppointmentCard extends StatelessWidget {
width: 40.w,
height: 40.h,
decoration: BoxDecoration(
- color: AppColors.whiteColor,
- shape: BoxShape.circle, // Makes the container circular
- border: Border.all(
- color: AppColors.scaffoldBgColor, // Color of the border
- width: 1.5.w, // Width of the border
- ),
+ color: context.cardBaseColor,
+ shape: BoxShape.circle,
+ border: Border.all(color: context.scaffoldBgColor, width: 1.5.w),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
@@ -148,8 +161,8 @@ class AppointmentCard extends StatelessWidget {
Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h),
SizedBox(height: 2.h),
(isFoldable || isTablet)
- ? "${patientAppointmentHistoryResponseModel.decimalDoctorRate}".toText9(isBold: true, color: AppColors.textColor)
- : "${patientAppointmentHistoryResponseModel.decimalDoctorRate ?? "0.0"}".toText11(isBold: true, color: AppColors.textColor),
+ ? "${patientAppointmentHistoryResponseModel.decimalDoctorRate}".toText9(isBold: true, color: context.textColor)
+ : "${patientAppointmentHistoryResponseModel.decimalDoctorRate ?? "0.0"}".toText11(isBold: true, color: context.textColor),
],
),
).circle(100).toShimmer2(isShow: isLoading),
@@ -161,8 +174,10 @@ class AppointmentCard extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- (isLoading ? 'John Doe' : "${patientAppointmentHistoryResponseModel.doctorTitle} ${patientAppointmentHistoryResponseModel.doctorNameObj!}")
- .toText16(isBold: true, maxlines: 1)
+ (isLoading
+ ? 'John Doe'
+ : "${patientAppointmentHistoryResponseModel.doctorTitle} ${patientAppointmentHistoryResponseModel.doctorNameObj!}")
+ .toText16(isBold: true, maxlines: 1, color: context.textColor)
.toShimmer2(isShow: isLoading),
SizedBox(height: 8.h),
Wrap(
@@ -192,7 +207,7 @@ class AppointmentCard extends StatelessWidget {
richText: isLoading
? 'Cardiology'.toText10().toShimmer2(isShow: isLoading)
: "${DateUtil.formatDateToDate(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate), false)} ${DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(patientAppointmentHistoryResponseModel.appointmentDate), false)}"
- .toText10(isEnglishOnly: true),
+ .toText10(isEnglishOnly: true, color: context.textColor, weight: FontWeight.w500),
).toShimmer2(isShow: isLoading),
),
@@ -253,17 +268,16 @@ class AppointmentCard extends StatelessWidget {
});
}
},
- backgroundColor: AppColors.secondaryLightRedColor,
- borderColor: AppColors.secondaryLightRedColor,
- textColor: AppColors.primaryRedColor,
+ backgroundColor: context.secondaryLightRedColor,
+ borderColor: context.secondaryLightRedColor,
+ textColor: context.primaryRedColor,
fontSize: (isFoldable || isTablet) ? 12.f : 14.f,
fontWeight: FontWeight.w500,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
- // height: isTablet || isFoldable ? 46.h : 40.h,
height: 40.h,
icon: isFromMedicalReport ? AppAssets.checkmark_icon : null,
- iconColor: AppColors.primaryRedColor,
+ iconColor: context.primaryRedColor,
iconSize: 16.h,
);
} else {
@@ -281,17 +295,16 @@ class AppointmentCard extends StatelessWidget {
}
Navigator.pop(context, false);
},
- backgroundColor: AppColors.secondaryLightRedColor,
- borderColor: AppColors.secondaryLightRedColor,
- textColor: AppColors.primaryRedColor,
+ backgroundColor: context.secondaryLightRedColor,
+ borderColor: context.secondaryLightRedColor,
+ textColor: context.primaryRedColor,
fontSize: (isFoldable || isTablet) ? 12.f : 14.f,
fontWeight: FontWeight.w500,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
- // height: isTablet || isFoldable ? 46.h : 40.h,
height: 40.h,
icon: AppAssets.checkmark_icon,
- iconColor: AppColors.primaryRedColor,
+ iconColor: context.primaryRedColor,
iconSize: 16.h,
);
}
@@ -306,8 +319,10 @@ class AppointmentCard extends StatelessWidget {
: CustomButton(
text: AppointmentType.getNextActionText(patientAppointmentHistoryResponseModel.nextAction),
onPressed: () => _goToDetails(context),
- backgroundColor: AppointmentType.getNextActionButtonColor(patientAppointmentHistoryResponseModel.nextAction).withValues(alpha: 0.15),
- borderColor: AppointmentType.getNextActionButtonColor(patientAppointmentHistoryResponseModel.nextAction).withValues(alpha: 0.01),
+ backgroundColor:
+ AppointmentType.getNextActionButtonColor(patientAppointmentHistoryResponseModel.nextAction).withValues(alpha: 0.15),
+ borderColor:
+ AppointmentType.getNextActionButtonColor(patientAppointmentHistoryResponseModel.nextAction).withValues(alpha: 0.01),
textColor: AppointmentType.getNextActionTextColor(patientAppointmentHistoryResponseModel.nextAction),
fontSize: (isFoldable || isTablet) ? 12.f : 14.f,
fontWeight: FontWeight.w500,
@@ -325,12 +340,12 @@ class AppointmentCard extends StatelessWidget {
flex: 1,
child: Container(
height: (isFoldable || isTablet) ? 50.h : 40.h,
- decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.textColor, borderRadius: 10.h),
+ decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: context.serviceCardButtonColor, borderRadius: 10.h),
child: Transform.flip(
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon,
- iconColor: AppColors.whiteColor,
+ iconColor: Colors.white,
width: 24.w,
height: 24.h,
fit: BoxFit.contain,
@@ -379,17 +394,16 @@ class AppointmentCard extends StatelessWidget {
}
});
},
- backgroundColor: AppColors.secondaryLightRedColor,
- borderColor: AppColors.secondaryLightRedColor,
- textColor: AppColors.primaryRedColor,
+ backgroundColor: context.secondaryLightRedColor,
+ borderColor: context.secondaryLightRedColor,
+ textColor: context.primaryRedColor,
fontSize: (isFoldable || isTablet) ? 12.f : 14.f,
fontWeight: FontWeight.w500,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
- // height: isTablet || isFoldable ? 46.h : 40.h,
height: 40.h,
icon: AppAssets.ask_doctor_icon,
- iconColor: AppColors.primaryRedColor,
+ iconColor: context.primaryRedColor,
iconSize: 16.h,
);
}
@@ -397,16 +411,16 @@ class AppointmentCard extends StatelessWidget {
return CustomButton(
text: LocaleKeys.rebookSameDoctor.tr(context: context),
onPressed: () => openDoctorScheduleCalendar(context),
- backgroundColor: AppColors.greyColor,
- borderColor: AppColors.greyColor,
- textColor: AppColors.blackColor,
+ backgroundColor: context.chipBgColor,
+ borderColor: context.chipBgColor,
+ textColor: context.textColor,
fontSize: (isFoldable || isTablet) ? 12.f : 14.f,
fontWeight: FontWeight.w500,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
height: 40.h,
icon: AppAssets.rebook_appointment_icon,
- iconColor: AppColors.blackColor,
+ iconColor: context.iconColor,
iconSize: 16.h,
);
}
@@ -420,7 +434,8 @@ class AppointmentCard extends StatelessWidget {
),
);
} else {
- bookAppointmentsViewModel.getAppointmentNearestGate(projectID: patientAppointmentHistoryResponseModel.projectID, clinicID: patientAppointmentHistoryResponseModel.clinicID);
+ bookAppointmentsViewModel.getAppointmentNearestGate(
+ projectID: patientAppointmentHistoryResponseModel.projectID, clinicID: patientAppointmentHistoryResponseModel.clinicID);
Navigator.of(context)
.push(
CustomPageRoute(
diff --git a/lib/presentation/appointments/widgets/appointment_checkin_bottom_sheet.dart b/lib/presentation/appointments/widgets/appointment_checkin_bottom_sheet.dart
index 95fc09b8..0cca7cf2 100644
--- a/lib/presentation/appointments/widgets/appointment_checkin_bottom_sheet.dart
+++ b/lib/presentation/appointments/widgets/appointment_checkin_bottom_sheet.dart
@@ -128,7 +128,7 @@ class AppointmentCheckinBottomSheet extends StatelessWidget {
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 18.h,
height: 13.h,
fit: BoxFit.contain,
diff --git a/lib/presentation/appointments/widgets/appointment_doctor_card.dart b/lib/presentation/appointments/widgets/appointment_doctor_card.dart
index 467ba640..501b9a0b 100644
--- a/lib/presentation/appointments/widgets/appointment_doctor_card.dart
+++ b/lib/presentation/appointments/widgets/appointment_doctor_card.dart
@@ -171,14 +171,14 @@ class AppointmentDoctorCard extends StatelessWidget {
},
backgroundColor: AppColors.greyColor,
borderColor: AppColors.greyColor,
- textColor: AppColors.blackColor,
+ textColor: AppColors.textColor,
fontSize: 12.f,
fontWeight: FontWeight.w500,
borderRadius: 12.r,
padding: EdgeInsets.fromLTRB(10.w, 0, 10.w, 0),
height: 40.h,
icon: AppAssets.rebook_appointment_icon,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
iconSize: 14.h,
)
: SizedBox.shrink();
diff --git a/lib/presentation/appointments/widgets/faculity_selection/facility_selection_item.dart b/lib/presentation/appointments/widgets/faculity_selection/facility_selection_item.dart
index 2f5589c8..b6363318 100644
--- a/lib/presentation/appointments/widgets/faculity_selection/facility_selection_item.dart
+++ b/lib/presentation/appointments/widgets/faculity_selection/facility_selection_item.dart
@@ -47,7 +47,7 @@ class FacilitySelectionItem extends StatelessWidget {
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 18,
height: 13,
fit: BoxFit.contain,
@@ -72,7 +72,7 @@ class FacilitySelectionItem extends StatelessWidget {
style: TextStyle(
fontSize: 16.h,
fontWeight: FontWeight.w600,
- color: AppColors.blackColor,
+ color: AppColors.textColor,
),
),
),
diff --git a/lib/presentation/appointments/widgets/faculity_selection/facility_type_selection_widget.dart b/lib/presentation/appointments/widgets/faculity_selection/facility_type_selection_widget.dart
index b6366dbf..77ed349b 100644
--- a/lib/presentation/appointments/widgets/faculity_selection/facility_type_selection_widget.dart
+++ b/lib/presentation/appointments/widgets/faculity_selection/facility_type_selection_widget.dart
@@ -32,7 +32,7 @@ class FacilityTypeSelectionWidget extends StatelessWidget {
style: TextStyle(
fontSize: 21,
fontWeight: FontWeight.w600,
- color: AppColors.blackColor,
+ color: AppColors.textColor,
),
),
Text(
diff --git a/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body.dart b/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body.dart
index f3301f0c..95b0a1c1 100644
--- a/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body.dart
+++ b/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body.dart
@@ -36,7 +36,7 @@ import '../../../emergency_services/call_ambulance/widgets/type_selection_widget
// style: TextStyle(
// fontSize: 21,
// fontWeight: FontWeight.w600,
-// color: AppColors.blackColor,
+// color: AppColors.textColor,
// ),
// ),
// Text(
diff --git a/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body_for_doctor_filter.dart b/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body_for_doctor_filter.dart
index a2d22cda..b6e0bbec 100644
--- a/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body_for_doctor_filter.dart
+++ b/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_bottom_sheet_body_for_doctor_filter.dart
@@ -30,7 +30,7 @@ class HospitalBottomSheetBodyForDoctorFilter extends StatelessWidget {
style: TextStyle(
fontSize: 21,
fontWeight: FontWeight.w600,
- color: AppColors.blackColor,
+ color: AppColors.textColor,
),
),
SizedBox(height: 24.h),
diff --git a/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart b/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart
index 5d9ed8db..59420fe7 100644
--- a/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart
+++ b/lib/presentation/appointments/widgets/hospital_bottom_sheet/hospital_list_items.dart
@@ -41,7 +41,7 @@ class HospitalListItem extends StatelessWidget {
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 18.h,
height: 13.h,
fit: BoxFit.contain,
@@ -63,7 +63,7 @@ class HospitalListItem extends StatelessWidget {
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 16,
- color: AppColors.blackColor,
+ color: AppColors.textColor,
),
),
)
@@ -89,7 +89,7 @@ class HospitalListItem extends StatelessWidget {
children: [
AppCustomChipWidget(
labelText: "Distance not available",
- textColor: AppColors.blackColor,
+ textColor: AppColors.textColor,
),
// SizedBox(
// width: 8.h,
@@ -102,7 +102,7 @@ class HospitalListItem extends StatelessWidget {
labelText: "Location turned off",
deleteIcon: AppAssets.location_unavailable,
deleteIconSize: Size(9.w, 12.h),
- textColor: AppColors.blackColor,
+ textColor: AppColors.textColor,
)),
],
);
diff --git a/lib/presentation/appointments/widgets/hospital_bottom_sheet/type_selection_widget.dart b/lib/presentation/appointments/widgets/hospital_bottom_sheet/type_selection_widget.dart
index e9a5e363..5eb8f91f 100644
--- a/lib/presentation/appointments/widgets/hospital_bottom_sheet/type_selection_widget.dart
+++ b/lib/presentation/appointments/widgets/hospital_bottom_sheet/type_selection_widget.dart
@@ -28,7 +28,7 @@ class TypeSelectionWidget extends StatelessWidget {
side: BorderSide(
color: data.currentlySelectedFacility == FacilitySelection.ALL
? AppColors.errorColor
- : AppColors.chipBorderColorOpacity20,
+ : AppColors.borderGrayColor,
width: 1,
),
borderRadius: BorderRadius.circular(10)),
@@ -38,7 +38,7 @@ class TypeSelectionWidget extends StatelessWidget {
: AppColors.whiteColor,
textColor: data.currentlySelectedFacility == FacilitySelection.ALL
? AppColors.errorColor
- : AppColors.blackColor,
+ : AppColors.textColor,
).onPress((){
data.setSelectedFacility(FacilitySelection.ALL);
}),
@@ -50,7 +50,7 @@ class TypeSelectionWidget extends StatelessWidget {
side: BorderSide(
color: data.currentlySelectedFacility == FacilitySelection.HMG
? AppColors.errorColor
- : AppColors.chipBorderColorOpacity20,
+ : AppColors.borderGrayColor,
width: 1,
),
borderRadius: BorderRadius.circular(10)),
@@ -60,7 +60,7 @@ class TypeSelectionWidget extends StatelessWidget {
: AppColors.whiteColor,
textColor: data.currentlySelectedFacility == FacilitySelection.HMG
? AppColors.errorColor
- : AppColors.blackColor,
+ : AppColors.textColor,
).onPress((){
data.setSelectedFacility(FacilitySelection.HMG);
}),
@@ -72,7 +72,7 @@ class TypeSelectionWidget extends StatelessWidget {
side: BorderSide(
color: data.currentlySelectedFacility == FacilitySelection.HMC
? AppColors.errorColor
- : AppColors.chipBorderColorOpacity20,
+ : AppColors.borderGrayColor,
width: 1,
),
borderRadius: BorderRadius.circular(10)),
@@ -82,7 +82,7 @@ class TypeSelectionWidget extends StatelessWidget {
: AppColors.whiteColor,
textColor: data.currentlySelectedFacility == FacilitySelection.HMC
? AppColors.errorColor
- : AppColors.blackColor,
+ : AppColors.textColor,
).onPress((){
data.setSelectedFacility(FacilitySelection.HMC);
}),
diff --git a/lib/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart b/lib/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart
index 969e23af..f863039c 100644
--- a/lib/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart
+++ b/lib/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart
@@ -45,7 +45,7 @@ class RegionListItem extends StatelessWidget {
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 18,
height: 13,
fit: BoxFit.contain,
@@ -66,8 +66,8 @@ class RegionListItem extends StatelessWidget {
richText: RichText(
text: TextSpan(
text: count,
- style: TextStyle(fontSize: 12.h, fontWeight: FontWeight.w700, color: AppColors.blackColor),
- children: [TextSpan(text: title, style: TextStyle(fontSize: 12.h, fontWeight: FontWeight.w500, color: AppColors.blackColor))])),
+ style: TextStyle(fontSize: 12.h, fontWeight: FontWeight.w700, color: AppColors.textColor),
+ children: [TextSpan(text: title, style: TextStyle(fontSize: 12.h, fontWeight: FontWeight.w500, color: AppColors.textColor))])),
);
}
@@ -82,7 +82,7 @@ class RegionListItem extends StatelessWidget {
style: TextStyle(
fontSize: 16.h,
fontWeight: FontWeight.w600,
- color: AppColors.blackColor,
+ color: AppColors.textColor,
),
),
),
diff --git a/lib/presentation/ask_doctor/ask_doctor_page.dart b/lib/presentation/ask_doctor/ask_doctor_page.dart
index 4c2c267f..6b045408 100644
--- a/lib/presentation/ask_doctor/ask_doctor_page.dart
+++ b/lib/presentation/ask_doctor/ask_doctor_page.dart
@@ -32,7 +32,7 @@ class _AskDoctorPageState extends State {
Widget build(BuildContext context) {
myAppointmentsViewModel = Provider.of(context, listen: false);
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Consumer(
builder: (context, askDoctorVM, child) {
return CollapsingListView(
diff --git a/lib/presentation/ask_doctor/doctor_response_page.dart b/lib/presentation/ask_doctor/doctor_response_page.dart
index 9cd19ef6..94e35d2d 100644
--- a/lib/presentation/ask_doctor/doctor_response_page.dart
+++ b/lib/presentation/ask_doctor/doctor_response_page.dart
@@ -36,7 +36,7 @@ class _DoctorResponsePageState extends State {
Widget build(BuildContext context) {
myAppointmentsViewModel = Provider.of(context, listen: false);
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: CollapsingListView(
title: LocaleKeys.doctorResponses.tr(context: context),
child: SingleChildScrollView(
diff --git a/lib/presentation/authentication/login.dart b/lib/presentation/authentication/login.dart
index 9f64bde4..c7bb4e0a 100644
--- a/lib/presentation/authentication/login.dart
+++ b/lib/presentation/authentication/login.dart
@@ -47,7 +47,7 @@ class LoginScreenState extends State {
Widget build(BuildContext context) {
AuthenticationViewModel authVm = context.read();
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
appBar: CustomAppBar(
onBackPressed: () {
Navigator.of(context).pop();
@@ -187,7 +187,7 @@ class LoginScreenState extends State {
}
},
backgroundColor: AppColors.primaryRedColor,
- borderColor: AppColors.primaryRedBorderColor,
+ borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
icon: AppAssets.message,
),
diff --git a/lib/presentation/authentication/register.dart b/lib/presentation/authentication/register.dart
index 2a26a726..96bdcb32 100644
--- a/lib/presentation/authentication/register.dart
+++ b/lib/presentation/authentication/register.dart
@@ -48,7 +48,7 @@ class _RegisterNew extends State {
AuthenticationViewModel authVm = context.read();
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
appBar: CustomAppBar(
onBackPressed: () {
Navigator.of(context).pop();
@@ -149,7 +149,7 @@ class _RegisterNew extends State {
decoration: BoxDecoration(
color: isTermsAccepted ? AppColors.primaryRedColor : Colors.transparent,
borderRadius: BorderRadius.circular(6),
- border: Border.all(color: isTermsAccepted ? AppColors.primaryRedBorderColor : AppColors.greyColor, width: 2.h),
+ border: Border.all(color: isTermsAccepted ? AppColors.primaryRedColor : AppColors.greyColor, width: 2.h),
),
child: isTermsAccepted ? Icon(Icons.check, size: 16.f, color: Colors.white) : null,
);
@@ -176,7 +176,7 @@ class _RegisterNew extends State {
fontWeight: FontWeight.w500,
color: AppColors.primaryRedColor,
decoration: TextDecoration.underline,
- decorationColor: AppColors.primaryRedBorderColor,
+ decorationColor: AppColors.primaryRedColor,
),
),
),
@@ -292,7 +292,7 @@ class _RegisterNew extends State {
}
},
backgroundColor: AppColors.primaryRedColor,
- borderColor: AppColors.primaryRedBorderColor,
+ borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
icon: AppAssets.message,
),
diff --git a/lib/presentation/authentication/register_step2.dart b/lib/presentation/authentication/register_step2.dart
index c4bdf0f9..1c2f7273 100644
--- a/lib/presentation/authentication/register_step2.dart
+++ b/lib/presentation/authentication/register_step2.dart
@@ -49,7 +49,7 @@ class _RegisterNew extends State {
? ("${appState.getNHICUserData.firstNameEn!.toUpperCase()} ${appState.getNHICUserData.lastNameEn!.toUpperCase()}")
: ("${appState.getNHICUserData.firstNameAr!.toUpperCase()} ${appState.getNHICUserData.lastNameAr!.toUpperCase()}");
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
appBar: CustomAppBar(
onBackPressed: () {
Navigator.of(context).pop();
diff --git a/lib/presentation/blood_donation/blood_donation_page.dart b/lib/presentation/blood_donation/blood_donation_page.dart
index 7c6c625f..af0461fe 100644
--- a/lib/presentation/blood_donation/blood_donation_page.dart
+++ b/lib/presentation/blood_donation/blood_donation_page.dart
@@ -48,7 +48,7 @@ class _BloodDonationPageState extends State {
Widget build(BuildContext context) {
appState = getIt();
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Consumer(builder: (context, bloodDonationVM, child) {
return Column(
children: [
@@ -79,7 +79,7 @@ class _BloodDonationPageState extends State {
children: [
Lottie.asset(AppAnimations.errorAnimation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill),
SizedBox(height: 8.h),
- (LocaleKeys.loginToUseService.tr()).toText16(color: AppColors.blackColor),
+ (LocaleKeys.loginToUseService.tr()).toText16(color: AppColors.textColor),
SizedBox(height: 16.h),
Row(
children: [
@@ -122,8 +122,8 @@ class _BloodDonationPageState extends State {
);
}
},
- backgroundColor: AppColors.bgRedLightColor,
- borderColor: AppColors.bgRedLightColor,
+ backgroundColor: AppColors.secondaryLightRedColor,
+ borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor,
padding: EdgeInsetsGeometry.symmetric(vertical: 0.h, horizontal: 20.h)),
child: Padding(
@@ -253,7 +253,7 @@ class _BloodDonationPageState extends State {
decoration: BoxDecoration(
color: isTermsAccepted ? AppColors.primaryRedColor : Colors.transparent,
borderRadius: BorderRadius.circular(6),
- border: Border.all(color: isTermsAccepted ? AppColors.primaryRedBorderColor : AppColors.greyColor, width: 2.h),
+ border: Border.all(color: isTermsAccepted ? AppColors.primaryRedColor : AppColors.greyColor, width: 2.h),
),
child: isTermsAccepted ? Icon(Icons.check, size: 16.f, color: Colors.white) : null,
);
@@ -285,7 +285,7 @@ class _BloodDonationPageState extends State {
fontWeight: FontWeight.w500,
color: AppColors.primaryRedColor,
decoration: TextDecoration.underline,
- decorationColor: AppColors.primaryRedBorderColor,
+ decorationColor: AppColors.primaryRedColor,
),
),
),
@@ -317,7 +317,7 @@ class _BloodDonationPageState extends State {
children: [
Lottie.asset(AppAnimations.errorAnimation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill),
SizedBox(height: 8.h),
- (LocaleKeys.loginToUseService.tr()).toText16(color: AppColors.blackColor),
+ (LocaleKeys.loginToUseService.tr()).toText16(color: AppColors.textColor),
SizedBox(height: 16.h),
Row(
children: [
diff --git a/lib/presentation/blood_donation/widgets/city_list_item.dart b/lib/presentation/blood_donation/widgets/city_list_item.dart
index 408fb26b..493c4971 100644
--- a/lib/presentation/blood_donation/widgets/city_list_item.dart
+++ b/lib/presentation/blood_donation/widgets/city_list_item.dart
@@ -39,7 +39,7 @@ class CityListItem extends StatelessWidget {
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 40.h,
height: 40.h,
fit: BoxFit.contain,
diff --git a/lib/presentation/blood_donation/widgets/select_blood_group_widget.dart b/lib/presentation/blood_donation/widgets/select_blood_group_widget.dart
index a5ac071c..536b6cd8 100644
--- a/lib/presentation/blood_donation/widgets/select_blood_group_widget.dart
+++ b/lib/presentation/blood_donation/widgets/select_blood_group_widget.dart
@@ -43,7 +43,7 @@ class SelectBloodGroupWidget extends StatelessWidget {
flipX: isArabic,
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 40.h,
height: 40.h,
fit: BoxFit.contain,
diff --git a/lib/presentation/blood_donation/widgets/select_gender_widget.dart b/lib/presentation/blood_donation/widgets/select_gender_widget.dart
index 0d360a80..f6d4a84b 100644
--- a/lib/presentation/blood_donation/widgets/select_gender_widget.dart
+++ b/lib/presentation/blood_donation/widgets/select_gender_widget.dart
@@ -44,7 +44,7 @@ class SelectGenderWidget extends StatelessWidget {
flipX: isArabic,
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 40.h,
height: 40.h,
fit: BoxFit.contain,
diff --git a/lib/presentation/book_appointment/book_appointment_page.dart b/lib/presentation/book_appointment/book_appointment_page.dart
index 03de8332..3277f978 100644
--- a/lib/presentation/book_appointment/book_appointment_page.dart
+++ b/lib/presentation/book_appointment/book_appointment_page.dart
@@ -74,7 +74,7 @@ class _BookAppointmentPageState extends State {
regionalViewModel = Provider.of(context, listen: true);
getSelectedTabData(bookAppointmentsViewModel.selectedTabIndex);
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Column(
children: [
Expanded(
@@ -673,8 +673,8 @@ class _BookAppointmentPageState extends State {
onPressed: () {
context.pop();
},
- backgroundColor: AppColors.chipSecondaryLightRedColor,
- borderColor: AppColors.chipSecondaryLightRedColor,
+ backgroundColor: AppColors.secondaryLightRedColor,
+ borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor,
fontSize: 16.f,
fontWeight: FontWeight.w500,
diff --git a/lib/presentation/book_appointment/doctor_filter/clinic_bottomsheet.dart b/lib/presentation/book_appointment/doctor_filter/clinic_bottomsheet.dart
index 982fc54d..c49e2868 100644
--- a/lib/presentation/book_appointment/doctor_filter/clinic_bottomsheet.dart
+++ b/lib/presentation/book_appointment/doctor_filter/clinic_bottomsheet.dart
@@ -32,7 +32,7 @@ class ClinicBottomSheet extends StatelessWidget {
style: TextStyle(
fontSize: 21,
fontWeight: FontWeight.w600,
- color: AppColors.blackColor,
+ color: AppColors.textColor,
),
),
SizedBox(height: 24.h),
diff --git a/lib/presentation/book_appointment/doctor_filter/doctors_filter.dart b/lib/presentation/book_appointment/doctor_filter/doctors_filter.dart
index d9aa9e5e..7ecf1712 100644
--- a/lib/presentation/book_appointment/doctor_filter/doctors_filter.dart
+++ b/lib/presentation/book_appointment/doctor_filter/doctors_filter.dart
@@ -30,9 +30,9 @@ class DoctorsFilters extends StatelessWidget{
@override
Widget build(BuildContext context) {
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
appBar: AppBar(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
automaticallyImplyLeading: false,
centerTitle: false,
diff --git a/lib/presentation/book_appointment/doctor_profile_page.dart b/lib/presentation/book_appointment/doctor_profile_page.dart
index c62404ab..6c41f27e 100644
--- a/lib/presentation/book_appointment/doctor_profile_page.dart
+++ b/lib/presentation/book_appointment/doctor_profile_page.dart
@@ -31,7 +31,7 @@ class DoctorProfilePage extends StatelessWidget {
bookAppointmentsViewModel = Provider.of(context, listen: false);
appState = getIt.get();
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Column(
children: [
Expanded(
diff --git a/lib/presentation/book_appointment/laser/laser_appointment.dart b/lib/presentation/book_appointment/laser/laser_appointment.dart
index 3b94b0ec..f026c567 100644
--- a/lib/presentation/book_appointment/laser/laser_appointment.dart
+++ b/lib/presentation/book_appointment/laser/laser_appointment.dart
@@ -23,7 +23,7 @@ class LaserAppointment extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
bottomNavigationBar:
DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
diff --git a/lib/presentation/book_appointment/laser/widgets/body_type_listing.dart b/lib/presentation/book_appointment/laser/widgets/body_type_listing.dart
index baf72d26..e18e946d 100644
--- a/lib/presentation/book_appointment/laser/widgets/body_type_listing.dart
+++ b/lib/presentation/book_appointment/laser/widgets/body_type_listing.dart
@@ -33,16 +33,16 @@ class BodyTypeListing extends StatelessWidget {
),
itemBuilder: (_, index) => AppCustomChipWidget(
backgroundColor: index == selectedBodyAreaIndex
- ? AppColors.chipSecondaryLightRedColor
+ ? AppColors.secondaryLightRedColor
: AppColors.whiteColor,
textColor: index == selectedBodyAreaIndex
- ? AppColors.chipPrimaryRedBorderColor
- : AppColors.blackColor,
+ ? AppColors.primaryRedColor
+ : AppColors.textColor,
labelText: availableBodyArea[index].title.tr(),
iconHasColor: false,
iconColor: index == selectedBodyAreaIndex
- ? AppColors.chipPrimaryRedBorderColor
- : AppColors.blackColor,
+ ? AppColors.primaryRedColor
+ : AppColors.textColor,
iconSize: 16,
labelPadding: EdgeInsetsDirectional.only(start: 8.w, end: 8.w),
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 12.w),
@@ -52,7 +52,7 @@ class BodyTypeListing extends StatelessWidget {
smoothness: 10,
side: BorderSide(
color: index == selectedBodyAreaIndex
- ? AppColors.chipPrimaryRedBorderColor
+ ? AppColors.primaryRedColor
: AppColors.borderGrayColor,
width: 1),
)).onPress(
diff --git a/lib/presentation/book_appointment/livecare/immediate_livecare_payment_details.dart b/lib/presentation/book_appointment/livecare/immediate_livecare_payment_details.dart
index fb6ebe72..3280b9cc 100644
--- a/lib/presentation/book_appointment/livecare/immediate_livecare_payment_details.dart
+++ b/lib/presentation/book_appointment/livecare/immediate_livecare_payment_details.dart
@@ -144,7 +144,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
? Container(
height: 50.h,
decoration: ShapeDecoration(
- color: AppColors.secondaryLightRedBorderColor,
+ color: AppColors.secondaryLightRedColor,
shape: SmoothRectangleBorder(
borderRadius: BorderRadius.only(topLeft: Radius.circular(24), topRight: Radius.circular(24)),
smoothness: 1,
@@ -164,7 +164,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
);
},
backgroundColor: AppColors.primaryRedColor,
- borderColor: AppColors.secondaryLightRedBorderColor,
+ borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.whiteColor,
fontSize: 10,
fontWeight: FontWeight.w500,
@@ -183,7 +183,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
- Utils.getPaymentAmountWithSymbol(immediateLiveCareVM.liveCareImmediateAppointmentFeesList.amount!.toText16(isBold: true), AppColors.blackColor, 13,
+ Utils.getPaymentAmountWithSymbol(immediateLiveCareVM.liveCareImmediateAppointmentFeesList.amount!.toText16(isBold: true), AppColors.textColor, 13,
isSaudiCurrency: immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar" ||
immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "ريال"),
],
@@ -203,7 +203,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
SizedBox(width: 150.h, child: Utils.getPaymentMethods()),
- Utils.getPaymentAmountWithSymbol(immediateLiveCareVM.liveCareImmediateAppointmentFeesList.total!.toText24(isBold: true), AppColors.blackColor, 17,
+ Utils.getPaymentAmountWithSymbol(immediateLiveCareVM.liveCareImmediateAppointmentFeesList.total!.toText24(isBold: true), AppColors.textColor, 17,
isSaudiCurrency: (immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "sar" ||
immediateLiveCareVM.liveCareImmediateAppointmentFeesList.currency!.toLowerCase() == "ريال")),
],
diff --git a/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart b/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart
index 73da69f5..aa87ea79 100644
--- a/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart
+++ b/lib/presentation/book_appointment/livecare/immediate_livecare_payment_page.dart
@@ -78,7 +78,7 @@ class _ImmediateLiveCarePaymentPageState extends State(context, listen: false);
payfortViewModel = Provider.of(context, listen: false);
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Consumer(builder: (context, myAppointmentsVM, child) {
return Column(
children: [
@@ -113,7 +113,7 @@ class _ImmediateLiveCarePaymentPageState extends State(context, listen: false);
appState = getIt.get();
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Consumer(builder: (context, immediateLiveCareVM, child) {
return Column(
children: [
diff --git a/lib/presentation/book_appointment/livecare/select_immediate_livecare_clinic_page.dart b/lib/presentation/book_appointment/livecare/select_immediate_livecare_clinic_page.dart
index a83dfa05..7274346f 100644
--- a/lib/presentation/book_appointment/livecare/select_immediate_livecare_clinic_page.dart
+++ b/lib/presentation/book_appointment/livecare/select_immediate_livecare_clinic_page.dart
@@ -59,7 +59,7 @@ class _SelectImmediateLiveCareClinicPageState extends State(context, listen: false);
appState = getIt.get();
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: CollapsingListView(
title: LocaleKeys.selectLiveCareClinic.tr(),
child: SingleChildScrollView(
diff --git a/lib/presentation/book_appointment/livecare/widgets/select_livecare_call_type.dart b/lib/presentation/book_appointment/livecare/widgets/select_livecare_call_type.dart
index e0f6c5c0..17e40122 100644
--- a/lib/presentation/book_appointment/livecare/widgets/select_livecare_call_type.dart
+++ b/lib/presentation/book_appointment/livecare/widgets/select_livecare_call_type.dart
@@ -79,7 +79,7 @@ class SelectLiveCareCallType extends StatelessWidget {
flipX: getIt.get().isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 18.h,
height: 13.h,
fit: BoxFit.contain,
diff --git a/lib/presentation/book_appointment/search_doctor_by_name.dart b/lib/presentation/book_appointment/search_doctor_by_name.dart
index fa871f50..05ec8a9c 100644
--- a/lib/presentation/book_appointment/search_doctor_by_name.dart
+++ b/lib/presentation/book_appointment/search_doctor_by_name.dart
@@ -47,7 +47,7 @@ class _SearchDoctorByNameState extends State {
Widget build(BuildContext context) {
bookAppointmentsViewModel = Provider.of(context, listen: false);
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Column(
children: [
Expanded(
@@ -150,9 +150,9 @@ class _SearchDoctorByNameState extends State {
onPressed: () {
bookAppointmentsVM.sortFilteredDoctorList(true);
},
- backgroundColor: bookAppointmentsVM.isSortByClinic ? AppColors.bgRedLightColor : AppColors.whiteColor,
+ backgroundColor: bookAppointmentsVM.isSortByClinic ? AppColors.secondaryLightRedColor : AppColors.whiteColor,
borderColor: bookAppointmentsVM.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withOpacity(0.2),
- textColor: bookAppointmentsVM.isSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor,
+ textColor: bookAppointmentsVM.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor,
fontSize: 12,
fontWeight: FontWeight.w500,
borderRadius: 10,
@@ -165,9 +165,9 @@ class _SearchDoctorByNameState extends State {
onPressed: () {
bookAppointmentsVM.sortFilteredDoctorList(false);
},
- backgroundColor: bookAppointmentsVM.isSortByClinic ? AppColors.whiteColor : AppColors.bgRedLightColor,
+ backgroundColor: bookAppointmentsVM.isSortByClinic ? AppColors.whiteColor : AppColors.secondaryLightRedColor,
borderColor: bookAppointmentsVM.isSortByClinic ? AppColors.textColor.withOpacity(0.2) : AppColors.primaryRedColor,
- textColor: bookAppointmentsVM.isSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor,
+ textColor: bookAppointmentsVM.isSortByClinic ? AppColors.textColor : AppColors.primaryRedColor,
fontSize: 12,
fontWeight: FontWeight.w500,
borderRadius: 10,
@@ -232,7 +232,7 @@ class _SearchDoctorByNameState extends State {
onPressed: () {},
backgroundColor: AppColors.greyColor,
borderColor: AppColors.greyColor,
- textColor: AppColors.blackColor,
+ textColor: AppColors.textColor,
fontSize: 10,
fontWeight: FontWeight.w500,
borderRadius: 8,
diff --git a/lib/presentation/book_appointment/select_clinic_page.dart b/lib/presentation/book_appointment/select_clinic_page.dart
index aebb90fd..6deb07bf 100644
--- a/lib/presentation/book_appointment/select_clinic_page.dart
+++ b/lib/presentation/book_appointment/select_clinic_page.dart
@@ -101,7 +101,7 @@ class _SelectClinicPageState extends State {
);
} else {
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: CollapsingListView(
title: bookAppointmentsViewModel.isLiveCareSchedule ? LocaleKeys.selectLiveCareClinic.tr(context: context) : LocaleKeys.selectClinic.tr(context: context),
child: SingleChildScrollView(
diff --git a/lib/presentation/book_appointment/select_doctor_page.dart b/lib/presentation/book_appointment/select_doctor_page.dart
index 1fc9d9ad..fdd6ba80 100644
--- a/lib/presentation/book_appointment/select_doctor_page.dart
+++ b/lib/presentation/book_appointment/select_doctor_page.dart
@@ -73,7 +73,7 @@ class _SelectDoctorPageState extends State {
bookAppointmentsViewModel = Provider.of(context, listen: false);
appState = getIt.get();
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: CollapsingListView(
title: LocaleKeys.chooseDoctor.tr(context: context),
// bottomChild: Container(
@@ -193,9 +193,9 @@ class _SelectDoctorPageState extends State {
onPressed: () {
bookAppointmentsVM.setIsSortByClinic(true);
},
- backgroundColor: bookAppointmentsVM.isSortByClinic ? AppColors.bgRedLightColor : AppColors.whiteColor,
+ backgroundColor: bookAppointmentsVM.isSortByClinic ? AppColors.secondaryLightRedColor : AppColors.whiteColor,
borderColor: bookAppointmentsVM.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor.withOpacity(0.2),
- textColor: bookAppointmentsVM.isSortByClinic ? AppColors.primaryRedColor : AppColors.blackColor,
+ textColor: bookAppointmentsVM.isSortByClinic ? AppColors.primaryRedColor : AppColors.textColor,
fontSize: 12,
fontWeight: FontWeight.w500,
borderRadius: 10,
@@ -208,9 +208,9 @@ class _SelectDoctorPageState extends State {
onPressed: () {
bookAppointmentsVM.setIsSortByClinic(false);
},
- backgroundColor: bookAppointmentsVM.isSortByClinic ? AppColors.whiteColor : AppColors.bgRedLightColor,
+ backgroundColor: bookAppointmentsVM.isSortByClinic ? AppColors.whiteColor : AppColors.secondaryLightRedColor,
borderColor: bookAppointmentsVM.isSortByClinic ? AppColors.textColor.withOpacity(0.2) : AppColors.primaryRedColor,
- textColor: bookAppointmentsVM.isSortByClinic ? AppColors.blackColor : AppColors.primaryRedColor,
+ textColor: bookAppointmentsVM.isSortByClinic ? AppColors.textColor : AppColors.primaryRedColor,
fontSize: 12,
fontWeight: FontWeight.w500,
borderRadius: 10,
@@ -299,7 +299,7 @@ class _SelectDoctorPageState extends State {
onPressed: () {},
backgroundColor: AppColors.greyColor,
borderColor: AppColors.greyColor,
- textColor: AppColors.blackColor,
+ textColor: AppColors.textColor,
fontSize: 10,
fontWeight: FontWeight.w500,
borderRadius: 8,
diff --git a/lib/presentation/book_appointment/select_livecare_clinic_page.dart b/lib/presentation/book_appointment/select_livecare_clinic_page.dart
index 87ab0eb5..e7c7ebda 100644
--- a/lib/presentation/book_appointment/select_livecare_clinic_page.dart
+++ b/lib/presentation/book_appointment/select_livecare_clinic_page.dart
@@ -33,7 +33,7 @@ class SelectLivecareClinicPage extends StatelessWidget {
Widget build(BuildContext context) {
immediateLiveCareViewModel = Provider.of(context, listen: false);
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Column(
children: [
Expanded(
diff --git a/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_info.dart b/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_info.dart
index 19d0fb41..cfa237e5 100644
--- a/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_info.dart
+++ b/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_info.dart
@@ -23,7 +23,7 @@ class WaitingAppointmentInfo extends StatelessWidget {
Widget build(BuildContext context) {
bookAppointmentsViewModel = Provider.of(context, listen: false);
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Column(
children: [
Expanded(
diff --git a/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_online_checkin_sheet.dart b/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_online_checkin_sheet.dart
index 6f3a773a..93aea262 100644
--- a/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_online_checkin_sheet.dart
+++ b/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_online_checkin_sheet.dart
@@ -119,7 +119,7 @@ class WaitingAppointmentOnlineCheckinSheet extends StatelessWidget {
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 18.h,
height: 13.h,
fit: BoxFit.contain,
diff --git a/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_payment_page.dart b/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_payment_page.dart
index abd8d102..30320d92 100644
--- a/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_payment_page.dart
+++ b/lib/presentation/book_appointment/waiting_appointment/waiting_appointment_payment_page.dart
@@ -88,7 +88,7 @@ class _WaitingAppointmentPaymentPageState extends State(context);
payfortViewModel = Provider.of(context);
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Consumer(builder: (context, bookAppointmentsVM, child) {
return Column(
children: [
@@ -123,7 +123,7 @@ class _WaitingAppointmentPaymentPageState extends State {
children: [
Lottie.asset(AppAnimations.errorAnimation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill),
SizedBox(height: 8.h),
- (LocaleKeys.loginToUseService.tr(context: context)).toText16(color: AppColors.blackColor),
+ (LocaleKeys.loginToUseService.tr(context: context)).toText16(color: AppColors.textColor),
SizedBox(height: 16.h),
Row(
children: [
diff --git a/lib/presentation/child_vaccine/my_child_vaccine_page.dart b/lib/presentation/child_vaccine/my_child_vaccine_page.dart
index 6a226ab4..0d43035d 100644
--- a/lib/presentation/child_vaccine/my_child_vaccine_page.dart
+++ b/lib/presentation/child_vaccine/my_child_vaccine_page.dart
@@ -48,7 +48,7 @@
// Widget build(BuildContext context) {
// appState = getIt();
// return Scaffold(
-// backgroundColor: AppColors.bgScaffoldColor,
+// backgroundColor: AppColors.scaffoldBgColor,
// body: Consumer(builder: (context, bloodDonationVM, child) {
// return Column(
// children: [
@@ -59,8 +59,8 @@
// icon: AppAssets.add_icon,
// text: "Add Child",
// onPressed: () {},
-// backgroundColor: AppColors.bgRedLightColor,
-// borderColor: AppColors.bgRedLightColor,
+// backgroundColor: AppColors.secondaryLightRedColor,
+// borderColor: AppColors.secondaryLightRedColor,
// textColor: AppColors.primaryRedColor,
// iconColor: AppColors.primaryRedColor,
// padding: EdgeInsetsGeometry.symmetric(vertical: 0.h, horizontal: 10.h)),
@@ -233,7 +233,7 @@ class _MyChildVaccinePageState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Column(
children: [
Expanded(
@@ -243,8 +243,8 @@ class _MyChildVaccinePageState extends State {
icon: AppAssets.add_icon,
text: "Add Child",
onPressed: () {},
- backgroundColor: AppColors.bgRedLightColor,
- borderColor: AppColors.bgRedLightColor,
+ backgroundColor: AppColors.secondaryLightRedColor,
+ borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor,
iconColor: AppColors.primaryRedColor,
padding: EdgeInsets.symmetric(vertical: 0.h, horizontal: 10.w),
@@ -292,7 +292,7 @@ class _MyChildVaccinePageState extends State {
child: Container(
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 8.h),
decoration: BoxDecoration(
- color: isSelected ? AppColors.bgRedLightColor : AppColors.whiteColor,
+ color: isSelected ? AppColors.secondaryLightRedColor : AppColors.whiteColor,
borderRadius: BorderRadius.circular(12.r),
border: Border.all(
color: isSelected ? AppColors.primaryRedColor : AppColors.borderOnlyColor.withValues(alpha: 0.1),
@@ -335,7 +335,7 @@ class _MyChildVaccinePageState extends State {
Container(
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 8.h),
decoration: BoxDecoration(
- color: AppColors.bgScaffoldColor,
+ color: AppColors.scaffoldBgColor,
borderRadius: BorderRadius.circular(8.r),
),
child: Row(
@@ -362,7 +362,7 @@ class _MyChildVaccinePageState extends State {
CustomButton(
text: "Send via email",
onPressed: () {},
- backgroundColor: AppColors.bgRedLightColor,
+ backgroundColor: AppColors.secondaryLightRedColor,
borderColor: Colors.transparent,
textColor: AppColors.primaryRedColor,
icon: AppAssets.email,
diff --git a/lib/presentation/comprehensive_checkup/cmc_selection_review_page.dart b/lib/presentation/comprehensive_checkup/cmc_selection_review_page.dart
index 840d38cf..2b11b899 100644
--- a/lib/presentation/comprehensive_checkup/cmc_selection_review_page.dart
+++ b/lib/presentation/comprehensive_checkup/cmc_selection_review_page.dart
@@ -94,7 +94,7 @@ class _CmcSelectionReviewPageState extends State {
style: TextStyle(
fontSize: 16.f,
fontWeight: FontWeight.w700,
- color: AppColors.blackColor,
+ color: AppColors.textColor,
letterSpacing: -0.5,
),
),
@@ -117,7 +117,7 @@ class _CmcSelectionReviewPageState extends State {
child: Container(
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 14.h),
decoration: BoxDecoration(
- color: AppColors.bgScaffoldColor,
+ color: AppColors.scaffoldBgColor,
borderRadius: BorderRadius.circular(12.r),
border: Border.all(
color: AppColors.greyColor.withAlpha(51),
@@ -137,7 +137,7 @@ class _CmcSelectionReviewPageState extends State {
style: TextStyle(
fontSize: 14.f,
fontWeight: isLocationSelected ? FontWeight.w600 : FontWeight.w400,
- color: isLocationSelected ? AppColors.blackColor : AppColors.greyTextColor,
+ color: isLocationSelected ? AppColors.textColor : AppColors.greyTextColor,
letterSpacing: -0.4,
),
),
@@ -198,7 +198,7 @@ class _CmcSelectionReviewPageState extends State {
SizedBox(height: 6.h),
Row(
children: [
- Expanded(child: serviceName.toText16(weight: FontWeight.w700, color: AppColors.blackColor, letterSpacing: -0.5)),
+ Expanded(child: serviceName.toText16(weight: FontWeight.w700, color: AppColors.textColor, letterSpacing: -0.5)),
],
),
],
@@ -237,7 +237,7 @@ class _CmcSelectionReviewPageState extends State {
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(
amountBeforeTax.toString().toText16(isBold: true),
- AppColors.blackColor,
+ AppColors.textColor,
13,
isSaudiCurrency: true,
),
@@ -265,7 +265,7 @@ class _CmcSelectionReviewPageState extends State {
"".toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(
totalAmount.toString().toText24(isBold: true),
- AppColors.blackColor,
+ AppColors.textColor,
17,
isSaudiCurrency: true,
),
diff --git a/lib/presentation/comprehensive_checkup/comprehensive_checkup_page.dart b/lib/presentation/comprehensive_checkup/comprehensive_checkup_page.dart
index da926cd2..55e978a7 100644
--- a/lib/presentation/comprehensive_checkup/comprehensive_checkup_page.dart
+++ b/lib/presentation/comprehensive_checkup/comprehensive_checkup_page.dart
@@ -239,7 +239,7 @@ class _ComprehensiveCheckupPageState extends State {
style: TextStyle(
fontSize: 20.h,
fontWeight: FontWeight.w700,
- color: AppColors.blackColor,
+ color: AppColors.textColor,
letterSpacing: -0.8,
),
).paddingOnly(left: 16.w, right: 16.w),
@@ -259,7 +259,7 @@ class _ComprehensiveCheckupPageState extends State {
subtitleWidget: Utils.getPaymentAmountWithSymbol(
isExpanded: false,
price.toString().toText14(),
- AppColors.blackColor,
+ AppColors.textColor,
14,
isSaudiCurrency: true,
),
diff --git a/lib/presentation/comprehensive_checkup/widgets/cmc_hospital_list_item.dart b/lib/presentation/comprehensive_checkup/widgets/cmc_hospital_list_item.dart
index 25cd5068..086dc23d 100644
--- a/lib/presentation/comprehensive_checkup/widgets/cmc_hospital_list_item.dart
+++ b/lib/presentation/comprehensive_checkup/widgets/cmc_hospital_list_item.dart
@@ -55,7 +55,7 @@ class CmcHospitalListItem extends StatelessWidget {
flipX: isArabic,
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 18.h,
height: 13.h,
fit: BoxFit.contain,
@@ -79,7 +79,7 @@ class CmcHospitalListItem extends StatelessWidget {
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 16,
- color: AppColors.blackColor,
+ color: AppColors.textColor,
),
),
)
@@ -108,7 +108,7 @@ class CmcHospitalListItem extends StatelessWidget {
visible: (hospital.distanceInKilometers == null || hospital.distanceInKilometers == 0),
child: AppCustomChipWidget(
labelText: " Distance not available",
- textColor: AppColors.blackColor,
+ textColor: AppColors.textColor,
),
),
// Visibility(
@@ -117,7 +117,7 @@ class CmcHospitalListItem extends StatelessWidget {
// labelText: "Location turned off".needTranslation,
// deleteIcon: AppAssets.location_unavailable,
// deleteIconSize: Size(9.w, 12.h),
- // textColor: AppColors.blackColor,
+ // textColor: AppColors.textColor,
// ),
// ),
],
diff --git a/lib/presentation/contact_us/contact_us.dart b/lib/presentation/contact_us/contact_us.dart
index fd0a439b..7ab856fd 100644
--- a/lib/presentation/contact_us/contact_us.dart
+++ b/lib/presentation/contact_us/contact_us.dart
@@ -113,7 +113,7 @@ class ContactUs extends StatelessWidget {
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 18.h,
height: 13.h,
fit: BoxFit.contain,
diff --git a/lib/presentation/contact_us/feedback_page.dart b/lib/presentation/contact_us/feedback_page.dart
index 93954af9..7dcad836 100644
--- a/lib/presentation/contact_us/feedback_page.dart
+++ b/lib/presentation/contact_us/feedback_page.dart
@@ -45,7 +45,7 @@ class FeedbackPage extends StatelessWidget {
medicalFileViewModel = Provider.of(context, listen: false);
appState = getIt.get();
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Consumer(builder: (context, contactUsVM, child) {
return Column(
children: [
diff --git a/lib/presentation/contact_us/find_us_page.dart b/lib/presentation/contact_us/find_us_page.dart
index 5957bb83..eecbaef1 100644
--- a/lib/presentation/contact_us/find_us_page.dart
+++ b/lib/presentation/contact_us/find_us_page.dart
@@ -26,7 +26,7 @@ class FindUsPage extends StatelessWidget {
contactUsViewModel = Provider.of(context);
appState = getIt.get();
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: CollapsingListView(
title: LocaleKeys.location.tr(),
child: Consumer(builder: (context, contactUsVM, child) {
diff --git a/lib/presentation/contact_us/live_chat_page.dart b/lib/presentation/contact_us/live_chat_page.dart
index a602eb14..9e4f651c 100644
--- a/lib/presentation/contact_us/live_chat_page.dart
+++ b/lib/presentation/contact_us/live_chat_page.dart
@@ -36,7 +36,7 @@ class LiveChatPage extends StatelessWidget {
appState = getIt.get();
authVm = context.read();
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Consumer(builder: (context, contactUsVM, child) {
return Column(
children: [
@@ -185,7 +185,7 @@ class LiveChatPage extends StatelessWidget {
children: [
Lottie.asset(AppAnimations.errorAnimation, repeat: true, reverse: false, frameRate: FrameRate(60), width: 100.h, height: 100.h, fit: BoxFit.fill),
SizedBox(height: 8.h),
- (LocaleKeys.loginToUseService.tr(context: context)).toText16(color: AppColors.blackColor),
+ (LocaleKeys.loginToUseService.tr(context: context)).toText16(color: AppColors.textColor),
SizedBox(height: 16.h),
Row(
children: [
diff --git a/lib/presentation/contact_us/widgets/find_us_item_card.dart b/lib/presentation/contact_us/widgets/find_us_item_card.dart
index 1774404d..efde664f 100644
--- a/lib/presentation/contact_us/widgets/find_us_item_card.dart
+++ b/lib/presentation/contact_us/widgets/find_us_item_card.dart
@@ -59,7 +59,7 @@ class FindUsItemCard extends StatelessWidget {
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 16,
- color: AppColors.blackColor,
+ color: AppColors.textColor,
),
),
)
diff --git a/lib/presentation/covid19test/covid19_landing_page.dart b/lib/presentation/covid19test/covid19_landing_page.dart
index a241da60..b9a26a27 100644
--- a/lib/presentation/covid19test/covid19_landing_page.dart
+++ b/lib/presentation/covid19test/covid19_landing_page.dart
@@ -41,7 +41,7 @@ class _Covid19LandingPageState extends State {
Widget build(BuildContext context) {
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Column(
children: [
Expanded(
diff --git a/lib/presentation/covid19test/covid_payment_screen.dart b/lib/presentation/covid19test/covid_payment_screen.dart
index e395a426..e760903d 100644
--- a/lib/presentation/covid19test/covid_payment_screen.dart
+++ b/lib/presentation/covid19test/covid_payment_screen.dart
@@ -87,7 +87,7 @@ class _CovidPaymentScreenState extends State {
payfortViewModel = Provider.of(context);
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: CollapsingListView(
title: widget.title,
bottomChild: Container(
@@ -106,7 +106,7 @@ class _CovidPaymentScreenState extends State {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
- Utils.getPaymentAmountWithSymbol(( (widget.amount - widget.taxAmount).toString()).toText16(isBold: true), AppColors.blackColor, 13, isSaudiCurrency: true),
+ Utils.getPaymentAmountWithSymbol(( (widget.amount - widget.taxAmount).toString()).toText16(isBold: true), AppColors.textColor, 13, isSaudiCurrency: true),
],
).paddingSymmetrical(24.h, 0.h),
Row(
@@ -122,7 +122,7 @@ class _CovidPaymentScreenState extends State {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"".toText14(isBold: true),
- Utils.getPaymentAmountWithSymbol(widget.amount.toString().toText24(isBold: true), AppColors.blackColor, 17, isSaudiCurrency: true),
+ Utils.getPaymentAmountWithSymbol(widget.amount.toString().toText24(isBold: true), AppColors.textColor, 17, isSaudiCurrency: true),
],
).paddingSymmetrical(24.h, 0.h),
@@ -221,7 +221,7 @@ class _CovidPaymentScreenState extends State {
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 18.h,
height: 13.h,
fit: BoxFit.contain,
@@ -266,7 +266,7 @@ class _CovidPaymentScreenState extends State {
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 18.h,
height: 13.h,
fit: BoxFit.contain,
@@ -321,7 +321,7 @@ class _CovidPaymentScreenState extends State {
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 18.h,
height: 13.h,
fit: BoxFit.contain,
diff --git a/lib/presentation/covid19test/covid_review_screen.dart b/lib/presentation/covid19test/covid_review_screen.dart
index 34401298..43a11d20 100644
--- a/lib/presentation/covid19test/covid_review_screen.dart
+++ b/lib/presentation/covid19test/covid_review_screen.dart
@@ -78,7 +78,7 @@ class _CovidReviewScreenState extends State {
LocaleKeys.amountBeforeTax.tr(context: context).toText18(isBold: true),
Utils.getPaymentAmountWithSymbol(
(info.patientShareField ?? 0).toString().toText16(isBold: true),
- AppColors.blackColor,
+ AppColors.textColor,
13,
isSaudiCurrency: true),
],
@@ -90,7 +90,7 @@ class _CovidReviewScreenState extends State {
LocaleKeys.vat15.tr(context: context).toText14(isBold: true),
Utils.getPaymentAmountWithSymbol(
(info.patientTaxAmountField ?? 0).toString().toText16(isBold: true),
- AppColors.blackColor,
+ AppColors.textColor,
13,
isSaudiCurrency: true)
],
@@ -108,7 +108,7 @@ class _CovidReviewScreenState extends State {
children: [
Utils.getPaymentAmountWithSymbol(
(info.patientShareWithTaxField ?? 0).toString().toText24(isBold: true),
- AppColors.blackColor,
+ AppColors.textColor,
17,
isSaudiCurrency: true),
],
diff --git a/lib/presentation/e_referral/new_e_referral.dart b/lib/presentation/e_referral/new_e_referral.dart
index 02881730..7951a398 100644
--- a/lib/presentation/e_referral/new_e_referral.dart
+++ b/lib/presentation/e_referral/new_e_referral.dart
@@ -157,7 +157,7 @@ class _NewReferralPageState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: CollapsingListView(
title: LocaleKeys.eReferral.tr(context: context),
isClose: false,
diff --git a/lib/presentation/e_referral/widget/e-referral_otp.dart b/lib/presentation/e_referral/widget/e-referral_otp.dart
index 390fc71f..0dfb1a55 100644
--- a/lib/presentation/e_referral/widget/e-referral_otp.dart
+++ b/lib/presentation/e_referral/widget/e-referral_otp.dart
@@ -89,7 +89,7 @@ class OTPService {
}
},
backgroundColor: AppColors.primaryRedColor,
- borderColor: AppColors.primaryRedBorderColor,
+ borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
icon: AppAssets.message,
),
diff --git a/lib/presentation/emergency_services/RRT/rrt_map_screen.dart b/lib/presentation/emergency_services/RRT/rrt_map_screen.dart
index 530152b1..08ff5622 100644
--- a/lib/presentation/emergency_services/RRT/rrt_map_screen.dart
+++ b/lib/presentation/emergency_services/RRT/rrt_map_screen.dart
@@ -440,7 +440,7 @@ class RrtMapScreen extends StatelessWidget {
fontWeight: FontWeight.w600,
color: AppColors.textColor,
letterSpacing: -2),
- AppColors.blackColor,
+ AppColors.textColor,
17.h)
// Utils.getPaymentAmountWithSymbol2(context.read().selectedTransportOption?.priceTotal??"0", letterSpacing: -2)
diff --git a/lib/presentation/emergency_services/RRT/rrt_request_type_select.dart b/lib/presentation/emergency_services/RRT/rrt_request_type_select.dart
index 91db0ded..5e7f4061 100644
--- a/lib/presentation/emergency_services/RRT/rrt_request_type_select.dart
+++ b/lib/presentation/emergency_services/RRT/rrt_request_type_select.dart
@@ -80,7 +80,7 @@ class RrtRequestTypeSelect extends StatelessWidget {
Utils.getPaymentAmountWithSymbol(
(Utils.formatNumberToInternationalFormat(context.read().selectedRRTProcedure?.patientShare ?? 0))
.toText24(fontWeight: FontWeight.w600, color: AppColors.textColor, letterSpacing: -2),
- AppColors.blackColor,
+ AppColors.textColor,
17.h)
],
),
@@ -140,7 +140,7 @@ class RrtRequestTypeSelect extends StatelessWidget {
Utils.getPaymentAmountWithSymbol(
(Utils.formatNumberToInternationalFormat(context.read().selectedRRTProcedure?.patientShareWithTax ?? 0))
.toText24(fontWeight: FontWeight.w600, color: AppColors.textColor, letterSpacing: -2),
- AppColors.blackColor,
+ AppColors.textColor,
17.h),
],
)
diff --git a/lib/presentation/emergency_services/call_ambulance/call_ambulance_page.dart b/lib/presentation/emergency_services/call_ambulance/call_ambulance_page.dart
index 5a368a3b..19a61a8e 100644
--- a/lib/presentation/emergency_services/call_ambulance/call_ambulance_page.dart
+++ b/lib/presentation/emergency_services/call_ambulance/call_ambulance_page.dart
@@ -448,7 +448,7 @@ class CallAmbulancePage extends StatelessWidget {
Utils.getPaymentAmountWithSymbol(
(Utils.formatNumberToInternationalFormat(context.read().getTotalPrice() ?? 0))
.toText24(fontWeight: FontWeight.w600, color: AppColors.textColor, letterSpacing: -2),
- AppColors.blackColor,
+ AppColors.textColor,
17.h)
// Utils.getPaymentAmountWithSymbol2(context.read().selectedTransportOption?.priceTotal??"0", letterSpacing: -2)
diff --git a/lib/presentation/emergency_services/call_ambulance/tracking_screen.dart b/lib/presentation/emergency_services/call_ambulance/tracking_screen.dart
index 9a49dd06..b6b9215c 100644
--- a/lib/presentation/emergency_services/call_ambulance/tracking_screen.dart
+++ b/lib/presentation/emergency_services/call_ambulance/tracking_screen.dart
@@ -476,11 +476,11 @@ class TrackingScreen extends StatelessWidget {
spacing: 8.h,
children: [
Flexible(child:
- chip(order?.pickupLocation??"", AppAssets.location_pickup, AppColors.blackBgColor),
+ chip(order?.pickupLocation??"", AppAssets.location_pickup, AppColors.textColor),
),
Flexible(child:
- chip(order?.dropOffLocation??"", AppAssets.hospital, AppColors.blackBgColor),
+ chip(order?.dropOffLocation??"", AppAssets.hospital, AppColors.textColor),
)
],
@@ -492,11 +492,11 @@ class TrackingScreen extends StatelessWidget {
// spacing: 8.h,
// children: [
// Flexible(child:
- // chip(rrtOrder?.pickupLocation??"", AppAssets.location_pickup, AppColors.blackBgColor),
+ // chip(rrtOrder?.pickupLocation??"", AppAssets.location_pickup, AppColors.textColor),
//
// ),
// // Flexible(child:
- // // chip(rrtOrder?.??"", AppAssets.hospital, AppColors.blackBgColor),
+ // // chip(rrtOrder?.??"", AppAssets.hospital, AppColors.textColor),
// //
// // )
// ],
diff --git a/lib/presentation/emergency_services/call_ambulance/widgets/AddressItem.dart b/lib/presentation/emergency_services/call_ambulance/widgets/AddressItem.dart
index 13e32561..80f821c0 100644
--- a/lib/presentation/emergency_services/call_ambulance/widgets/AddressItem.dart
+++ b/lib/presentation/emergency_services/call_ambulance/widgets/AddressItem.dart
@@ -36,7 +36,7 @@ class AddressItem extends StatelessWidget {
child: CircleAvatar(
radius: 70.h,
backgroundColor:
- isSelected ? AppColors.errorLightColor : Colors.transparent,
+ isSelected ? AppColors.primaryRedColor : Colors.transparent,
).paddingAll(3.h),
),
),
diff --git a/lib/presentation/emergency_services/call_ambulance/widgets/type_selection_widget.dart b/lib/presentation/emergency_services/call_ambulance/widgets/type_selection_widget.dart
index 3ae93d0d..b3be6c30 100644
--- a/lib/presentation/emergency_services/call_ambulance/widgets/type_selection_widget.dart
+++ b/lib/presentation/emergency_services/call_ambulance/widgets/type_selection_widget.dart
@@ -34,7 +34,7 @@ class TypeSelectionWidget extends StatelessWidget {
side: BorderSide(
color: selectedFacility == FacilitySelection.ALL
? AppColors.errorColor
- : AppColors.chipBorderColorOpacity20,
+ : AppColors.borderGrayColor,
width: 1,
),
borderRadius: BorderRadius.circular(10)),
@@ -42,7 +42,7 @@ class TypeSelectionWidget extends StatelessWidget {
selectedFacility == FacilitySelection.ALL
?AppColors.secondaryLightRedColor: AppColors.whiteColor,
textColor: selectedFacility == FacilitySelection.ALL
- ? AppColors.errorColor:AppColors.blackColor
+ ? AppColors.errorColor:AppColors.textColor
,
).onPress((){
onitemClicked(FacilitySelection.ALL);
@@ -57,7 +57,7 @@ class TypeSelectionWidget extends StatelessWidget {
side: BorderSide(
color: selectedFacility == FacilitySelection.HMG
? AppColors.errorColor
- : AppColors.chipBorderColorOpacity20,
+ : AppColors.borderGrayColor,
width: 1,
),
borderRadius: BorderRadius.circular(10)),
@@ -66,7 +66,7 @@ class TypeSelectionWidget extends StatelessWidget {
?AppColors.secondaryLightRedColor: AppColors.whiteColor,
textColor: selectedFacility == FacilitySelection.HMG
? AppColors.errorColor
- : AppColors.blackColor,
+ : AppColors.textColor,
).onPress((){
onitemClicked(FacilitySelection.HMG);
}),
@@ -81,7 +81,7 @@ class TypeSelectionWidget extends StatelessWidget {
side: BorderSide(
color: selectedFacility == FacilitySelection.HMC
? AppColors.errorColor
- : AppColors.chipBorderColorOpacity20,
+ : AppColors.borderGrayColor,
width: 1,
),
borderRadius: BorderRadius.circular(10)),
@@ -90,7 +90,7 @@ class TypeSelectionWidget extends StatelessWidget {
?AppColors.secondaryLightRedColor: AppColors.whiteColor,
textColor: selectedFacility == FacilitySelection.HMC
? AppColors.errorColor
- : AppColors.blackColor,
+ : AppColors.textColor,
).onPress((){
onitemClicked(FacilitySelection.HMC);
}),
diff --git a/lib/presentation/emergency_services/emergency_services_page.dart b/lib/presentation/emergency_services/emergency_services_page.dart
index a5281ca0..61d09d90 100644
--- a/lib/presentation/emergency_services/emergency_services_page.dart
+++ b/lib/presentation/emergency_services/emergency_services_page.dart
@@ -59,7 +59,7 @@ class EmergencyServicesPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- LocaleKeys.callAmbulance.tr().toText16(isBold: true, color: AppColors.blackColor),
+ LocaleKeys.callAmbulance.tr().toText16(isBold: true, color: AppColors.textColor),
LocaleKeys.requestAmbulanceInEmergency.tr()
.toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
],
@@ -146,7 +146,7 @@ class EmergencyServicesPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- LocaleKeys.nearester.tr(context: context).toText16(isBold: true, color: AppColors.blackColor),
+ LocaleKeys.nearester.tr(context: context).toText16(isBold: true, color: AppColors.textColor),
LocaleKeys.getDetailsOfNearestBranch.tr()
.toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
],
@@ -175,7 +175,7 @@ class EmergencyServicesPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- LocaleKeys.rapidResponseTeam.tr(context: context).toText16(isBold: true, color: AppColors.blackColor),
+ LocaleKeys.rapidResponseTeam.tr(context: context).toText16(isBold: true, color: AppColors.textColor),
"Comprehensive medical service for all sorts of urgent and stable cases"
.toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
],
@@ -274,7 +274,7 @@ class EmergencyServicesPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- LocaleKeys.emergencyCheckIn.tr(context: context).toText16(isBold: true, color: AppColors.blackColor),
+ LocaleKeys.emergencyCheckIn.tr(context: context).toText16(isBold: true, color: AppColors.textColor),
LocaleKeys.priorERCheckInToSkipLine.tr()
.toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
],
diff --git a/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_home.dart b/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_home.dart
index 7f206c17..abb4a04e 100644
--- a/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_home.dart
+++ b/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_home.dart
@@ -36,7 +36,7 @@ class ErOnlineCheckinHome extends StatelessWidget {
_supportsNFC = (value == NFCAvailability.available);
});
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Column(
children: [
Expanded(
diff --git a/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_payment_details_page.dart b/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_payment_details_page.dart
index 463121d9..418917a4 100644
--- a/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_payment_details_page.dart
+++ b/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_payment_details_page.dart
@@ -29,7 +29,7 @@ class ErOnlineCheckinPaymentDetailsPage extends StatelessWidget {
appState = getIt.get();
emergencyServicesViewModel = Provider.of(context, listen: false);
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Column(
children: [
Expanded(
@@ -109,7 +109,7 @@ class ErOnlineCheckinPaymentDetailsPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.amountBeforeTax.tr().toText18(isBold: true),
- Utils.getPaymentAmountWithSymbol(emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShare.toString().toText16(isBold: true), AppColors.blackColor, 13,
+ Utils.getPaymentAmountWithSymbol(emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShare.toString().toText16(isBold: true), AppColors.textColor, 13,
isSaudiCurrency: true),
],
),
@@ -135,7 +135,7 @@ class ErOnlineCheckinPaymentDetailsPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Utils.getPaymentAmountWithSymbol(
- emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax.toString().toText24(isBold: true), AppColors.blackColor, 17,
+ emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax.toString().toText24(isBold: true), AppColors.textColor, 17,
isSaudiCurrency: true),
],
),
diff --git a/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_payment_page.dart b/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_payment_page.dart
index 26456794..e3eef7ec 100644
--- a/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_payment_page.dart
+++ b/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_payment_page.dart
@@ -76,7 +76,7 @@ class _ErOnlineCheckinPaymentPageState extends State
payfortViewModel = Provider.of(context, listen: false);
emergencyServicesViewModel = Provider.of(context, listen: false);
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Column(
children: [
Expanded(
@@ -109,7 +109,7 @@ class _ErOnlineCheckinPaymentPageState extends State
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 40.h,
height: 40.h,
fit: BoxFit.contain,
@@ -151,7 +151,7 @@ class _ErOnlineCheckinPaymentPageState extends State
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 40.h,
height: 40.h,
fit: BoxFit.contain,
@@ -188,7 +188,7 @@ class _ErOnlineCheckinPaymentPageState extends State
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 40.h,
height: 40.h,
fit: BoxFit.contain,
@@ -221,7 +221,7 @@ class _ErOnlineCheckinPaymentPageState extends State
? Container(
height: 50.h,
decoration: ShapeDecoration(
- color: AppColors.secondaryLightRedBorderColor,
+ color: AppColors.secondaryLightRedColor,
shape: SmoothRectangleBorder(
borderRadius: BorderRadius.only(topLeft: Radius.circular(24), topRight: Radius.circular(24)),
smoothness: 1,
@@ -241,7 +241,7 @@ class _ErOnlineCheckinPaymentPageState extends State
);
},
backgroundColor: AppColors.primaryRedColor,
- borderColor: AppColors.secondaryLightRedBorderColor,
+ borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.whiteColor,
fontSize: 10,
fontWeight: FontWeight.w500,
@@ -260,7 +260,7 @@ class _ErOnlineCheckinPaymentPageState extends State
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.amountBeforeTax.tr(context: context).toText14(isBold: true),
- Utils.getPaymentAmountWithSymbol(emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShare.toString().toText16(isBold: true), AppColors.blackColor, 13,
+ Utils.getPaymentAmountWithSymbol(emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShare.toString().toText16(isBold: true), AppColors.textColor, 13,
isSaudiCurrency: true),
],
).paddingSymmetrical(24.h, 0.h),
@@ -278,7 +278,7 @@ class _ErOnlineCheckinPaymentPageState extends State
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
"".toText14(isBold: true),
- Utils.getPaymentAmountWithSymbol(emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax.toString().toText24(isBold: true), AppColors.blackColor, 17,
+ Utils.getPaymentAmountWithSymbol(emergencyServicesViewModel.erOnlineCheckInPaymentDetailsResponse.patientShareWithTax.toString().toText24(isBold: true), AppColors.textColor, 17,
isSaudiCurrency: true),
],
).paddingSymmetrical(24.h, 0.h),
diff --git a/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_select_checkin_bottom_sheet.dart b/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_select_checkin_bottom_sheet.dart
index 3b2dc8ae..487dcfb0 100644
--- a/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_select_checkin_bottom_sheet.dart
+++ b/lib/presentation/emergency_services/er_online_checkin/er_online_checkin_select_checkin_bottom_sheet.dart
@@ -117,7 +117,7 @@ class ErOnlineCheckinSelectCheckinBottomSheet extends StatelessWidget {
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 18.h,
height: 13.h,
fit: BoxFit.contain,
diff --git a/lib/presentation/emergency_services/history/er_history_listing.dart b/lib/presentation/emergency_services/history/er_history_listing.dart
index a60d4556..4756f6b6 100644
--- a/lib/presentation/emergency_services/history/er_history_listing.dart
+++ b/lib/presentation/emergency_services/history/er_history_listing.dart
@@ -97,12 +97,12 @@ class ErHistoryListing extends StatelessWidget {
labelText: LocaleKeys.allFacilities.tr(context: context),
shape: RoundedRectangleBorder(
side: BorderSide(
- color: value == OrderDislpay.ALL ? AppColors.errorColor : AppColors.chipBorderColorOpacity20,
+ color: value == OrderDislpay.ALL ? AppColors.errorColor : AppColors.borderGrayColor,
width: 1,
),
borderRadius: BorderRadius.circular(10)),
backgroundColor: value == OrderDislpay.ALL ? AppColors.secondaryLightRedColor : AppColors.whiteColor,
- textColor: value == OrderDislpay.ALL ? AppColors.errorColor : AppColors.blackColor,
+ textColor: value == OrderDislpay.ALL ? AppColors.errorColor : AppColors.textColor,
).onPress(() {
context.read().changeOrderDisplayItems(OrderDislpay.ALL);
}).toShimmer2(isShow: isLoading),
@@ -115,12 +115,12 @@ class ErHistoryListing extends StatelessWidget {
icon: AppAssets.ambulance,
shape: RoundedRectangleBorder(
side: BorderSide(
- color: value == OrderDislpay.AMBULANCE ? AppColors.errorColor : AppColors.chipBorderColorOpacity20,
+ color: value == OrderDislpay.AMBULANCE ? AppColors.errorColor : AppColors.borderGrayColor,
width: 1,
),
borderRadius: BorderRadius.circular(10)),
backgroundColor: value == OrderDislpay.AMBULANCE ? AppColors.secondaryLightRedColor : AppColors.whiteColor,
- textColor: value == OrderDislpay.AMBULANCE ? AppColors.errorColor : AppColors.blackColor,
+ textColor: value == OrderDislpay.AMBULANCE ? AppColors.errorColor : AppColors.textColor,
).toShimmer2(isShow: isLoading).onPress(() {
context.read().changeOrderDisplayItems(OrderDislpay.AMBULANCE);
}),
@@ -134,12 +134,12 @@ class ErHistoryListing extends StatelessWidget {
icon: AppAssets.ic_rrt_vehicle,
shape: RoundedRectangleBorder(
side: BorderSide(
- color: value == OrderDislpay.RRT ? AppColors.errorColor : AppColors.chipBorderColorOpacity20,
+ color: value == OrderDislpay.RRT ? AppColors.errorColor : AppColors.borderGrayColor,
width: 1,
),
borderRadius: BorderRadius.circular(10)),
backgroundColor: value == OrderDislpay.RRT ? AppColors.secondaryLightRedColor : AppColors.whiteColor,
- textColor: value == OrderDislpay.RRT ? AppColors.errorColor : AppColors.blackColor,
+ textColor: value == OrderDislpay.RRT ? AppColors.errorColor : AppColors.textColor,
).toShimmer2(isShow: isLoading).onPress(() {
context.read().changeOrderDisplayItems(OrderDislpay.RRT);
}),
diff --git a/lib/presentation/emergency_services/history/widget/ambulance_history_item.dart b/lib/presentation/emergency_services/history/widget/ambulance_history_item.dart
index 7b17eab8..2331393e 100644
--- a/lib/presentation/emergency_services/history/widget/ambulance_history_item.dart
+++ b/lib/presentation/emergency_services/history/widget/ambulance_history_item.dart
@@ -41,8 +41,8 @@ class AmbulanceHistoryItem extends StatelessWidget {
Row(
spacing: 4.w,
children: [
- chip( Utils.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.time)), AppAssets.calendar, AppColors.blackBgColor),
- chip(LocaleKeys.ambulancerequest.tr(context: context), AppAssets.ambulance, AppColors.blackBgColor),
+ chip( Utils.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.time)), AppAssets.calendar, AppColors.textColor),
+ chip(LocaleKeys.ambulancerequest.tr(context: context), AppAssets.ambulance, AppColors.textColor),
],
),
Row(
diff --git a/lib/presentation/emergency_services/history/widget/rrt_item.dart b/lib/presentation/emergency_services/history/widget/rrt_item.dart
index d345e2df..f5130134 100644
--- a/lib/presentation/emergency_services/history/widget/rrt_item.dart
+++ b/lib/presentation/emergency_services/history/widget/rrt_item.dart
@@ -41,8 +41,8 @@ class RRTItem extends StatelessWidget {
Row(
spacing: 4.w,
children: [
- chip( Utils.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.time)), AppAssets.calendar, AppColors.blackBgColor),
- chip(LocaleKeys.rapidResponseTeam.tr(context: context), AppAssets.ic_rrt_vehicle, AppColors.blackBgColor),
+ chip( Utils.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(order.time)), AppAssets.calendar, AppColors.textColor),
+ chip(LocaleKeys.rapidResponseTeam.tr(context: context), AppAssets.ic_rrt_vehicle, AppColors.textColor),
],
),
SizedBox(height: 4.h),
diff --git a/lib/presentation/emergency_services/widgets/location_input_bottom_sheet.dart b/lib/presentation/emergency_services/widgets/location_input_bottom_sheet.dart
index db45654a..eac1426d 100644
--- a/lib/presentation/emergency_services/widgets/location_input_bottom_sheet.dart
+++ b/lib/presentation/emergency_services/widgets/location_input_bottom_sheet.dart
@@ -87,7 +87,7 @@ class LocationInputBottomSheet extends StatelessWidget {
Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 20.h,
height: 15.h,
fit: BoxFit.contain,
diff --git a/lib/presentation/habib_wallet/habib_wallet_page.dart b/lib/presentation/habib_wallet/habib_wallet_page.dart
index c90003a8..5015629e 100644
--- a/lib/presentation/habib_wallet/habib_wallet_page.dart
+++ b/lib/presentation/habib_wallet/habib_wallet_page.dart
@@ -31,7 +31,7 @@ class _HabibWalletState extends State {
habibWalletVM = Provider.of(context, listen: false);
AppState _appState = getIt.get();
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: CollapsingListView(
title: LocaleKeys.myWallet.tr(),
child: Padding(
@@ -44,7 +44,7 @@ class _HabibWalletState extends State {
width: double.infinity,
height: 180.h,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
- color: AppColors.blackBgColor,
+ color: AppColors.textColor,
borderRadius: 24,
),
child: Padding(
diff --git a/lib/presentation/habib_wallet/recharge_wallet_page.dart b/lib/presentation/habib_wallet/recharge_wallet_page.dart
index c4587bf9..51f7b300 100644
--- a/lib/presentation/habib_wallet/recharge_wallet_page.dart
+++ b/lib/presentation/habib_wallet/recharge_wallet_page.dart
@@ -13,8 +13,8 @@ import 'package:hmg_patient_app_new/features/habib_wallet/habib_wallet_view_mode
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/habib_wallet/wallet_payment_confirm_page.dart';
import 'package:hmg_patient_app_new/presentation/habib_wallet/widgets/select_hospital_bottom_sheet.dart';
-import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
+import 'package:hmg_patient_app_new/widgets/appbar/collapsing_list_view.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
import 'package:hmg_patient_app_new/widgets/input_widget.dart';
@@ -41,7 +41,9 @@ class _RechargeWalletPageState extends State {
@override
void initState() {
scheduleMicrotask(() {
- habibWalletVM.setDepositorDetails(appState.getAuthenticatedUser()!.patientId.toString(), "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}",
+ habibWalletVM.setDepositorDetails(
+ appState.getAuthenticatedUser()!.patientId.toString(),
+ "${appState.getAuthenticatedUser()!.firstName} ${appState.getAuthenticatedUser()!.lastName}",
appState.getAuthenticatedUser()!.mobileNumber!);
habibWalletVM.setSelectedRechargeType(0);
habibWalletVM.getProjectsList();
@@ -54,7 +56,7 @@ class _RechargeWalletPageState extends State {
habibWalletVM = Provider.of(context, listen: false);
appState = getIt.get();
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -138,7 +140,8 @@ class _RechargeWalletPageState extends State {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- (habibWalletVM.getSelectedRechargeTypeValue()).toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
+ (habibWalletVM.getSelectedRechargeTypeValue())
+ .toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
"${LocaleKeys.medicalFile.tr(context: context)}: ${habibWalletVM.fileNumber}"
.toText14(color: AppColors.textColor, weight: FontWeight.w500, letterSpacing: -0.2),
],
@@ -164,7 +167,7 @@ class _RechargeWalletPageState extends State {
}), callBackFunc: () {}, isFullScreen: false, isCloseButtonVisible: true);
}),
SizedBox(height: 16.h),
- Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.1), height: 1.h),
+ Divider(color: AppColors.textColor.withValues(alpha: 0.1), height: 1.h),
SizedBox(height: 16.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -176,10 +179,14 @@ class _RechargeWalletPageState extends State {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
- LocaleKeys.hospital.tr(context: context).toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
+ LocaleKeys.hospital
+ .tr(context: context)
+ .toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
SizedBox(
width: MediaQuery.of(context).size.width * 0.55,
- child: (habibWalletVM.selectedHospital != null ? habibWalletVM.selectedHospital!.name : LocaleKeys.selectHospital.tr(context: context))!
+ child: (habibWalletVM.selectedHospital != null
+ ? habibWalletVM.selectedHospital!.name
+ : LocaleKeys.selectHospital.tr(context: context))!
.toText14(color: AppColors.textColor, weight: FontWeight.w500),
),
],
@@ -190,10 +197,13 @@ class _RechargeWalletPageState extends State {
],
).onPress(() {
showCommonBottomSheetWithoutHeight(context,
- title: LocaleKeys.selectHospital.tr(context: context), isDismissible: false, child: SelectHospitalBottomSheet(), callBackFunc: () {});
+ title: LocaleKeys.selectHospital.tr(context: context),
+ isDismissible: false,
+ child: SelectHospitalBottomSheet(),
+ callBackFunc: () {});
}),
SizedBox(height: 16.h),
- Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.1), height: 1.h),
+ Divider(color: AppColors.textColor.withValues(alpha: 0.1), height: 1.h),
SizedBox(height: 16.h),
Row(
children: [
@@ -203,13 +213,14 @@ class _RechargeWalletPageState extends State {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.email.tr(context: context).toText12(color: AppColors.greyTextColor, fontWeight: FontWeight.w500),
- "${appState.getAuthenticatedUser()!.emailAddress}".toText14(color: AppColors.textColor, weight: FontWeight.w500, letterSpacing: -0.2),
+ "${appState.getAuthenticatedUser()!.emailAddress}"
+ .toText14(color: AppColors.textColor, weight: FontWeight.w500, letterSpacing: -0.2),
],
),
],
),
SizedBox(height: 16.h),
- Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.1), height: 1.h),
+ Divider(color: AppColors.textColor.withValues(alpha: 0.1), height: 1.h),
SizedBox(height: 16.h),
TextInputWidget(
labelText: LocaleKeys.notes.tr(context: context),
diff --git a/lib/presentation/habib_wallet/wallet_payment_confirm_page.dart b/lib/presentation/habib_wallet/wallet_payment_confirm_page.dart
index 4585b7d0..73460ce0 100644
--- a/lib/presentation/habib_wallet/wallet_payment_confirm_page.dart
+++ b/lib/presentation/habib_wallet/wallet_payment_confirm_page.dart
@@ -56,7 +56,7 @@ class _WalletPaymentConfirmPageState extends State {
habibWalletVM = Provider.of(context, listen: false);
payfortViewModel = Provider.of(context, listen: false);
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -91,7 +91,7 @@ class _WalletPaymentConfirmPageState extends State {
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 18.h,
height: 13.h,
fit: BoxFit.contain,
@@ -133,7 +133,7 @@ class _WalletPaymentConfirmPageState extends State {
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 18.h,
height: 13.h,
fit: BoxFit.contain,
@@ -175,13 +175,13 @@ class _WalletPaymentConfirmPageState extends State {
],
).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 16.h),
- Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.1), height: 1.h).paddingSymmetrical(24.h, 0.h),
+ Divider(color: AppColors.textColor.withValues(alpha: 0.1), height: 1.h).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 16.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
LocaleKeys.totalAmountToPay.tr(context: context).toText16(isBold: true),
- Utils.getPaymentAmountWithSymbol(habibWalletVM.walletRechargeAmount.toString().toText24(isBold: true), AppColors.blackColor, 15.h, isSaudiCurrency: true),
+ Utils.getPaymentAmountWithSymbol(habibWalletVM.walletRechargeAmount.toString().toText24(isBold: true), AppColors.textColor, 15.h, isSaudiCurrency: true),
],
).paddingSymmetrical(24.h, 0.h),
SizedBox(height: 12.h),
diff --git a/lib/presentation/habib_wallet/widgets/hospital_list_item.dart b/lib/presentation/habib_wallet/widgets/hospital_list_item.dart
index a46f79db..a21d3624 100644
--- a/lib/presentation/habib_wallet/widgets/hospital_list_item.dart
+++ b/lib/presentation/habib_wallet/widgets/hospital_list_item.dart
@@ -39,7 +39,7 @@ class HospitalListItemAdvancePayment extends StatelessWidget {
flipX: appState.isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon,
- iconColor: AppColors.blackColor,
+ iconColor: AppColors.textColor,
width: 40.h,
height: 40.h,
fit: BoxFit.contain,
@@ -61,7 +61,7 @@ class HospitalListItemAdvancePayment extends StatelessWidget {
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 16,
- color: AppColors.blackColor,
+ color: AppColors.textColor,
),
),
)
diff --git a/lib/presentation/habib_wallet/widgets/select-medical_file.dart b/lib/presentation/habib_wallet/widgets/select-medical_file.dart
index 6fed6522..a0fae91c 100644
--- a/lib/presentation/habib_wallet/widgets/select-medical_file.dart
+++ b/lib/presentation/habib_wallet/widgets/select-medical_file.dart
@@ -116,7 +116,7 @@ class _MultiPageBottomSheetState extends State {
onError: (error) {});
},
backgroundColor: AppColors.primaryRedColor,
- borderColor: AppColors.primaryRedBorderColor,
+ borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
),
],
diff --git a/lib/presentation/habib_wallet/widgets/select_hospital_bottom_sheet.dart b/lib/presentation/habib_wallet/widgets/select_hospital_bottom_sheet.dart
index da374a04..79aa2a73 100644
--- a/lib/presentation/habib_wallet/widgets/select_hospital_bottom_sheet.dart
+++ b/lib/presentation/habib_wallet/widgets/select_hospital_bottom_sheet.dart
@@ -26,7 +26,7 @@ class SelectHospitalBottomSheet extends StatelessWidget {
// style: TextStyle(
// fontSize: 21,
// fontWeight: FontWeight.w600,
- // color: AppColors.blackColor,
+ // color: AppColors.textColor,
// ),
// ),
Text(
diff --git a/lib/presentation/health_calculators_and_converts/health_calculator_detailed_page.dart b/lib/presentation/health_calculators_and_converts/health_calculator_detailed_page.dart
index 8cccf031..2d0f0091 100644
--- a/lib/presentation/health_calculators_and_converts/health_calculator_detailed_page.dart
+++ b/lib/presentation/health_calculators_and_converts/health_calculator_detailed_page.dart
@@ -69,8 +69,8 @@ class _HealthCalculatorDetailedPageState extends State {
FocusScope.of(context).unfocus();
},
child: Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: CollapsingListView(
title: _getPageTitle(),
bottomChild: Container(
diff --git a/lib/presentation/health_trackers/health_tracker_detail_page.dart b/lib/presentation/health_trackers/health_tracker_detail_page.dart
index b5f41dae..123fce10 100644
--- a/lib/presentation/health_trackers/health_tracker_detail_page.dart
+++ b/lib/presentation/health_trackers/health_tracker_detail_page.dart
@@ -1248,7 +1248,7 @@ class _HealthTrackerDetailPageState extends State {
@override
Widget build(BuildContext context) {
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: CollapsingListView(
sendEmail: () async => onSendEmailPressed(context),
title: _getPageTitle(),
diff --git a/lib/presentation/hmg_services/services_page.dart b/lib/presentation/hmg_services/services_page.dart
index 4458b75a..0ea83c4f 100644
--- a/lib/presentation/hmg_services/services_page.dart
+++ b/lib/presentation/hmg_services/services_page.dart
@@ -19,7 +19,6 @@ import 'package:hmg_patient_app_new/features/hospital/hospital_selection_view_mo
import 'package:hmg_patient_app_new/features/medical_file/medical_file_view_model.dart';
import 'package:hmg_patient_app_new/features/water_monitor/water_monitor_view_model.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
-import 'package:hmg_patient_app_new/presentation/blood_donation/blood_donation_page.dart';
import 'package:hmg_patient_app_new/presentation/contact_us/contact_us.dart';
import 'package:hmg_patient_app_new/presentation/emergency_services/emergency_services_page.dart';
import 'package:hmg_patient_app_new/presentation/habib_wallet/habib_wallet_page.dart';
@@ -53,7 +52,14 @@ class ServicesPage extends StatelessWidget {
late MedicalFileViewModel medicalFileViewModel;
late final List hmgServices = [
- HmgServicesComponentModel(11, LocaleKeys.emergencyServices.tr(), "", AppAssets.emergency_services_icon, bgColor: AppColors.primaryRedColor, true, route: null, onTap: () async {
+ HmgServicesComponentModel(
+ 11,
+ LocaleKeys.emergencyServices.tr(),
+ "",
+ AppAssets.emergency_services_icon,
+ bgColor: AppColors.primaryRedColor,
+ true,
+ route: null, onTap: () async {
if (getIt.get().isAuthenticated) {
getIt.get().flushData();
getIt.get().getTransportationOrders(
@@ -81,7 +87,8 @@ class ServicesPage extends StatelessWidget {
true,
route: AppRoutes.bookAppointmentPage,
),
- HmgServicesComponentModel(5, LocaleKeys.completeCheckup.tr(), "", AppAssets.comprehensiveCheckup, bgColor: AppColors.bgGreenColor, true, route: null, onTap: () async {
+ HmgServicesComponentModel(
+ 5, LocaleKeys.completeCheckup.tr(), "", AppAssets.comprehensiveCheckup, bgColor: AppColors.bgGreenColor, true, route: null, onTap: () async {
if (getIt.get().isAuthenticated) {
getIt.get().pushPageRoute(AppRoutes.comprehensiveCheckupPage);
} else {
@@ -133,7 +140,8 @@ class ServicesPage extends StatelessWidget {
);
},
),
- HmgServicesComponentModel(11, LocaleKeys.eReferralServices.tr(), "", AppAssets.eReferral, bgColor: AppColors.eReferralCardColor, true, route: null, onTap: () async {
+ HmgServicesComponentModel(
+ 11, LocaleKeys.eReferralServices.tr(), "", AppAssets.eReferral, bgColor: AppColors.eReferralCardColor, true, route: null, onTap: () async {
if (getIt.get().isAuthenticated) {
getIt.get().pushPageRoute(AppRoutes.eReferralPage);
} else {
@@ -312,7 +320,7 @@ class ServicesPage extends StatelessWidget {
hmgServices.removeWhere((element) => Utils.havePrivilege(element.action) == false);
return Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: AppColors.scaffoldBgColor,
body: CollapsingListView(
title: LocaleKeys.exploreServices.tr(),
isLeading: showBackIcon,
@@ -343,7 +351,7 @@ class ServicesPage extends StatelessWidget {
height: 350.h,
child: ListView.separated(
scrollDirection: Axis.horizontal,
- itemCount: LandingPageData.getServiceCardsList.length,
+ itemCount: LandingPageData.getServiceCards(context).length,
shrinkWrap: true,
padding: EdgeInsets.symmetric(horizontal: 24.w),
itemBuilder: (context, index) {
@@ -354,11 +362,11 @@ class ServicesPage extends StatelessWidget {
horizontalOffset: 100.0,
child: FadeInAnimation(
child: LargeServiceCard(
- serviceCardData: LandingPageData.getServiceCardsList[index],
- image: LandingPageData.getServiceCardsList[index].icon,
- title: LandingPageData.getServiceCardsList[index].title,
- subtitle: LandingPageData.getServiceCardsList[index].subtitle,
- icon: LandingPageData.getServiceCardsList[index].largeCardIcon,
+ serviceCardData: LandingPageData.getServiceCards(context)[index],
+ image: LandingPageData.getServiceCards(context)[index].icon,
+ title: LandingPageData.getServiceCards(context)[index].title,
+ subtitle: LandingPageData.getServiceCards(context)[index].subtitle,
+ icon: LandingPageData.getServiceCards(context)[index].largeCardIcon,
),
),
),
@@ -378,7 +386,7 @@ class ServicesPage extends StatelessWidget {
width: 183.h,
padding: EdgeInsets.all(16.w),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
- color: AppColors.whiteColor,
+ color: context.greyColor,
borderRadius: 20.r,
hasShadow: false,
),
@@ -397,23 +405,28 @@ class ServicesPage extends StatelessWidget {
Spacer(),
getIt.get().isAuthenticated
? Consumer(builder: (context, habibWalletVM, child) {
- return Utils.getPaymentAmountWithSymbol2(habibWalletVM.habibWalletAmount, isExpanded: false)
- .toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.r, width: 80.w, height: 24.h);
+ return Utils.getPaymentAmountWithSymbol2(
+ habibWalletVM.habibWalletAmount,
+ isExpanded: false,
+ iconColor: context.iconColor,
+ textColor: context.textColor,
+ ).toShimmer2(isShow: habibWalletVM.isWalletAmountLoading, radius: 12.r, width: 80.w, height: 24.h);
})
: LocaleKeys.loginToViewWalletBalance.tr().toText12(fontWeight: FontWeight.w500, maxLine: 2),
Spacer(),
getIt.get().isAuthenticated
? CustomButton(
+ isIconOnEnd: true,
height: 40.h,
icon: AppAssets.recharge_icon,
iconSize: 24.w,
- iconColor: AppColors.infoColor,
- textColor: AppColors.infoColor,
+ iconColor: AppColors.whiteColor,
+ textColor: AppColors.whiteColor,
text: LocaleKeys.recharge.tr(),
borderWidth: 0.w,
fontWeight: FontWeight.w500,
borderColor: Colors.transparent,
- backgroundColor: Color(0xff45A2F8).withValues(alpha: 0.08),
+ backgroundColor: AppColors.infoColor,
padding: EdgeInsets.all(8.w),
fontSize: 14.f,
onPressed: () {
@@ -438,7 +451,7 @@ class ServicesPage extends StatelessWidget {
width: 183.h,
padding: EdgeInsets.all(16.w),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
- color: AppColors.whiteColor,
+ color: context.greyColor,
borderRadius: 20.r,
hasShadow: false,
),
@@ -564,7 +577,7 @@ class ServicesPage extends StatelessWidget {
Expanded(
child: Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
- color: AppColors.whiteColor,
+ color: context.greyColor,
borderRadius: 12.h,
hasShadow: false,
),
@@ -593,7 +606,7 @@ class ServicesPage extends StatelessWidget {
Expanded(
child: Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
- color: AppColors.whiteColor,
+ color: context.greyColor,
borderRadius: 12.h,
hasShadow: false,
),
@@ -632,7 +645,7 @@ class ServicesPage extends StatelessWidget {
Expanded(
child: Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
- color: AppColors.whiteColor,
+ color: context.greyColor,
borderRadius: 12.h,
hasShadow: false,
),
@@ -661,7 +674,7 @@ class ServicesPage extends StatelessWidget {
Expanded(
child: Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
- color: AppColors.whiteColor,
+ color: context.greyColor,
borderRadius: 12.h,
hasShadow: false,
),
@@ -700,7 +713,7 @@ class ServicesPage extends StatelessWidget {
Expanded(
child: Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
- color: AppColors.whiteColor,
+ color: context.greyColor,
borderRadius: 12.h,
hasShadow: false,
),
@@ -708,7 +721,8 @@ class ServicesPage extends StatelessWidget {
padding: EdgeInsets.all(16.h),
child: Row(
children: [
- Utils.buildSvgWithAssets(icon: AppAssets.privacy_terms, width: 32.w, height: 32.h, fit: BoxFit.contain, iconColor: AppColors.blackColor),
+ Utils.buildSvgWithAssets(
+ icon: AppAssets.privacy_terms, width: 32.w, height: 32.h, fit: BoxFit.contain, iconColor: AppColors.textColor),
SizedBox(width: 8.w),
Expanded(child: LocaleKeys.termsConditoins.tr().toText14(weight: FontWeight.w500))
],
@@ -724,7 +738,7 @@ class ServicesPage extends StatelessWidget {
Expanded(
child: Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
- color: AppColors.whiteColor,
+ color: context.greyColor,
borderRadius: 12.h,
hasShadow: false,
),
@@ -732,7 +746,8 @@ class ServicesPage extends StatelessWidget {
padding: EdgeInsets.all(16.h),
child: Row(
children: [
- Utils.buildSvgWithAssets(icon: AppAssets.privacy_terms, width: 32.w, height: 32.h, fit: BoxFit.contain, iconColor: AppColors.blackColor),
+ Utils.buildSvgWithAssets(
+ icon: AppAssets.privacy_terms, width: 32.w, height: 32.h, fit: BoxFit.contain, iconColor: AppColors.textColor),
SizedBox(width: 8.w),
Expanded(child: LocaleKeys.privacyPolicy.tr().toText14(weight: FontWeight.w500))
],
diff --git a/lib/presentation/hmg_services/services_view.dart b/lib/presentation/hmg_services/services_view.dart
index 3dd5c462..8e64ad0b 100644
--- a/lib/presentation/hmg_services/services_view.dart
+++ b/lib/presentation/hmg_services/services_view.dart
@@ -18,13 +18,21 @@ class ServiceGridViewItem extends StatelessWidget {
final Function? onTap;
const ServiceGridViewItem(
- this.hmgServiceComponentModel, this.index, this.isHomePage,
- {super.key, this.isLocked = false, required this.isHealthToolIcon, this.onTap});
+ this.hmgServiceComponentModel,
+ this.index,
+ this.isHomePage, {
+ super.key,
+ this.isLocked = false,
+ required this.isHealthToolIcon,
+ this.onTap,
+ });
@override
Widget build(BuildContext context) {
return InkWell(
- onTap: () => hmgServiceComponentModel.route != null ? getIt.get().pushPageRoute(hmgServiceComponentModel.route!) : hmgServiceComponentModel.onTap!(),
+ onTap: () => hmgServiceComponentModel.route != null
+ ? getIt.get().pushPageRoute(hmgServiceComponentModel.route!)
+ : hmgServiceComponentModel.onTap!(),
// onTap: () => hmgServiceComponentModel.isExternalLink
// ? _openLink(hmgServiceComponentModel.route!)
// : getIt
@@ -38,9 +46,10 @@ class ServiceGridViewItem extends StatelessWidget {
height: 48.h,
width: 48.h,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
- color: hmgServiceComponentModel.bgColor,
+ color: (Theme.of(context).brightness == Brightness.dark && isHealthToolIcon) ? context.greyColor : hmgServiceComponentModel.bgColor,
borderRadius: 12.r,
hasShadow: false,
+ context: context,
),
child: Padding(
padding: EdgeInsets.all(12.h),
@@ -51,10 +60,10 @@ class ServiceGridViewItem extends StatelessWidget {
),
),
),
- SizedBox(height: 4.h),
+ SizedBox(height: 6.h),
hmgServiceComponentModel.title.toText12(
fontWeight: FontWeight.w500,
- color: AppColors.textColor,
+ color: context.textColor,
maxLine: 2,
),
],
diff --git a/lib/presentation/home/data/landing_page_data.dart b/lib/presentation/home/data/landing_page_data.dart
index c52d5e19..0914e884 100644
--- a/lib/presentation/home/data/landing_page_data.dart
+++ b/lib/presentation/home/data/landing_page_data.dart
@@ -1,184 +1,184 @@
-import 'package:easy_localization/easy_localization.dart';
+import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/home/data/service_card_data.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
class LandingPageData {
- static List getNotLoggedInServiceCardsList = [
- ServiceCardData(
- serviceName: "emergency",
- icon: AppAssets.emergency_services_icon,
- title: LocaleKeys.emergency,
- subtitle: LocaleKeys.services2,
- backgroundColor: AppColors.primaryRedColor,
- iconColor: AppColors.whiteColor,
- textColor: AppColors.whiteColor,
- isBold: true,
- ),
- ServiceCardData(
- serviceName: "indoor_navigation",
- icon: AppAssets.indoor_nav_icon,
- title: LocaleKeys.indoor,
- subtitle: LocaleKeys.navigation,
- backgroundColor: AppColors.whiteColor,
- iconColor: AppColors.blackColor,
- textColor: AppColors.blackColor,
- isBold: false,
- ),
- ServiceCardData(
- serviceName: "search_doctor",
- icon: AppAssets.search_doctor_icon,
- title: LocaleKeys.search,
- subtitle: LocaleKeys.doctor,
- backgroundColor: AppColors.whiteColor,
- iconColor: AppColors.blackColor,
- textColor: AppColors.blackColor,
- isBold: false,
- ),
- ServiceCardData(
- serviceName: "health_calculators_and_converts",
- icon: AppAssets.health_calculators_icon,
- title: LocaleKeys.health,
- subtitle: LocaleKeys.calculators,
- backgroundColor: AppColors.whiteColor,
- iconColor: AppColors.blackColor,
- textColor: AppColors.blackColor,
- isBold: false,
- ),
- ServiceCardData(
- serviceName: "health_converters",
- icon: AppAssets.health_converters_icon,
- title: LocaleKeys.health,
- subtitle: LocaleKeys.converters,
- backgroundColor: AppColors.whiteColor,
- iconColor: AppColors.blackColor,
- textColor: AppColors.blackColor,
- isBold: false,
- ),
- ServiceCardData(
- serviceName: "parking_guide",
- icon: AppAssets.car_parking_icon,
- title: LocaleKeys.parking,
- subtitle: LocaleKeys.guide,
- backgroundColor: AppColors.whiteColor,
- iconColor: AppColors.blackColor,
- textColor: AppColors.blackColor,
- isBold: false,
- ),
- ];
+ static List getNotLoggedInServiceCards(BuildContext context) => [
+ ServiceCardData(
+ serviceName: "emergency",
+ icon: AppAssets.emergency_services_icon,
+ title: LocaleKeys.emergency,
+ subtitle: LocaleKeys.services2,
+ backgroundColor: context.primaryRedColor,
+ iconColor: AppColors.whiteColor,
+ textColor: AppColors.whiteColor,
+ isBold: true,
+ ),
+ ServiceCardData(
+ serviceName: "indoor_navigation",
+ icon: AppAssets.indoor_nav_icon,
+ title: LocaleKeys.indoor,
+ subtitle: LocaleKeys.navigation,
+ backgroundColor: context.greyColor,
+ iconColor: context.iconColor,
+ textColor: context.textColor,
+ isBold: false,
+ ),
+ ServiceCardData(
+ serviceName: "search_doctor",
+ icon: AppAssets.search_doctor_icon,
+ title: LocaleKeys.search,
+ subtitle: LocaleKeys.doctor,
+ backgroundColor: context.greyColor,
+ iconColor: context.iconColor,
+ textColor: context.textColor,
+ isBold: false,
+ ),
+ ServiceCardData(
+ serviceName: "health_calculators_and_converts",
+ icon: AppAssets.health_calculators_icon,
+ title: LocaleKeys.health,
+ subtitle: LocaleKeys.calculators,
+ backgroundColor: context.greyColor,
+ iconColor: context.iconColor,
+ textColor: context.textColor,
+ isBold: false,
+ ),
+ ServiceCardData(
+ serviceName: "health_converters",
+ icon: AppAssets.health_converters_icon,
+ title: LocaleKeys.health,
+ subtitle: LocaleKeys.converters,
+ backgroundColor: context.greyColor,
+ iconColor: context.iconColor,
+ textColor: context.textColor,
+ isBold: false,
+ ),
+ ServiceCardData(
+ serviceName: "parking_guide",
+ icon: AppAssets.car_parking_icon,
+ title: LocaleKeys.parking,
+ subtitle: LocaleKeys.guide,
+ backgroundColor: context.greyColor,
+ iconColor: context.iconColor,
+ textColor: context.textColor,
+ isBold: false,
+ ),
+ ];
- static List getLoggedInServiceCardsList = [
- ServiceCardData(
- serviceName: "emergency",
- icon: AppAssets.emergency_services_icon,
- title: LocaleKeys.emergency,
- subtitle: LocaleKeys.services2,
- backgroundColor: AppColors.primaryRedColor,
- iconColor: AppColors.whiteColor,
- textColor: AppColors.whiteColor,
- isBold: true,
- ),
- ServiceCardData(
- serviceName: "lab_results",
- icon: AppAssets.home_lab_result_icon,
- title: LocaleKeys.lab,
- subtitle: LocaleKeys.labSubtitle,
- backgroundColor: AppColors.whiteColor,
- iconColor: AppColors.blackColor,
- textColor: AppColors.blackColor,
- isBold: false,
- ),
- ServiceCardData(
- serviceName: "radiology_results",
- icon: AppAssets.my_radiology_icon,
- title: LocaleKeys.radiology,
- subtitle: LocaleKeys.radiologySubtitle,
- backgroundColor: AppColors.whiteColor,
- iconColor: AppColors.blackColor,
- textColor: AppColors.blackColor,
- isBold: false,
- ),
- ServiceCardData(
- serviceName: "prescriptions",
- icon: AppAssets.my_prescription_icon,
- title: LocaleKeys.medicinesSubtitle,
- subtitle: LocaleKeys.details,
- backgroundColor: AppColors.whiteColor,
- iconColor: AppColors.blackColor,
- textColor: AppColors.blackColor,
- isBold: false,
- ),
- ServiceCardData(
- serviceName: "insurance_update",
- icon: AppAssets.insurance_update_icon,
- title: LocaleKeys.insurance,
- subtitle: LocaleKeys.details,
- backgroundColor: AppColors.whiteColor,
- iconColor: AppColors.blackColor,
- textColor: AppColors.blackColor,
- isBold: false,
- ),
- ServiceCardData(
- serviceName: "my_doctors",
- icon: AppAssets.my_doctors_icon,
- title: "My",
- subtitle: "Doctors",
- backgroundColor: AppColors.whiteColor,
- iconColor: AppColors.blackColor,
- textColor: AppColors.blackColor,
- isBold: false,
- ),
- ServiceCardData(
- serviceName: "sick_leaves",
- icon: AppAssets.my_sick_leave_icon,
- title: LocaleKeys.sick,
- subtitle: LocaleKeys.sickSubtitle,
- backgroundColor: AppColors.whiteColor,
- iconColor: AppColors.blackColor,
- textColor: AppColors.blackColor,
- isBold: false,
- ),
- ];
+ static List getLoggedInServiceCards(BuildContext context) => [
+ ServiceCardData(
+ serviceName: "emergency",
+ icon: AppAssets.emergency_services_icon,
+ title: LocaleKeys.emergency,
+ subtitle: LocaleKeys.services2,
+ backgroundColor: context.primaryRedColor,
+ iconColor: AppColors.whiteColor,
+ textColor: AppColors.whiteColor,
+ isBold: true,
+ ),
+ ServiceCardData(
+ serviceName: "lab_results",
+ icon: AppAssets.home_lab_result_icon,
+ title: LocaleKeys.lab,
+ subtitle: LocaleKeys.labSubtitle,
+ backgroundColor: context.greyColor,
+ iconColor: context.iconColor,
+ textColor: context.textColor,
+ isBold: false,
+ ),
+ ServiceCardData(
+ serviceName: "radiology_results",
+ icon: AppAssets.my_radiology_icon,
+ title: LocaleKeys.radiology,
+ subtitle: LocaleKeys.radiologySubtitle,
+ backgroundColor: context.greyColor,
+ iconColor: context.iconColor,
+ textColor: context.textColor,
+ isBold: false,
+ ),
+ ServiceCardData(
+ serviceName: "prescriptions",
+ icon: AppAssets.my_prescription_icon,
+ title: LocaleKeys.medicinesSubtitle,
+ subtitle: LocaleKeys.details,
+ backgroundColor: context.greyColor,
+ iconColor: context.iconColor,
+ textColor: context.textColor,
+ isBold: false,
+ ),
+ ServiceCardData(
+ serviceName: "insurance_update",
+ icon: AppAssets.insurance_update_icon,
+ title: LocaleKeys.insurance,
+ subtitle: LocaleKeys.details,
+ backgroundColor: context.greyColor,
+ iconColor: context.iconColor,
+ textColor: context.textColor,
+ isBold: false,
+ ),
+ ServiceCardData(
+ serviceName: "my_doctors",
+ icon: AppAssets.my_doctors_icon,
+ title: "My",
+ subtitle: "Doctors",
+ backgroundColor: context.greyColor,
+ iconColor: context.iconColor,
+ textColor: context.textColor,
+ isBold: false,
+ ),
+ ServiceCardData(
+ serviceName: "sick_leaves",
+ icon: AppAssets.my_sick_leave_icon,
+ title: LocaleKeys.sick,
+ subtitle: LocaleKeys.sickSubtitle,
+ backgroundColor: context.greyColor,
+ iconColor: context.iconColor,
+ textColor: context.textColor,
+ isBold: false,
+ ),
+ ];
- static List getServiceCardsList = [
- ServiceCardData(
- serviceName: "livecare",
- icon: AppAssets.small_livecare_icon,
- title: LocaleKeys.liveCare,
- subtitle: LocaleKeys.liveCareServiceDesc,
- largeCardIcon: AppAssets.liveCareService,
- backgroundColor: AppColors.successColor,
- iconColor: AppColors.whiteColor,
- isBold: false,
- ),
- // ServiceCardData(
- // icon: AppAssets.homeBottom,
- // title: "Dermatology",
- // subtitle: "Explore our app, View our services and offers",
- // largeCardIcon: AppAssets.homeBottom,
- // backgroundColor: AppColors.primaryRedColor,
- // isBold: false,
- // ),
- ServiceCardData(
- serviceName: "home_health_care",
- icon: AppAssets.homeBottom,
- title: LocaleKeys.homeHealthCare,
- subtitle: LocaleKeys.liveCareServiceDesc,
- largeCardIcon: AppAssets.homeHealthCareService,
- backgroundColor: AppColors.primaryRedColor,
- iconColor: AppColors.whiteColor,
- isBold: false,
- ),
- ServiceCardData(
- serviceName: "pharmacy",
- icon: AppAssets.pharmacy_icon, //359846
- title: LocaleKeys.hmgPharmacy,
- subtitle: LocaleKeys.liveCareServiceDesc,
- largeCardIcon: AppAssets.pharmacyService,
- backgroundColor: AppColors.pharmacyBGColor,
- iconColor: null,
- isBold: true,
- ),
- ];
+ static List getServiceCards(BuildContext context) => [
+ ServiceCardData(
+ serviceName: "livecare",
+ icon: AppAssets.small_livecare_icon,
+ title: LocaleKeys.liveCare,
+ subtitle: LocaleKeys.liveCareServiceDesc,
+ largeCardIcon: AppAssets.liveCareService,
+ backgroundColor: AppColors.successColor,
+ iconColor: AppColors.whiteColor,
+ isBold: false,
+ ),
+ ServiceCardData(
+ serviceName: "home_health_care",
+ icon: AppAssets.homeBottom,
+ title: LocaleKeys.homeHealthCare,
+ subtitle: LocaleKeys.liveCareServiceDesc,
+ largeCardIcon: AppAssets.homeHealthCareService,
+ backgroundColor: context.primaryRedColor,
+ iconColor: AppColors.whiteColor,
+ isBold: false,
+ ),
+ ServiceCardData(
+ serviceName: "pharmacy",
+ icon: AppAssets.pharmacy_icon,
+ title: LocaleKeys.hmgPharmacy,
+ subtitle: LocaleKeys.liveCareServiceDesc,
+ largeCardIcon: AppAssets.pharmacyService,
+ backgroundColor: AppColors.pharmacyBGColor,
+ iconColor: null,
+ isBold: true,
+ ),
+ ];
+
+// // ── backwards-compat aliases (keep old callers compiling) ─────────────────
+// @Deprecated('Use getNotLoggedInServiceCards(context) instead')
+// static List getNotLoggedInServiceCardsList = [];
+// @Deprecated('Use getLoggedInServiceCards(context) instead')
+// static List getLoggedInServiceCardsList = [];
+// @Deprecated('Use getServiceCards(context) instead')
+// static List getServiceCardsList = [];
}
diff --git a/lib/presentation/home/data/service_card_data.dart b/lib/presentation/home/data/service_card_data.dart
index 3bc22d7c..a71a6c22 100644
--- a/lib/presentation/home/data/service_card_data.dart
+++ b/lib/presentation/home/data/service_card_data.dart
@@ -20,8 +20,8 @@ class ServiceCardData {
this.subtitle = "",
this.largeCardIcon = "",
this.backgroundColor = AppColors.whiteColor,
- this.iconColor = AppColors.blackColor,
- this.textColor = AppColors.blackColor,
+ this.iconColor = AppColors.textColor,
+ this.textColor = AppColors.textColor,
this.isBold = false
});
}
diff --git a/lib/presentation/home/landing_page.dart b/lib/presentation/home/landing_page.dart
index e8482bf0..2c5828f2 100644
--- a/lib/presentation/home/landing_page.dart
+++ b/lib/presentation/home/landing_page.dart
@@ -52,7 +52,6 @@ import 'package:hmg_patient_app_new/presentation/todo_section/ancillary_procedur
import 'package:hmg_patient_app_new/presentation/todo_section/widgets/ancillary_orders_list.dart';
import 'package:hmg_patient_app_new/routes/app_routes.dart';
import 'package:hmg_patient_app_new/services/cache_service.dart';
-import 'package:hmg_patient_app_new/services/zoom_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:hmg_patient_app_new/widgets/chip/app_custom_chip_widget.dart';
@@ -158,7 +157,7 @@ class _LandingPageState extends State {
return PopScope(
canPop: false,
child: Scaffold(
- backgroundColor: AppColors.bgScaffoldColor,
+ backgroundColor: context.scaffoldBgColor,
body: SingleChildScrollView(
padding: EdgeInsets.only(top: kToolbarHeight + 0.h, bottom: 24),
child: Column(
@@ -190,9 +189,9 @@ class _LandingPageState extends State {
// // arguments: CallArguments("SmallDailyStandup9875", "123", "Patient", "40", "0", false, int.parse(widget.incomingCallData!.appointmentNo!)),
// );
},
- backgroundColor: AppColors.secondaryLightRedColor,
- borderColor: AppColors.secondaryLightRedColor,
- textColor: AppColors.primaryRedColor,
+ backgroundColor: context.secondaryLightRedColor,
+ borderColor: context.secondaryLightRedColor,
+ textColor: context.primaryRedColor,
fontSize: 14.f,
fontWeight: FontWeight.w500,
borderRadius: 12.r,
@@ -206,20 +205,17 @@ class _LandingPageState extends State {
children: [
Stack(children: [
if (appState.isAuthenticated)
- Utils.buildSvgWithAssets(icon: AppAssets.bell, height: 24.h, width: 24.h).onPress(() async {
- if (appState.isAuthenticated) {
- notificationsViewModel.setNotificationStatusID(2);
- notificationsViewModel.getAllNotifications();
- Navigator.of(context).push(
- CustomPageRoute(
- page: NotificationsListPage(),
- // page: LoginScreen(),
- ),
- );
- } else {
- await authVM.onLoginPressed();
- }
- }),
+ Utils.buildSvgWithAssets(icon: AppAssets.bell, height: 24.h, width: 24.h, iconColor: context.iconColor).onPress(
+ () async {
+ if (appState.isAuthenticated) {
+ notificationsViewModel.setNotificationStatusID(2);
+ notificationsViewModel.getAllNotifications();
+ Navigator.of(context).push(CustomPageRoute(page: NotificationsListPage()));
+ } else {
+ await authVM.onLoginPressed();
+ }
+ },
+ ),
(appState.isAuthenticated && (int.parse(todoSectionVM.notificationsCount ?? "0") > 0))
? Positioned(
right: 0,
@@ -229,7 +225,7 @@ class _LandingPageState extends State {
height: 8.h,
padding: EdgeInsets.all(4),
decoration: BoxDecoration(
- color: AppColors.primaryRedColor,
+ color: context.primaryRedColor,
borderRadius: BorderRadius.circular(20.r),
),
child: Text(
@@ -244,10 +240,11 @@ class _LandingPageState extends State {
)
: SizedBox.shrink(),
]),
- Utils.buildSvgWithAssets(icon: AppAssets.indoor_nav_icon, height: 24.h, width: 24.w).onPress(() {
+ Utils.buildSvgWithAssets(icon: AppAssets.indoor_nav_icon, height: 24.h, width: 24.h, iconColor: context.iconColor)
+ .onPress(() {
openIndoorNavigationBottomSheet(context);
}),
- Utils.buildSvgWithAssets(icon: AppAssets.contact_icon, height: 24.h, width: 24.h).onPress(() {
+ Utils.buildSvgWithAssets(icon: AppAssets.contact_icon, height: 24.h, width: 24.h, iconColor: context.iconColor).onPress(() {
showCommonBottomSheetWithoutHeight(
context,
title: LocaleKeys.contactUs.tr(),
@@ -269,7 +266,7 @@ class _LandingPageState extends State {
!appState.isAuthenticated
? Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
- color: AppColors.whiteColor,
+ color: context.cardBaseColor,
borderRadius: 24.r,
hasShadow: false,
),
@@ -298,7 +295,7 @@ class _LandingPageState extends State {
padding: EdgeInsetsGeometry.zero,
backgroundColor: Color(0xFF2B353E),
borderColor: Color(0xFF2B353E),
- textColor: AppColors.whiteColor,
+ textColor: context.cardBaseColor,
fontSize: 14.f,
fontWeight: FontWeight.w600,
borderRadius: 12.r,
@@ -318,12 +315,12 @@ class _LandingPageState extends State {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
- LocaleKeys.appointmentsAndVisits.tr(context: context).toText16(weight: FontWeight.w600),
+ LocaleKeys.appointmentsAndVisits.tr(context: context).toText16(weight: FontWeight.w600, color: context.textColor),
Row(
children: [
- LocaleKeys.viewAll.tr(context: context).toText14(color: AppColors.primaryRedColor, weight: FontWeight.w500),
+ LocaleKeys.viewAll.tr(context: context).toText14(color: context.primaryRedColor, weight: FontWeight.w500),
SizedBox(width: 2.h),
- Icon(Icons.arrow_forward_ios, color: AppColors.primaryRedColor, size: 14.h),
+ Icon(Icons.arrow_forward_ios, color: context.primaryRedColor, size: 14.h),
],
),
],
@@ -336,7 +333,7 @@ class _LandingPageState extends State {
return myAppointmentsVM.isMyAppointmentsLoading
? Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
- color: AppColors.whiteColor,
+ color: context.cardBaseColor,
borderRadius: 24.r,
hasShadow: true,
),
@@ -352,7 +349,7 @@ class _LandingPageState extends State {
? myAppointmentsVM.patientAppointmentsHistoryList.length == 1
? Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
- color: AppColors.whiteColor,
+ color: context.cardBaseColor,
borderRadius: 24.r,
hasShadow: true,
),
@@ -414,7 +411,7 @@ class _LandingPageState extends State {
pagination: SwiperPagination(
alignment: Alignment.bottomCenter,
margin: EdgeInsets.only(top: 240.h + 8 + 24),
- builder: DotSwiperPaginationBuilder(color: Color(0xffD9D9D9), activeColor: AppColors.blackBgColor),
+ builder: DotSwiperPaginationBuilder(color: Color(0xffD9D9D9), activeColor: context.textColor),
),
itemBuilder: (BuildContext context, int index) {
return getIndexSwiperCard(index);
@@ -422,7 +419,8 @@ class _LandingPageState extends State {
)
: Container(
width: double.infinity,
- decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 24.r, hasShadow: true),
+ decoration: RoundedRectangleBorder()
+ .toSmoothCornerDecoration(color: context.cardBaseColor, borderRadius: 24.r, hasShadow: true),
child: Padding(
padding: EdgeInsets.all(16.h),
child: Column(
@@ -444,7 +442,7 @@ class _LandingPageState extends State {
fontWeight: FontWeight.w500,
padding: EdgeInsets.fromLTRB(10.h, 0, 10.h, 0),
icon: AppAssets.add_icon,
- iconColor: AppColors.primaryRedColor,
+ iconColor: context.primaryRedColor,
height: 40.h,
),
],
@@ -463,10 +461,10 @@ class _LandingPageState extends State {
SizedBox(height: 16.h),
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
- color: AppColors.whiteColor,
+ color: context.cardBaseColor,
borderRadius: 20.r,
hasShadow: true,
- side: BorderSide(color: AppColors.primaryRedColor, width: 3.h),
+ side: BorderSide(color: context.primaryRedColor, width: 3.h),
),
width: double.infinity,
child: Padding(
@@ -479,10 +477,14 @@ class _LandingPageState extends State