Merge pull request 'haroon_dev' (#195) from haroon_dev into master

Reviewed-on: https://34.17.182.140/Haroon6138/HMG_Patient_App_New/pulls/195
master
Haroon6138 2 days ago
commit cdbba6f270

@ -49,7 +49,7 @@
<uses-permission
android:name="android.permission.ACCESS_BACKGROUND_LOCATION"
tools:node="remove" /> <!-- <uses-permission android:name="android.permission.INTERNET" /> -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" tools:node="remove" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
@ -62,7 +62,6 @@
<uses-feature android:name="android.hardware.camera.any" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-feature
@ -149,6 +148,9 @@
<meta-data
android:name="push_kit_auto_init_enabled"
android:value="true" />
<meta-data
android:name="com.google.ar.core"
tools:node="remove" />
<activity
android:name=".MainActivity"
@ -156,7 +158,7 @@
android:enabled="true"
android:exported="true"
android:hardwareAccelerated="true"
android:launchMode="singleTop"
android:launchMode="singleInstance"
android:showOnLockScreen="true"
android:theme="@style/LaunchTheme"
android:windowSoftInputMode="adjustResize"

@ -0,0 +1,3 @@
<svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8.76629 0.292994C8.94577 0.52652 8.97196 0.843482 8.83323 1.10329C8.24927 2.19693 7.91792 3.4461 7.91792 4.77489C7.91792 9.0867 11.4133 12.5821 15.7251 12.5821C17.0539 12.5821 18.3031 12.2508 19.3967 11.6668C19.6565 11.5281 19.9735 11.5543 20.207 11.7337C20.4406 11.9132 20.5474 12.2128 20.4802 12.4995C19.4056 17.085 15.2909 20.5 10.3769 20.5C4.64589 20.5 0 15.8541 0 10.1232C0 5.20909 3.41505 1.09448 8.0005 0.0198166C8.28726 -0.0473898 8.58681 0.0594678 8.76629 0.292994Z" fill="#8F9AA3"/>
</svg>

After

Width:  |  Height:  |  Size: 610 B

@ -1581,5 +1581,6 @@
"invalidInsurance": "لا يمكنك إجراء الدفع عبر الإنترنت لأنه ليس لديك تأمين صالح.",
"continueCash": "متابعة الدفع نقدًا",
"timeFor": "الوقت",
"hmgPolicies": "سياسات مجموعة الحبيب الطبية"
"hmgPolicies": "سياسات مجموعة الحبيب الطبية",
"darkMode": "المظهر الداكن"
}

@ -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"
}

@ -195,7 +195,7 @@ class ApiClientImp implements ApiClient {
}
// body['TokenID'] = "@dm!n";
// body['PatientID'] = 4773922;
// body['PatientID'] = 4773715;
// body['PatientTypeID'] = 1;
// body['PatientOutSA'] = 0;
// body['SessionID'] = "45786230487560q";

@ -4,7 +4,7 @@ import 'package:hmg_patient_app_new/core/enums.dart';
class ApiConsts {
static const maxSmallScreen = 660;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.uat;
static AppEnvironmentTypeEnum appEnvironmentType = AppEnvironmentTypeEnum.prod;
// static String baseUrl = 'https://uat.hmgwebservices.com/'; // HIS API URL UAT
@ -229,7 +229,7 @@ class ApiConsts {
static String getAiOverViewLabOrder = "Services/Patients.svc/REST/HMGAI_Lab_Analyzer_API";
// ************ static values for Api ****************
static final double appVersionID = 20.1;
static final double appVersionID = 20.2;
// static final double appVersionID = 50.7;
static final int appChannelId = 3;
static final String appIpAddress = "10.20.10.20";

@ -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';

@ -224,7 +224,7 @@ class AppDependencies {
authenticationRepo: getIt(), cacheService: getIt(), navigationService: getIt(), dialogService: getIt(), appState: getIt(), errorHandlerService: getIt(), localAuthService: getIt()),
);
getIt.registerLazySingleton<ProfileSettingsViewModel>(() => ProfileSettingsViewModel());
getIt.registerLazySingleton<ProfileSettingsViewModel>(() => ProfileSettingsViewModel(cacheService: getIt<CacheService>()));
getIt.registerLazySingleton<DateRangeSelectorRangeViewModel>(() => DateRangeSelectorRangeViewModel());

@ -1,316 +0,0 @@
import 'dart:async';
import 'dart:collection';
import 'dart:convert';
import 'dart:io';
import 'dart:ui';
import 'package:device_calendar/device_calendar.dart';
import 'package:flutter/widgets.dart';
import 'package:hmg_patient_app_new/core/dependencies.dart';
import 'package:hmg_patient_app_new/core/utils/date_util.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/presentation/prescriptions/prescription_reminder_view.dart';
import 'package:hmg_patient_app_new/services/dialog_service.dart';
import 'package:hmg_patient_app_new/services/permission_service.dart';
import 'package:hmg_patient_app_new/widgets/common_bottom_sheet.dart';
import 'package:jiffy/jiffy.dart';
import 'package:manage_calendar_events/manage_calendar_events.dart' as ios;
import 'package:permission_handler/permission_handler.dart';
import 'package:timezone/data/latest.dart' as tzl;
final DeviceCalendarPlugin deviceCalendarPlugin = DeviceCalendarPlugin();
final ios.CalendarPlugin _myPlugin = ios.CalendarPlugin();
class CalendarUtils {
static Completer<CalendarUtils>? _completer;
dynamic get writableCalendars => calendars.firstWhere((c) => !c.isReadOnly!);
dynamic calendars;
CalendarUtils._(this.calendars);
// static Future<CalendarUtils> getInstance() async {
// if (_completer == null) {
// _completer = Completer<CalendarUtils>();
// print(_completer!.isCompleted);
// try {
// final dynamic calendarsResult;
// if (Platform.isIOS) {
// calendarsResult = await _myPlugin.getCalendars();
// if (!_completer!.isCompleted) {
// _completer?.complete(CalendarUtils._(await calendarsResult!));
// }
// } else {
// calendarsResult = await deviceCalendarPlugin.retrieveCalendars();
// if (!_completer!.isCompleted) {
// _completer?.complete(CalendarUtils._(await calendarsResult.data!));
// }
// }
// } on Exception catch (e) {
// if (!_completer!.isCompleted) {
// _completer!.completeError(e);
// }
// }
// }
// return _completer!.future;
// }
static Future<CalendarUtils> getInstance() async {
tzl.initializeTimeZones();
if (_completer != null) {
return _completer!.future;
}
_completer = Completer<CalendarUtils>();
try {
final dynamic calendarsResult;
if (Platform.isIOS) {
calendarsResult = await _myPlugin.getCalendars();
_completer!.complete(CalendarUtils._(calendarsResult));
} else {
calendarsResult = await deviceCalendarPlugin.retrieveCalendars();
_completer!.complete(CalendarUtils._(calendarsResult.data));
}
} catch (e) {
_completer!.completeError(e);
}
return _completer!.future;
}
Future createOrUpdateEvents({List<DateTime>? scheduleList, String? title, String? description, List<DateTime>? scheduleDateTime, List<DayOfWeek>? daysOfWeek}) async {
tzl.initializeTimeZones();
List<Event> events = [];
Location _currentLocation;
if (DateTime.now().timeZoneName == "+04")
_currentLocation = getLocation('Asia/Dubai');
else
_currentLocation = getLocation('Asia/Riyadh');
scheduleDateTime!.forEach((element) {
RecurrenceRule recurrenceRule = RecurrenceRule(
// RecurrenceFrequency.Daily,
// daysOfWeek: daysOfWeek,
// endDate: element,
until: element, frequency: Frequency.daily,
);
//added byAamir Tz Time
Event event = Event(writableCalendars!.id,
recurrenceRule: recurrenceRule,
start: TZDateTime.from(element, _currentLocation),
end: TZDateTime.from(element.add(Duration(minutes: 30)), _currentLocation),
title: title,
description: description);
events.add(event);
});
events.forEach((element) {
deviceCalendarPlugin.createOrUpdateEvent(element);
});
}
Future createOrUpdateEvent({required String title, required String description, required String location, DateTime? scheduleDateTime, String? eventId}) async {
RecurrenceRule recurrenceRule = RecurrenceRule(
// RecurrenceFrequency.Daily,
// daysOfWeek: daysOfWeek,
// endDate: scheduleDateTime,
until: scheduleDateTime, frequency: Frequency.daily,
);
Location _currentLocation;
// if (DateTime.now().timeZoneName == "+04")
// _currentLocation = getLocation('Asia/Dubai');
// else
_currentLocation = getLocation('Asia/Riyadh');
TZDateTime scheduleDateTimeUTZ = TZDateTime.from(scheduleDateTime!, _currentLocation);
print("writableCalendars-name: " + writableCalendars.name);
print("writableCalendars-Id: " + writableCalendars.id);
print("writableCalendarsToString: " + writableCalendars.toString());
print("writableCalendarsToString: " + writableCalendars!.id!);
Event event = Event(
writableCalendars!.id,
start: scheduleDateTimeUTZ,
end: scheduleDateTimeUTZ.add(Duration(minutes: 30)),
title: title,
description: description,
);
ios.CalendarEvent iosCalEvent =
ios.CalendarEvent(location: location, startDate: scheduleDateTimeUTZ, endDate: scheduleDateTimeUTZ.add(Duration(minutes: 30)), title: title, description: description, isAllDay: false);
if (Platform.isAndroid) {
Result<bool> result = await deviceCalendarPlugin.hasPermissions();
print(result);
await deviceCalendarPlugin.createOrUpdateEvent(event).catchError((e) {
print("catchError " + e.toString());
}).whenComplete(() {
print("whenComplete Calender ID " + eventId!);
});
} else {
await _myPlugin.createEvent(calendarId: writableCalendars.id!, event: iosCalEvent).catchError((e) {
print("catchError " + e.toString());
}).whenComplete(() {
print("whenComplete Calender ID iOS " + eventId!);
});
}
}
deleteEvent(String _calendarId, String _eventId) async {
if (Platform.isIOS) {
await _myPlugin.deleteEvent(calendarId: _calendarId, eventId: _eventId);
} else {
await deviceCalendarPlugin.deleteEvent(_calendarId, _eventId);
}
}
Future retrieveEvents(
String calendarId,
RetrieveEventsParams retrieveEventsParams,
) async {
if (Platform.isIOS) {
return await _myPlugin.getEvents(calendarId: calendarId);
} else {
return await deviceCalendarPlugin.retrieveEvents(calendarId, retrieveEventsParams);
}
}
Future createCalendar(
String calendarName, {
Color? calendarColor,
String? localAccountName,
}) async {
return await deviceCalendarPlugin.createCalendar(calendarName, calendarColor: calendarColor, localAccountName: localAccountName);
}
}
Future<Map<Permission, PermissionStatus>> requestPermissions() async {
var permissionResults = [Permission.calendarFullAccess].request();
return permissionResults;
}
showReminderBottomSheet(BuildContext context, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted,
{required Function() onSuccess, String? title, String? description, Function(int)? onMultiDateSuccess, bool isMultiAllowed = false}) async {
if (Platform.isAndroid) {
if (await PermissionService.isCalendarPermissionEnabled()) {
_showReminderBottomSheet(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted,
onSuccess: onSuccess, title: title, description: description, onMultiDateSuccess: onMultiDateSuccess, isMultiAllowed: isMultiAllowed);
} else {
// Utils.showPermissionConsentDialog(context, TranslationBase.of(context).calendarPermission, () async {
// if (await Permission.calendarFullAccess.request().isGranted) {
// _showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted,
// onSuccess: onSuccess, title: title, description: description, onMultiDateSuccess: onMultiDateSuccess, isMultiAllowed: isMultiAllowed);
// }
// });
}
} else {
if (await Permission.calendarWriteOnly.request().isGranted) {
if (await Permission.calendarFullAccess.request().isGranted) {
_showReminderBottomSheet(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted,
onSuccess: onSuccess, title: title, description: description, onMultiDateSuccess: onMultiDateSuccess, isMultiAllowed: isMultiAllowed);
}
}
}
}
Future<void> _showReminderBottomSheet(BuildContext providedContext, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted,
{required Function onSuccess, String? title, String? description, Function(int)? onMultiDateSuccess, bool? isMultiAllowed}) async {
showCommonBottomSheetWithoutHeight(providedContext, title: "Set the timer of reminder", child: PrescriptionReminderView(
setReminder: (int value) async {
if (!isMultiAllowed!) {
if (onMultiDateSuccess == null) {
CalendarUtils calendarUtils = await CalendarUtils.getInstance();
await calendarUtils.createOrUpdateEvent(
title: title ?? "You have appointment with Dr. $doctorName",
description: description ?? "At $appoDateFormatted $appoTimeFormatted",
scheduleDateTime: dateTime,
eventId: eventId,
location: '');
onSuccess();
}
} else {
onMultiDateSuccess!(value);
}
},
), callBackFunc: () {}, isFullScreen: false);
}
setCalender(BuildContext context,
{required String eventId, required int selectedMinutes, int? frequencyNumber, required int days, required String orderDate, required String itemDescriptionN, required String route}) async {
DateTime actualDate = DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day, 8, 0);
frequencyNumber ??= 2; //Some time frequency number is null so by default will be 2
int remainingDays = days - (Jiffy.parseFromDateTime(DateTime.now()).diff(Jiffy.parseFromDateTime(DateUtil.convertStringToDate(orderDate)), unit: Unit.day) as int);
if (remainingDays.isNegative) {
getIt.get<DialogService>().showErrorBottomSheet(message: "Prescription date has been already passed you can not add a reminder for this prescription.");
return;
}
CalendarUtils calendarUtils = await CalendarUtils.getInstance();
try {
for (int i = 0; i < remainingDays; i++) {
//event for number of days.
for (int j = 0; j < frequencyNumber; j++) {
// event for number of times per day.
if (j != 0) {
actualDate.add(new Duration(hours: 8)); // 8 hours addition for daily dose.
}
//Time subtraction from actual reminder time. like before 30, or 1 hour.
actualDate = Jiffy.parseFromDateTime(actualDate).subtract(minutes: selectedMinutes).dateTime;
calendarUtils.createOrUpdateEvent(
title: "$itemDescriptionN} Prescription Reminder",
description: "$itemDescriptionN $frequencyNumber $route ",
scheduleDateTime: actualDate,
eventId: eventId + (i.toString() + j.toString()),
location: '', //event id with varitions
);
print("Creating event #$j for day $i$actualDate");
actualDate = DateTime(actualDate.year, actualDate.month, actualDate.day, 8, 0);
}
actualDate = Jiffy.parseFromDateTime(actualDate).add(days: 1).dateTime;
}
} catch (ex) {
getIt.get<DialogService>().showErrorBottomSheet(message: "catch:$ex");
}
}
Future<void> checkAndRemove(hasReminder, {bool delete = false, String itemDescriptionN = ""}) async {
final ios.CalendarPlugin _myPlugin = ios.CalendarPlugin();
CalendarUtils calendarUtils = await CalendarUtils.getInstance();
DateTime startEventsDate = Jiffy.parseFromDateTime(DateTime.now()).subtract(days: 30).dateTime;
DateTime endEventsDate = Jiffy.parseFromDateTime(DateTime.now()).add(days: 120).dateTime;
RetrieveEventsParams params = RetrieveEventsParams(startDate: startEventsDate, endDate: endEventsDate);
if (calendarUtils.calendars != null) {
if (Platform.isAndroid) {
await processEvents(calendarUtils.calendars, calendarUtils, params, delete, itemDescriptionN, hasReminder);
} else {
List<ios.Calendar>? iosCalendars = await _myPlugin.getCalendars();
if (iosCalendars != null) {
await processEvents(iosCalendars.map((cal) => Calendar(id: cal.id, name: cal.name, accountName: cal.accountName)).toList(), calendarUtils, params, delete, itemDescriptionN, hasReminder);
}
}
}
}
Future<void> processEvents(List<Calendar> calendars, calendarUtils, params, delete, String itemDescriptionN, hasReminder) async {
for (var calendar in calendars) {
Result<UnmodifiableListView<Event>> events = await calendarUtils.retrieveEvents(calendar.id!, params);
for (var event in events.data!) {
if (event.title!.contains(itemDescriptionN)) {
if (delete) {
await calendarUtils.deleteEvent(calendar, event);
// AppToast.showSuccessToast(message: TranslationBase.of(context).reminderCancelSuccess);
hasReminder = false;
} else {
hasReminder = false;
// setState(() {
// hasReminder = true;
// });
}
}
}
}
}

@ -493,7 +493,7 @@ class DateUtil {
}
static convertISODateToJsonDate(String isoDate) {
return "/Date(" + DateFormat('mm-dd-yyy').parse(isoDate).millisecondsSinceEpoch.toString() + ")/";
return "/Date(" + DateFormat('mm-dd-yyy', "en-US").parse(isoDate).millisecondsSinceEpoch.toString() + ")/";
}
static String getDay(DayOfWeek dayOfWeek) {

@ -398,7 +398,7 @@ class PushNotificationHandler {
int sdkInt = androidInfo.version.sdkInt ?? 0;
if (sdkInt >= 33) {
// await FlutterCallkitIncoming.requestFullIntentPermission();
await FlutterCallkitIncoming.requestFullIntentPermission();
}
}
}

@ -664,10 +664,12 @@ class Utils {
double width = 24,
double height = 24,
BoxFit fit = BoxFit.cover,
bool applyThemeColor = true,
}) {
final Color? resolvedColor = iconColor ?? (applyThemeColor && AppColors.isDarkMode ? AppColors.textColor : null);
return SvgPicture.asset(
icon,
colorFilter: iconColor != null ? ColorFilter.mode(isDisabled ? iconColor.withOpacity(0.5) : iconColor, BlendMode.srcIn) : null,
colorFilter: resolvedColor != null ? ColorFilter.mode(isDisabled ? resolvedColor.withOpacity(0.5) : resolvedColor, BlendMode.srcIn) : null,
width: width,
height: height,
fit: fit,
@ -801,11 +803,13 @@ class Utils {
double? fontSize,
double? letterSpacing,
FontWeight? fontWeight,
Color iconColor = AppColors.textColor,
Color textColor = AppColors.blackColor,
Color? iconColor,
Color? textColor,
bool isSaudiCurrency = true,
bool isExpanded = true,
}) {
final resolvedIconColor = iconColor ?? AppColors.textColor;
final resolvedTextColor = textColor ?? AppColors.blackColor;
return RichText(
maxLines: 1,
text: TextSpan(
@ -813,13 +817,13 @@ class Utils {
WidgetSpan(
alignment: PlaceholderAlignment.baseline,
baseline: TextBaseline.alphabetic,
child: Utils.buildSvgWithAssets(icon: AppAssets.saudi_riyal_icon, width: iconSize.h, height: iconSize.h, iconColor: iconColor),
child: Utils.buildSvgWithAssets(icon: AppAssets.saudi_riyal_icon, width: iconSize.h, height: iconSize.h, iconColor: resolvedIconColor),
),
TextSpan(
// text: NumberFormat.currency(locale: 'en_US', symbol: " ", decimalDigits: 0).format(habibWalletAmount),
text: " ${habibWalletAmount.toStringAsFixed(2)}",
style: TextStyle(
color: textColor,
color: resolvedTextColor,
fontSize: fontSize ?? 32.f,
letterSpacing: letterSpacing ?? -4,
fontFamily: "Poppins",

@ -234,7 +234,7 @@ extension EmailValidator on String {
TextOverflow? textOverflow,
String? fontFamily,
double? letterSpacing = -0.4,
Color decorationColor = AppColors.errorColor}) =>
Color? decorationColor}) =>
Text(
this,
maxLines: maxlines,
@ -249,7 +249,7 @@ extension EmailValidator on String {
fontWeight: weight ?? (isBold ? FontWeight.bold : FontWeight.normal),
decoration: isUnderLine ? TextDecoration.underline : null,
fontFamily: fontFamily ?? (isEnglishOnly ? "Poppins" : getIt.get<AppState>().getLanguageCode() == "ar" ? 'GESSTwo' : 'Poppins'),
decorationColor: decorationColor),
decorationColor: decorationColor ?? AppColors.errorColor),
);
Widget toText17({bool isEnglishOnly = false, Color? color, bool isBold = false, bool isCenter = false}) => Text(

@ -28,10 +28,10 @@ extension WidgetExtensions on Widget {
Widget toShimmer({bool isShow = true, bool isTransparent = false}) => isShow
? Shimmer.fromColors(
baseColor: Color(0xffb9bebe),
highlightColor: Colors.white,
baseColor: AppColors.shimmerBaseColor,
highlightColor: AppColors.shimmerHighlightColor,
child: Container(
color: isTransparent ? Colors.transparent : Colors.white.withOpacity(0.3),
color: isTransparent ? Colors.transparent : AppColors.whiteColor.withOpacity(0.3),
child: this,
),
)
@ -41,14 +41,14 @@ extension WidgetExtensions on Widget {
Widget toShimmer2({bool isShow = true, double radius = 20, double? width, double? height}) => isShow
? Shimmer.fromColors(
baseColor: const Color(0xffe8eff0),
highlightColor: Colors.white,
baseColor: AppColors.shimmerBaseColor,
highlightColor: AppColors.shimmerHighlightColor,
child: ClipRRect(
borderRadius: BorderRadius.circular(radius),
child: Container(
width: width,
height: height,
color: Colors.white,
color: AppColors.whiteColor,
child: this,
),
),
@ -69,7 +69,7 @@ extension WidgetExtensions on Widget {
return Container(
padding: disablePadding ? EdgeInsets.zero : const EdgeInsets.only(top: 15, bottom: 15, left: 14, right: 14),
decoration: BoxDecoration(
color: Colors.white,
color: AppColors.whiteColor,
borderRadius: BorderRadius.circular(radius),
boxShadow: [
BoxShadow(

@ -44,6 +44,7 @@ import 'package:hmg_patient_app_new/widgets/loader/bottomsheet_loader.dart';
import 'package:hmg_patient_app_new/widgets/routes/custom_page_route.dart';
import 'package:sms_otp_auto_verify/sms_otp_auto_verify.dart';
import '../insurance/insurance_view_model.dart';
import 'models/request_models/get_user_mobile_device_data.dart';
import 'models/request_models/insert_patient_mobile_deviceinfo.dart';
import 'models/request_models/patient_insert_device_imei_request.dart';
@ -629,11 +630,12 @@ class AuthenticationViewModel extends ChangeNotifier {
// medicalVm.getAllPendingRecordsByResponseId();
}
await clearDefaultInputValues();
myAppointmentsVM.setIsAppointmentDataToBeLoaded(true);
getIt.get<InsuranceViewModel>().setIsInsuranceDataToBeLoaded(true);
if (isUserAgreedBefore) {
LoaderBottomSheet.hideLoader();
navigateToHomeScreen();
} else {
myAppointmentsVM.setIsAppointmentDataToBeLoaded(true);
LoaderBottomSheet.hideLoader();
navigateToHomeScreen();
//Agreement page not designed yet so we are navigating to home screen directly
@ -833,8 +835,8 @@ class AuthenticationViewModel extends ChangeNotifier {
}
Future<void> onRegistrationComplete() async {
// LoaderBottomSheet.showLoader();
LoadingUtils.showFullScreenLoader(loadingText: "Setting up your medical file.\nMay take a moment.");
LoaderBottomSheet.showLoader();
// LoadingUtils.showFullScreenLoader(loadingText: "Setting up your medical file.\nMay take a moment.");
var request = RequestUtils.getUserSignupCompletionRequest(fullName: nameController.text, emailAddress: emailController.text, gender: genderType, maritalStatus: maritalStatus);
final resultEither = await _authenticationRepo.registerUser(registrationPayloadDataModelRequest: request);
@ -1031,7 +1033,8 @@ class AuthenticationViewModel extends ChangeNotifier {
label: LocaleKeys.notice.tr(),
onOkPressed: () {
_dialogService.showPhoneNumberPickerSheet(
label: "Where would you like to receive OTP?",
// label: "Where would you like to receive OTP?",
label: LocaleKeys.receiveOtpToast.tr(),
message: "Please select from the below options to receive OTP.",
onSMSPress: () {
checkUserAuthentication(otpTypeEnum: OTPTypeEnum.sms);

@ -692,6 +692,9 @@ class BookAppointmentsViewModel extends ChangeNotifier {
result.fold(
(failure) async {
print(failure);
if (onError != null) {
onError(failure.message);
}
},
(apiResponse) {
if (apiResponse.messageStatus == 2) {

@ -40,7 +40,7 @@ class VitalSignUiModel {
}
if (s.contains('high')) {
return const VitalSignUiModel(
return VitalSignUiModel(
iconBg: AppColors.chipSecondaryLightRedColor,
iconFg: AppColors.primaryRedColor,
chipBg: AppColors.chipSecondaryLightRedColor,

@ -249,7 +249,8 @@ class LabRepoImp implements LabRepo {
GenericApiModel<String>? apiResponse;
Failure? failure;
await apiClient.post(
Utils.isVidaPlusProject(int.parse(labOrder.projectID!)) ? SEND_LAB_RESULT_EMAIL : SEND_LAB_RESULT_EMAIL_NEW,
// Utils.isVidaPlusProject(int.parse(labOrder.projectID!)) ? SEND_LAB_RESULT_EMAIL : SEND_LAB_RESULT_EMAIL_NEW,
SEND_LAB_RESULT_EMAIL_NEW,
body: mapDevice,
onFailure: (error, statusCode, {messageStatus, failureType}) {
failure = failureType;

@ -527,7 +527,10 @@ class LabViewModel extends ChangeNotifier {
rangeEnd = 100.0;
break;
default:
throw ArgumentError('Invalid flag: $flag');
rangeStart = 40.0;
rangeEnd = 59.0;
break;
// throw ArgumentError('Invalid flag: $flag');
}
// Clamp input value to 0-100 and map it to the range bounds

@ -122,7 +122,7 @@ class PatientSickLeavesResponseModel {
patientName = json['PatientName'];
projectName = json['ProjectName'];
qR = json['QR'];
speciality = json['Speciality'].cast<String>();
// speciality = json['Speciality'].cast<String>();
startDate = json['StartDate'];
status = json['Status'];
strRequestDate = json['StrRequestDate'];

@ -1,8 +1,36 @@
import 'package:flutter/foundation.dart';
import 'package:hmg_patient_app_new/services/cache_service.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
class ProfileSettingsViewModel extends ChangeNotifier {
static const String _darkModeKey = 'is_dark_mode';
void notify(){
final CacheService _cacheService;
bool _isDarkMode = false;
bool get isDarkMode => _isDarkMode;
ProfileSettingsViewModel({required CacheService cacheService})
: _cacheService = cacheService;
/// Call once at app startup (before the first frame) to restore the
/// persisted dark-mode preference.
void loadDarkMode() {
final saved = _cacheService.getBool(key: _darkModeKey);
_isDarkMode = saved ?? false;
AppColors.isDarkMode = _isDarkMode;
// No notifyListeners() here we are called before build.
}
void toggleDarkMode(bool value) {
_isDarkMode = value;
AppColors.isDarkMode = value;
_cacheService.saveBool(key: _darkModeKey, value: value);
notifyListeners();
}
void notify() {
notifyListeners();
}
}

@ -1573,7 +1573,8 @@ abstract class LocaleKeys {
static const invalidEligibility = 'invalidEligibility';
static const invalidInsurance = 'invalidInsurance';
static const continueCash = 'continueCash';
static const timeFor = 'timeFor';
static const hmgPolicies = 'hmgPolicies';
static const darkMode = 'darkMode';
static const timeFor = 'Time for';
}

@ -62,6 +62,9 @@ Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async {
getIt.get<LoggerService>().logInfo("Firebase backgroundMessageHandler Main!!!");
}
// flutter3_32 pub run easy_localization:generate -O ./lib/generated -f keys -o locale_keys.g.dart --source-dir ./assets/langs
class MyHttpOverrides extends HttpOverrides {
@override
HttpClient createHttpClient(SecurityContext? context) {
@ -108,6 +111,9 @@ Future<void> callInitializations() async {
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);
HttpOverrides.global = MyHttpOverrides();
await callAppStateInitializations();
// Restore persisted dark-mode preference before the first frame.
getIt.get<ProfileSettingsViewModel>().loadDarkMode();
}
void main() async {
@ -247,27 +253,35 @@ class MyApp extends StatelessWidget {
return Sizer(
builder: (context, orientation, deviceType) {
// SizeConfig().init(constraints, orientation);
return MaterialApp(
// title: 'Dr. AlHabib',
title: 'Dr. AlHabib Beta',
builder: (context, mchild) {
return MediaQuery(
data: MediaQuery.of(context).copyWith(
textScaler: TextScaler.noScaling,
alwaysUse24HourFormat: true,
),
child: mchild!,
return Consumer<ProfileSettingsViewModel>(
builder: (context, profileVm, _) {
final isArabic = EasyLocalization.of(context)?.locale.languageCode == "ar";
return MaterialApp(
key: ValueKey('app_theme_${profileVm.isDarkMode}'),
// title: 'Dr. AlHabib',
title: 'Dr. AlHabib Beta',
builder: (context, mchild) {
return MediaQuery(
data: MediaQuery.of(context).copyWith(
textScaler: TextScaler.noScaling,
alwaysUse24HourFormat: true,
),
child: mchild!,
);
},
showSemanticsDebugger: false,
debugShowCheckedModeBanner: false,
localizationsDelegates: context.localizationDelegates,
supportedLocales: context.supportedLocales,
locale: context.locale,
initialRoute: AppRoutes.initialRoute,
routes: AppRoutes.routes,
theme: AppTheme.getTheme(isArabic),
darkTheme: AppTheme.getDarkTheme(isArabic),
themeMode: profileVm.isDarkMode ? ThemeMode.dark : ThemeMode.light,
navigatorKey: getIt.get<NavigationService>().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<NavigationService>().navigatorKey,
);
},
);

@ -2,11 +2,11 @@
import 'package:easy_localization/easy_localization.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_export.dart';
import 'package:hmg_patient_app_new/core/utils/calender_utils_new.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:flutter/cupertino.dart';
import '../../core/app_assets.dart';
import '../../core/utils/calendar_utils.dart';
import '../../features/active_prescriptions/active_prescriptions_view_model.dart';
import '../../features/active_prescriptions/models/active_prescriptions_response_model.dart';
import '../../generated/locale_keys.g.dart';
@ -34,7 +34,6 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
List<ActivePrescriptionsResponseModel> selectedDayMeds = [];
ActivePrescriptionsViewModel? activePreVM;
Map<String, bool> medReminderStatus = {};
String _buildMedKey(ActivePrescriptionsResponseModel med) {
@ -172,7 +171,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
offset: const Offset(0, -4),
child: Text(
_getSuffix(selectedDate.day),
style: const TextStyle(
style: TextStyle(
fontSize: 12,
color: AppColors.textColor,
fontWeight: FontWeight.w500,
@ -182,7 +181,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
),
TextSpan(
text: " ${DateFormat.MMMM().format(selectedDate)}",
style: const TextStyle(
style: TextStyle(
color: AppColors.textColor,
fontSize: 16,
fontWeight: FontWeight.w500,
@ -279,7 +278,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
),
],
).paddingOnly(left: 16, right: 16),
const Divider(
Divider(
color: AppColors.greyColor),
GestureDetector(
onTap: () => showDoseDialog(med),
@ -331,7 +330,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
],
).paddingAll(16),
),
const Divider(
Divider(
color: AppColors.greyColor),
_buildButtons(),
],
@ -658,7 +657,7 @@ class _ActiveMedicationPageState extends State<ActiveMedicationPage> {
builder: (_) => Container(
width: double.infinity,
height: 460.h,
decoration: const BoxDecoration(
decoration: BoxDecoration(
color: AppColors.bottomSheetBgColor,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(24),
@ -773,6 +772,8 @@ class _ReminderTimerDialogState extends State<ReminderTimerDialog> {
String bigTimeText = "00:00";
bool showPicker = false;
CalenderUtilsNew calender = CalenderUtilsNew.instance;
final List<List<String>> presetTimes = [
["06:00 AM", "07:00 AM", "08:00 AM", "09:00 AM"], // Morning
["12:00 PM", "01:00 PM", "02:00 PM", "03:00 PM"], // Noon
@ -972,16 +973,28 @@ class _ReminderTimerDialogState extends State<ReminderTimerDialog> {
if (isPM && hour != 12) hour += 12;
if (!isPM && hour == 12) hour = 0;
int totalMinutes = hour * 60 + minute;
await setCalender(
context,
eventId: widget.med.itemId.toString(),
selectedMinutes: totalMinutes,
await calender.createMultipleEvents(
reminderMinutes: totalMinutes,
frequencyNumber: widget.frequencyNumber,
days: widget.med.days ?? 1,
orderDate: widget.med.orderDate ?? "",
itemDescriptionN: widget.med.itemDescription ?? "",
route: widget.med.route ?? "",
onFailure: (errorMessage) {},
prescriptionNumber: widget.med.itemId.toString()
);
// await setCalender(
// context,
// eventId: widget.med.itemId.toString(),
// selectedMinutes: totalMinutes,
// frequencyNumber: widget.frequencyNumber,
// days: widget.med.days ?? 1,
// orderDate: widget.med.orderDate ?? "",
// itemDescriptionN: widget.med.itemDescription ?? "",
// route: widget.med.route ?? "",
// );
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text(LocaleKeys.reminderAddedToCalendar.tr())),
);

@ -56,7 +56,7 @@ class AllergiesListPage extends StatelessWidget {
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.allergy_info_icon, width: 36.w, height: 36.h, fit: BoxFit.contain).toShimmer2(isShow: true),
Utils.buildSvgWithAssets(icon: AppAssets.allergy_info_icon, width: 36.w, height: 36.h, fit: BoxFit.contain, applyThemeColor: false).toShimmer2(isShow: true),
SizedBox(width: 16.h),
Expanded(
child: Column(
@ -100,7 +100,7 @@ class AllergiesListPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.allergy_info_icon, width: 36.w, height: 36.h, fit: BoxFit.contain),
Utils.buildSvgWithAssets(icon: AppAssets.allergy_info_icon, width: 36.w, height: 36.h, fit: BoxFit.contain, applyThemeColor: false),
SizedBox(height: 16.h),
Row(
crossAxisAlignment: CrossAxisAlignment.start,

@ -241,13 +241,13 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
},
backgroundColor: AppColors.successColor,
borderColor: AppColors.successColor,
textColor: AppColors.whiteColor,
textColor: Colors.white,
fontSize: 14.f,
fontWeight: FontWeight.w500,
borderRadius: 12.r,
height: 40.h,
icon: AppAssets.confirm_appointment_icon,
iconColor: AppColors.whiteColor,
iconColor: Colors.white,
iconSize: 16.h,
)
: SizedBox.shrink())
@ -305,16 +305,16 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
}
},
text: LocaleKeys.getDirections.tr(context: context),
backgroundColor: AppColors.textColor.withValues(alpha: 0.8),
backgroundColor: AppColors.bookAppointment.withValues(alpha: 0.8),
borderColor: AppointmentType.getNextActionButtonColor(widget.patientAppointmentHistoryResponseModel.nextAction).withValues(alpha: 0.01),
textColor: AppColors.whiteColor,
textColor: Colors.white,
fontSize: 14.f,
fontWeight: FontWeight.w500,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
height: 40.h,
icon: AppAssets.directions_icon,
iconColor: AppColors.whiteColor,
iconColor: Colors.white,
iconSize: 14.h,
).paddingAll(12.h),
),
@ -353,7 +353,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
child: Row(
mainAxisSize: MainAxisSize.max,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.prescription_reminder_icon, width: 35.h, height: 35.h),
Utils.buildSvgWithAssets(icon: AppAssets.prescription_reminder_icon, width: 35.h, height: 35.h, applyThemeColor: false),
SizedBox(width: 8.h),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -841,15 +841,15 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
},
backgroundColor: AppColors.successColor,
borderColor: AppColors.successColor,
textColor: AppColors.whiteColor,
fontSize: 16.f,
textColor: Colors.white,
fontSize: 16.f,
fontWeight: FontWeight.w500,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
height: 50.h,
icon: AppAssets.add_icon,
iconColor: AppColors.whiteColor,
iconSize: 18.h,
iconColor: Colors.white,
iconSize: 18.h,
).paddingSymmetrical(16.h, 24.h)
: SizedBox.shrink()
: CustomButton(
@ -860,14 +860,14 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
backgroundColor: AppointmentType.getNextActionButtonColor(widget.patientAppointmentHistoryResponseModel.nextAction),
borderColor:
AppointmentType.getNextActionButtonColor(widget.patientAppointmentHistoryResponseModel.nextAction).withOpacity(0.01),
textColor: widget.patientAppointmentHistoryResponseModel.nextAction == 15 ? AppColors.textColor : AppColors.whiteColor,
textColor: widget.patientAppointmentHistoryResponseModel.nextAction == 15 ? AppColors.textColor : Colors.white,
fontSize: 16.f,
fontWeight: FontWeight.w500,
borderRadius: 12.r,
padding: EdgeInsets.symmetric(horizontal: 10.w),
height: 56.h,
icon: AppointmentType.getNextActionIcon(widget.patientAppointmentHistoryResponseModel.nextAction),
iconColor: AppColors.whiteColor,
iconColor: Colors.white,
iconSize: 18.h,
).paddingSymmetrical(16.h, 24.h),
],
@ -904,7 +904,7 @@ class _AppointmentDetailsPageState extends State<AppointmentDetailsPage> {
},
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
textColor: Colors.white,
fontSize: 16.f,
fontWeight: FontWeight.w500,
borderRadius: 12.r,

@ -318,6 +318,7 @@ class _AppointmentPaymentPageState extends State<AppointmentPaymentPage> {
width: 200.h,
height: 80.h,
fit: BoxFit.contain,
applyThemeColor: false
).paddingSymmetrical(24.h, 0.h).onPress(() {
// payfortVM.setIsApplePayConfigurationLoading(true);
if (Utils.havePrivilege(103)) {

@ -96,10 +96,10 @@ class AppointmentCard extends StatelessWidget {
children: [
AppCustomChipWidget(
icon: isLoading ? AppAssets.walkin_appointment_icon : (isLiveCare ? AppAssets.small_livecare_icon : AppAssets.walkin_appointment_icon),
iconColor: isLoading ? AppColors.textColor : (isLiveCare ? AppColors.whiteColor : AppColors.textColor),
iconColor: isLoading ? AppColors.textColor : (isLiveCare ? Colors.white : AppColors.textColor),
labelText: isLoading ? LocaleKeys.walkin.tr(context: context) : (isLiveCare ? LocaleKeys.livecare.tr(context: context) : LocaleKeys.walkin.tr(context: context)),
backgroundColor: isLoading ? AppColors.greyColor : (isLiveCare ? AppColors.successColor : AppColors.greyColor),
textColor: isLoading ? AppColors.textColor : (isLiveCare ? AppColors.whiteColor : AppColors.textColor),
textColor: isLoading ? AppColors.textColor : (isLiveCare ? Colors.white : AppColors.textColor),
).toShimmer2(isShow: isLoading),
AppCustomChipWidget(
labelText:
@ -145,7 +145,7 @@ class AppointmentCard extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h),
Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h, iconColor: AppColors.ratingColorYellow),
SizedBox(height: 2.h),
(isFoldable || isTablet)
? "${patientAppointmentHistoryResponseModel.decimalDoctorRate}".toText9(isBold: true, color: AppColors.textColor)

@ -68,7 +68,7 @@ class AppointmentDoctorCard extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h),
Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h, iconColor: AppColors.ratingColorYellow),
SizedBox(height: 2.h),
"${patientAppointmentHistoryResponseModel.decimalDoctorRate ?? 0.0}".toText11(isBold: true, color: AppColors.textColor),
],
@ -115,13 +115,13 @@ class AppointmentDoctorCard extends StatelessWidget {
icon: !patientAppointmentHistoryResponseModel.isLiveCareAppointment!
? AppAssets.walkin_appointment_icon
: AppAssets.small_livecare_icon,
iconColor: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.textColor : AppColors.whiteColor,
iconColor: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.textColor : Colors.white,
labelText: patientAppointmentHistoryResponseModel.isLiveCareAppointment!
? LocaleKeys.livecare.tr(context: context)
: LocaleKeys.walkin.tr(context: context),
backgroundColor:
!patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.greyColor : AppColors.successColor,
textColor: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.textColor : AppColors.whiteColor,
textColor: !patientAppointmentHistoryResponseModel.isLiveCareAppointment! ? AppColors.textColor : Colors.white,
),
],
),

@ -5,6 +5,7 @@ import 'package:hmg_patient_app_new/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/ask_doctor/models/ask_doctor_appointments_list.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/ask_doctor_request_type_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/models/resp_models/patient_appointment_history_response_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/my_appointments_view_model.dart';

@ -56,6 +56,7 @@ class HospitalListItem extends StatelessWidget {
children: [
Utils.buildSvgWithAssets(
icon: (hospitalData?.isHMC == true) ? AppAssets.hmc : AppAssets.hmg,
applyThemeColor: false,
).paddingOnly(right: 10),
Expanded(
child: Text(

@ -63,6 +63,7 @@ class RegionListItem extends StatelessWidget {
iconSize: 14.h,
icon: svgPath,
iconHasColor: false,
applyThemeColor: false,
richText: RichText(
text: TextSpan(
text: count,

@ -1,13 +1,21 @@
import 'dart:async';
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/core/utils/size_utils.dart';
import 'package:hmg_patient_app_new/core/utils/utils.dart' show Utils;
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/features/book_appointments/book_appointments_view_model.dart';
import 'package:hmg_patient_app_new/features/my_appointments/appointment_via_region_viewmodel.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/appointments/widgets/region_bottomsheet/region_list_item.dart' show RegionListItem;
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
import 'package:lottie/lottie.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
import '../../../../widgets/common_bottom_sheet.dart';
@ -30,13 +38,52 @@ class _RegionBottomSheetBodyState extends State<RegionBottomSheetBody> {
} else if (regionalViewModel.regionBottomSheetType == RegionBottomSheetType.FOR_CLINIIC) {
myAppointmentsViewModel.getMappedDoctors(onError: (err) {
Navigator.pop(context);
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: err),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
if (myAppointmentsViewModel.selectedClinic.clinicID == 23) {
showCommonBottomSheetWithoutHeight(
context,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
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),
("For booking appointments in the Physiotherapy clinic, please contact: 920066666").toText16(color: AppColors.blackColor),
SizedBox(height: 16.h),
CustomButton(
height: 40.h,
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
text: LocaleKeys.callNow.tr(),
textColor: AppColors.whiteColor,
iconColor: AppColors.whiteColor,
onPressed: () {
launchUrl(
Uri.parse("tel://920066666"),
);
},
icon: AppAssets.call),
],
).center,
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
} else {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: err),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
}
// showCommonBottomSheetWithoutHeight(
// context,
// child: Utils.getErrorWidget(loadingText: err),
// callBackFunc: () {},
// isFullScreen: false,
// isCloseButtonVisible: true,
// );
});
}
});
@ -52,8 +99,8 @@ class _RegionBottomSheetBodyState extends State<RegionBottomSheetBody> {
if (myAppointmentsVM.isRegionListLoading) {
return Container(
height: MediaQuery.of(context).size.height * 0.3,
decoration: const BoxDecoration(
color: Colors.white,
decoration: BoxDecoration(
color: AppColors.whiteColor,
borderRadius: BorderRadius.vertical(top: Radius.circular(16)),
),
child: Center(

@ -109,7 +109,7 @@ class AskDoctorAppointmentCard extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h),
Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h, applyThemeColor: false),
SizedBox(height: 2.h),
"${askDoctorAppointmentHistoryList.decimalDoctorRate}".toText11(isBold: true, color: AppColors.textColor),
],
@ -171,7 +171,18 @@ class AskDoctorAppointmentCard extends StatelessWidget {
child: AskDoctorRequestTypeSelect(
askDoctorRequestTypeList: myAppointmentsViewModel.askDoctorRequestTypeList,
myAppointmentsViewModel: myAppointmentsViewModel,
patientAppointmentHistoryResponseModel: PatientAppointmentHistoryResponseModel()
patientAppointmentHistoryResponseModel: PatientAppointmentHistoryResponseModel(
appointmentNo: askDoctorAppointmentHistoryList.appointmentNo,
doctorID: askDoctorAppointmentHistoryList.doctorID!,
doctorName: askDoctorAppointmentHistoryList.doctorName!,
doctorTitle: askDoctorAppointmentHistoryList.doctorTitle!,
doctorImageURL: askDoctorAppointmentHistoryList.doctorImageURL!,
clinicID: askDoctorAppointmentHistoryList.clinicID!,
clinicName: askDoctorAppointmentHistoryList.clinicName!,
projectID: askDoctorAppointmentHistoryList.projectID!,
projectName: askDoctorAppointmentHistoryList.projectName!,
appointmentDate: askDoctorAppointmentHistoryList.appointmentDate!,
),
// myAppointmentsVM.patientAppointmentsHistoryList[index],
),
callBackFunc: () {},

@ -188,7 +188,8 @@ class LoginScreenState extends State<LoginScreen> {
},
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedBorderColor,
textColor: AppColors.whiteColor,
textColor: Colors.white,
iconColor: Colors.white,
icon: AppAssets.message,
),
),
@ -219,9 +220,10 @@ class LoginScreenState extends State<LoginScreen> {
},
backgroundColor: Colors.white,
borderColor: AppColors.borderOnlyColor,
textColor: AppColors.textColor,
textColor: AppColors.whiteColor,
icon: AppAssets.whatsapp,
iconColor: null,
applyThemeColor: false,
),
),
],

@ -85,7 +85,7 @@ class _RegisterNew extends State<RegisterNew> {
Directionality(
textDirection: Directionality.of(context),
child: Container(
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(24)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(24)),
padding: EdgeInsets.symmetric(horizontal: 16.h),
child: Column(
children: [

@ -76,7 +76,7 @@ class _RegisterNew extends State<RegisterNewStep2> {
LocaleKeys.personalDetailsVerification.tr(context: context).toText26(color: AppColors.textColor, weight: FontWeight.w600, letterSpacing: -2),
SizedBox(height: 24.h),
Container(
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(24)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(24)),
padding: EdgeInsets.only(left: 16.h, right: 16.h),
child: Column(
children: [

@ -230,7 +230,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
children: [
Row(
children: [
Utils.buildSvgWithAssets(icon: AppAssets.search_by_clinic_icon, width: 40.h, height: 40.h),
Utils.buildSvgWithAssets(icon: AppAssets.search_by_clinic_icon, width: 40.h, height: 40.h, applyThemeColor: false),
SizedBox(width: 12.h),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -262,7 +262,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
children: [
Row(
children: [
Utils.buildSvgWithAssets(icon: AppAssets.search_by_doctor_icon, width: 40.h, height: 40.h),
Utils.buildSvgWithAssets(icon: AppAssets.search_by_doctor_icon, width: 40.h, height: 40.h, applyThemeColor: false),
SizedBox(width: 12.h),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -292,7 +292,7 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
children: [
Row(
children: [
Utils.buildSvgWithAssets(icon: AppAssets.search_by_region_icon, width: 40.h, height: 40.h),
Utils.buildSvgWithAssets(icon: AppAssets.search_by_region_icon, width: 40.h, height: 40.h, applyThemeColor: false),
SizedBox(width: 12.h),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -336,9 +336,9 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
children: [
Row(
children: [
Utils.buildSvgWithAssets(icon: AppAssets.search_by_clinic_icon, width: 40.h, height: 40.h),
SizedBox(width: 12.h),
Column(
Utils.buildSvgWithAssets(icon: AppAssets.search_by_clinic_icon, width: 40.h, height: 40.h, applyThemeColor: false),
SizedBox(width: 12.h),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.immediateConsultation.tr(context: context).toText14(color: AppColors.textColor, weight: FontWeight.w500),
@ -378,9 +378,9 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
children: [
Row(
children: [
Utils.buildSvgWithAssets(icon: AppAssets.search_by_doctor_icon, width: 40.h, height: 40.h),
SizedBox(width: 12.h),
Column(
Utils.buildSvgWithAssets(icon: AppAssets.search_by_doctor_icon, width: 40.h, height: 40.h, applyThemeColor: false),
SizedBox(width: 12.h),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
LocaleKeys.scheduledConsultation.tr(context: context).toText14(color: AppColors.textColor, weight: FontWeight.w500),
@ -400,30 +400,6 @@ class _BookAppointmentPageState extends State<BookAppointmentPage> {
),
);
}),
// SizedBox(height: 16.h),
// Divider(color: AppColors.borderOnlyColor.withValues(alpha: 0.1), height: 1.h),
// SizedBox(height: 16.h),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Row(
// children: [
// Utils.buildSvgWithAssets(icon: AppAssets.search_by_region_icon, width: 40.h, height: 40.h),
// SizedBox(width: 12.h),
// Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// LocaleKeys.pharmaLiveCare.tr(context: context).toText14(color: AppColors.textColor, weight: FontWeight.w500),
// "".toText12(color: AppColors.primaryRedColor, fontWeight: FontWeight.w500),
// ],
// ),
// ],
// ),
// Transform.flip(flipX: appState.isArabic(), child: Utils.buildSvgWithAssets(icon: AppAssets.forward_arrow_icon, iconColor: AppColors.textColor, width: 40.h, height: 40.h)),
// ],
// ).onPress(() {
// openRegionListBottomSheet(context, RegionBottomSheetType.FOR_REGION);
// }),
],
),
),

@ -159,7 +159,7 @@ class DoctorsFilters extends StatelessWidget{
Spacer(),
DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: Colors.white,
color: AppColors.whiteColor,
customBorder: BorderRadius.only(topLeft: Radius.circular(24.h), topRight: Radius.circular(24.h)) ,
),

@ -106,6 +106,7 @@ class DoctorProfilePage extends StatelessWidget {
width: 48.w,
height: 48.h,
fit: BoxFit.contain,
applyThemeColor: false
),
SizedBox(height: 16.h),
"Ratings".toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor),
@ -132,6 +133,7 @@ class DoctorProfilePage extends StatelessWidget {
width: 48.w,
height: 48.h,
fit: BoxFit.contain,
applyThemeColor: false
),
SizedBox(height: 16.h),
"Reviews".toText12(fontWeight: FontWeight.w500, color: AppColors.greyTextColor),
@ -172,6 +174,10 @@ class DoctorProfilePage extends StatelessWidget {
child: CustomButton(
text: LocaleKeys.viewAvailableAppointments.tr(),
onPressed: () async {
bookAppointmentsViewModel.selectedDoctor.speciality = bookAppointmentsViewModel.doctorsProfileResponseModel.specialty;
bookAppointmentsViewModel.selectedDoctor.specialityN = bookAppointmentsViewModel.doctorsProfileResponseModel.specialty;
bookAppointmentsViewModel.selectedDoctor.name = bookAppointmentsViewModel.doctorsProfileResponseModel.doctorName;
bookAppointmentsViewModel.selectedDoctor.name = bookAppointmentsViewModel.doctorsProfileResponseModel.doctorName;
LoaderBottomSheet.showLoader();
bookAppointmentsViewModel.isLiveCareSchedule
? await bookAppointmentsViewModel.getLiveCareDoctorFreeSlots(
@ -223,14 +229,14 @@ class DoctorProfilePage extends StatelessWidget {
},
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
textColor: Colors.white,
fontSize: 16,
fontWeight: FontWeight.w500,
borderRadius: 12,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 50.h,
icon: AppAssets.calendar,
iconColor: AppColors.whiteColor,
iconColor: Colors.white,
iconSize: 20.h,
).paddingSymmetrical(24.h, 24.h),
),

@ -84,7 +84,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
AppCustomChipWidget(labelText: "${appState.getAuthenticatedUser()!.age} ${LocaleKeys.yearsOld.tr(context: context)}"),
AppCustomChipWidget(
labelText:
"${LocaleKeys.clinic.tr()}: ${(appState.isArabic() ? immediateLiveCareVM.immediateLiveCareSelectedClinic.serviceNameN : immediateLiveCareVM.immediateLiveCareSelectedClinic.serviceName)!}"),
"${LocaleKeys.clinic.tr()}: ${(appState.isArabic() ? immediateLiveCareVM.immediateLiveCareSelectedClinic.serviceNameN : immediateLiveCareVM.immediateLiveCareSelectedClinic.serviceName) ?? ""}"),
],
),
],
@ -110,7 +110,7 @@ class ImmediateLiveCarePaymentDetails extends StatelessWidget {
children: [
Row(
children: [
Utils.buildSvgWithAssets(icon: getLiveCareTypeIcon(immediateLiveCareVM.liveCareSelectedCallType), width: 32.h, height: 32.h, fit: BoxFit.contain),
Utils.buildSvgWithAssets(icon: getLiveCareTypeIcon(immediateLiveCareVM.liveCareSelectedCallType), width: 32.h, height: 32.h, fit: BoxFit.contain, applyThemeColor: false),
SizedBox(width: 8.h),
getLiveCareType(context, immediateLiveCareVM.liveCareSelectedCallType).toText16(isBold: true),
],

@ -292,6 +292,7 @@ class _ImmediateLiveCarePaymentPageState extends State<ImmediateLiveCarePaymentP
width: 200.h,
height: 80.h,
fit: BoxFit.contain,
applyThemeColor: false
).paddingSymmetrical(24.h, 0.h).onPress(() {
// payfortVM.setIsApplePayConfigurationLoading(true);
if (Utils.havePrivilege(103)) {

@ -117,7 +117,7 @@ class _ImmediateLiveCarePendingRequestPageState extends State<ImmediateLiveCareP
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
AppCustomChipWidget(
labelText: immediateLiveCareViewModel.patientLiveCareHistoryList[0].stringCallStatus,
labelText: immediateLiveCareViewModel.patientLiveCareHistoryList.isNotEmpty ? immediateLiveCareViewModel.patientLiveCareHistoryList[0].stringCallStatus : "",
backgroundColor: AppColors.warningColorYellow.withValues(alpha: 0.20),
textColor: AppColors.alertColor,
),

@ -61,7 +61,7 @@ class SelectLiveCareCallType extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Utils.buildSvgWithAssets(icon: icon, width: 40.h, height: 40.h, fit: BoxFit.fill),
Utils.buildSvgWithAssets(icon: icon, width: 40.h, height: 40.h, fit: BoxFit.fill, applyThemeColor: false),
SizedBox(height: 16.h),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,

@ -225,7 +225,7 @@ class _ReviewAppointmentPageState extends State<ReviewAppointmentPage> {
},
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
textColor: Colors.white,
fontSize: 16,
fontWeight: FontWeight.w500,
borderRadius: 12,

@ -313,6 +313,7 @@ class _WaitingAppointmentPaymentPageState extends State<WaitingAppointmentPaymen
width: 200.h,
height: 80.h,
fit: BoxFit.contain,
applyThemeColor: false
).paddingSymmetrical(24.h, 0.h).onPress(() {
// payfortVM.setIsApplePayConfigurationLoading(true);
if (Utils.havePrivilege(103)) {

@ -262,7 +262,7 @@ class _AppointmentCalendarState extends State<AppointmentCalendar> {
},
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
textColor: Colors.white,
fontSize: 16.f,
fontWeight: FontWeight.w500,
borderRadius: 10.r,
@ -344,7 +344,7 @@ class TimeSlotChip extends StatelessWidget {
? Container(
padding: EdgeInsets.symmetric(horizontal: 14.h, vertical: 8.h),
decoration: ShapeDecoration(
color: isSelected ? AppColors.warningColorYellow : AppColors.whiteColor,
color: isSelected ? AppColors.warningColorYellow : AppColors.textColor,
shape: SmoothRectangleBorder(
borderRadius: BorderRadius.circular(8.h),
smoothness: 1,
@ -367,8 +367,8 @@ class TimeSlotChip extends StatelessWidget {
),
),
child: label.toText12(
color: isSelected ? AppColors.primaryRedColor : Colors.black87,
fontWeight: FontWeight.w500,
color: isSelected ? AppColors.primaryRedColor : AppColors.textColor,
fontWeight: FontWeight.w500,
),
),
);

@ -34,7 +34,7 @@ class ClinicCard extends StatelessWidget {
Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [
Utils.buildSvgWithAssets(icon: "assets/images/clinicIcons/${clinicsListResponseModel.clinicID ?? 1}.svg", width: 24.w, height: 24.h, fit: BoxFit.contain).toShimmer2(isShow: isLoading),
(clinicsListResponseModel.isLiveCareClinicAndOnline ?? true)
? Utils.buildSvgWithAssets(icon: AppAssets.livecare_clinic_icon, width: 32.w, height: 32.h, fit: BoxFit.contain).toShimmer2(isShow: isLoading)
? Utils.buildSvgWithAssets(icon: AppAssets.livecare_clinic_icon, width: 32.w, height: 32.h, fit: BoxFit.contain, applyThemeColor: false).toShimmer2(isShow: isLoading)
: SizedBox.shrink(),
],
),

@ -15,6 +15,8 @@ import 'package:hmg_patient_app_new/widgets/buttons/custom_button.dart';
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:lottie/lottie.dart';
import 'package:url_launcher/url_launcher.dart';
class DoctorCard extends StatelessWidget {
const DoctorCard({
@ -72,7 +74,7 @@ class DoctorCard extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h),
Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h, applyThemeColor: false),
SizedBox(height: 2.h),
"${isLoading ? 4.78 : doctorsListResponseModel.decimalDoctorRate}".toText11(isBold: true, color: AppColors.textColor),
],
@ -198,13 +200,52 @@ class DoctorCard extends StatelessWidget {
},
onError: (err) {
LoaderBottomSheet.hideLoader();
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: err),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
if (bookAppointmentsViewModel.selectedClinic.clinicID == 23) {
showCommonBottomSheetWithoutHeight(
context,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
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),
("For booking appointments in the Physiotherapy clinic, please contact: 920066666").toText16(color: AppColors.blackColor),
SizedBox(height: 16.h),
CustomButton(
height: 40.h,
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
text: LocaleKeys.callNow.tr(),
textColor: AppColors.whiteColor,
iconColor: AppColors.whiteColor,
onPressed: () {
launchUrl(
Uri.parse("tel://920066666"),
);
},
icon: AppAssets.call),
],
).center,
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
} else {
showCommonBottomSheetWithoutHeight(
context,
child: Utils.getErrorWidget(loadingText: err),
callBackFunc: () {},
isFullScreen: false,
isCloseButtonVisible: true,
);
}
// showCommonBottomSheetWithoutHeight(
// context,
// child: Utils.getErrorWidget(loadingText: err),
// callBackFunc: () {},
// isFullScreen: false,
// isCloseButtonVisible: true,
// );
});
},
backgroundColor: Color(0xffFEE9EA),

@ -69,13 +69,13 @@ class DoctorRatingDetails extends StatelessWidget {
Container(
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(LocaleKeys.excellent.tr(context: context), style: TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w600))),
child: Text(LocaleKeys.excellent.tr(context: context), style: TextStyle(fontSize: 13.0, color: AppColors.textColor, fontWeight: FontWeight.w600))),
getRatingLine(bookAppointmentsVM.doctorDetailsList[0].ratio, Colors.green[700]!),
],
),
Container(
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
child: Text("${getRatingWidth(bookAppointmentsVM.doctorDetailsList[0].ratio).round()}%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
child: Text("${getRatingWidth(bookAppointmentsVM.doctorDetailsList[0].ratio).round()}%", style: TextStyle(fontSize: 14.0, color: AppColors.textColor, fontWeight: FontWeight.w600)),
),
],
),
@ -89,13 +89,13 @@ class DoctorRatingDetails extends StatelessWidget {
Container(
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(LocaleKeys.vGood.tr(context: context), style: TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w600))),
child: Text(LocaleKeys.vGood.tr(context: context), style: TextStyle(fontSize: 13.0, color: AppColors.textColor, fontWeight: FontWeight.w600))),
getRatingLine(bookAppointmentsVM.doctorDetailsList[1].ratio, Color(0xffB7B723)),
],
),
Container(
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
child: Text("${bookAppointmentsVM.doctorDetailsList[1].ratio.round()}%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
child: Text("${bookAppointmentsVM.doctorDetailsList[1].ratio.round()}%", style: TextStyle(fontSize: 14.0, color: AppColors.textColor, fontWeight: FontWeight.w600)),
),
],
),
@ -109,13 +109,13 @@ class DoctorRatingDetails extends StatelessWidget {
Container(
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(LocaleKeys.good.tr(context: context), style: TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w600))),
child: Text(LocaleKeys.good.tr(context: context), style: TextStyle(fontSize: 13.0, color: AppColors.textColor, fontWeight: FontWeight.w600))),
getRatingLine(bookAppointmentsVM.doctorDetailsList[2].ratio, Color(0xffEBA727)),
],
),
Container(
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
child: Text("${bookAppointmentsVM.doctorDetailsList[2].ratio.round()}%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
child: Text("${bookAppointmentsVM.doctorDetailsList[2].ratio.round()}%", style: TextStyle(fontSize: 14.0, color: AppColors.textColor, fontWeight: FontWeight.w600)),
),
],
),
@ -129,13 +129,13 @@ class DoctorRatingDetails extends StatelessWidget {
Container(
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(LocaleKeys.average.tr(context: context), style: TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w600))),
child: Text(LocaleKeys.average.tr(context: context), style: TextStyle(fontSize: 13.0, color: AppColors.textColor, fontWeight: FontWeight.w600))),
getRatingLine(bookAppointmentsVM.doctorDetailsList[3].ratio, Color(0xffEB7227)),
],
),
Container(
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
child: Text("${bookAppointmentsVM.doctorDetailsList[3].ratio.round()}%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
child: Text("${bookAppointmentsVM.doctorDetailsList[3].ratio.round()}%", style: TextStyle(fontSize: 14.0, color: AppColors.textColor, fontWeight: FontWeight.w600)),
),
],
),
@ -150,13 +150,13 @@ class DoctorRatingDetails extends StatelessWidget {
Container(
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(LocaleKeys.average.tr(context: context), style: TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w600))),
child: Text(LocaleKeys.average.tr(context: context), style: TextStyle(fontSize: 13.0, color: AppColors.textColor, fontWeight: FontWeight.w600))),
getRatingLine(bookAppointmentsVM.doctorDetailsList[4].ratio, Color(0xffE20C0C)),
],
),
Container(
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
child: Text("${bookAppointmentsVM.doctorDetailsList[4].ratio.round()}%", style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
child: Text("${bookAppointmentsVM.doctorDetailsList[4].ratio.round()}%", style: TextStyle(fontSize: 14.0, color: AppColors.textColor, fontWeight: FontWeight.w600)),
),
],
),

@ -122,12 +122,12 @@ class LiveChatPage extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
("${appState.isArabic() ? contactUsVM.liveChatProjectsList[index].projectNameN! : contactUsVM.liveChatProjectsList[index].projectName!}\n${contactUsVM.liveChatProjectsList[index].distanceInKilometers!} KM")
.toText14(isBold: true, color: contactUsVM.selectedLiveChatProjectIndex == index ? AppColors.whiteColor : AppColors.textColor),
.toText14(isBold: true, color: contactUsVM.selectedLiveChatProjectIndex == index ? Colors.white : AppColors.textColor),
Transform.flip(
flipX: getIt.get<AppState>().isArabic(),
child: Utils.buildSvgWithAssets(
icon: AppAssets.forward_arrow_icon_small,
iconColor: contactUsVM.selectedLiveChatProjectIndex == index ? AppColors.whiteColor : AppColors.textColor,
iconColor: contactUsVM.selectedLiveChatProjectIndex == index ? Colors.white : AppColors.textColor,
width: 18.h,
height: 13.h,
fit: BoxFit.contain,
@ -235,7 +235,7 @@ class LiveChatPage extends StatelessWidget {
},
backgroundColor: contactUsVM.selectedLiveChatProjectIndex == -1 ? AppColors.greyColor : AppColors.primaryRedColor,
borderColor: contactUsVM.selectedLiveChatProjectIndex == -1 ? AppColors.greyColor : AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
textColor: Colors.white,
fontSize: 16,
fontWeight: FontWeight.w500,
borderRadius: 12,

@ -102,9 +102,9 @@ class FindUsItemCard extends StatelessWidget {
AppCustomChipWidget(
labelText: LocaleKeys.callNow.tr(),
icon: AppAssets.call_fill,
iconColor: AppColors.whiteColor,
iconColor: Colors.white,
backgroundColor: AppColors.primaryRedColor.withValues(alpha: 1.0),
textColor: AppColors.whiteColor,
textColor: Colors.white,
onChipTap: () {
launchUrl(Uri.parse("tel://" + "${getHMGLocationsModel.phoneNumber}"));
},

@ -133,6 +133,7 @@ class _CovidPaymentScreenState extends State<CovidPaymentScreen> {
width: 200.h,
height: 80.h,
fit: BoxFit.contain,
applyThemeColor: false
).paddingSymmetrical(24.h, 0.h).onPress(() {
if (Utils.havePrivilege(103)) {
startApplePay();

@ -171,7 +171,7 @@ class _NewReferralPageState extends State<NewReferralPage> {
);
},
bottomChild: Container(
color: Colors.white,
color: AppColors.whiteColor,
padding: EdgeInsets.all(ResponsiveExtension(20).h),
child: CustomButton(
text: _currentStep <= 1 ? LocaleKeys.next.tr() : LocaleKeys.submit.tr(),

@ -90,7 +90,8 @@ class OTPService {
},
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedBorderColor,
textColor: AppColors.whiteColor,
textColor: Colors.white,
iconColor: Colors.white,
icon: AppAssets.message,
),
),

@ -6,6 +6,7 @@ import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
import 'package:hmg_patient_app_new/presentation/e_referral/e_referral_form_manager.dart';
import 'package:hmg_patient_app_new/theme/colors.dart';
import 'package:provider/provider.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/features/hmg_services/hmg_services_view_model.dart';
@ -121,7 +122,7 @@ class RequesterFormStepState extends State<RequesterFormStep> {
errorMessage: formManager.errors.relationship,
hasError: !ValidationUtils.isNullOrEmpty(formManager.errors.relationship),
hasSelectionCustomIcon: false,
labelColor: Colors.black,
labelColor: AppColors.textColor,
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
leadingIcon: AppAssets.user_circle,
dropdownItems: [],
@ -171,8 +172,8 @@ class RequesterFormStepState extends State<RequesterFormStep> {
return DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: Colors.white,
customBorder: BorderRadius.all(Radius.circular(24.h)) ,
color: AppColors.whiteColor,
customBorder: BorderRadius.all(Radius.circular(24.h)) ,
), child: ListView.builder(
shrinkWrap: true,

@ -28,7 +28,7 @@ class RrtRequestTypeSelect extends StatelessWidget {
),
DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: Colors.white,
color: AppColors.whiteColor,
borderRadius: 20.r,
),
child: OptionSelection(context)),

@ -79,7 +79,7 @@ class CallAmbulancePage extends StatelessWidget {
),
Align(
alignment: AlignmentDirectional.topStart,
child: Utils.buildSvgWithAssets(icon: AppAssets.closeBottomNav, width: 32.h, height: 32.h).onPress(() {
child: Utils.buildSvgWithAssets(icon: AppAssets.closeBottomNav, width: 32.h, height: 32.h, applyThemeColor: false).onPress(() {
context.read<EmergencyServicesViewModel>().flushPickupInformation();
Navigator.pop(context);
}),

@ -52,6 +52,7 @@ class TypeSelectionWidget extends StatelessWidget {
child: AppCustomChipWidget(
icon: AppAssets.hmg,
iconHasColor: false,
applyThemeColor: false,
labelText: LocaleKeys.hmgHospitals.tr(context: context),
shape: RoundedRectangleBorder(
side: BorderSide(
@ -76,6 +77,7 @@ class TypeSelectionWidget extends StatelessWidget {
child: AppCustomChipWidget(
icon: AppAssets.hmc,
iconHasColor: false,
applyThemeColor: false,
labelText: LocaleKeys.hmcMedicalClinic.tr(context: context),
shape: RoundedRectangleBorder(
side: BorderSide(

@ -53,7 +53,7 @@ class EmergencyServicesPage extends StatelessWidget {
),
child: Row(
children: [
Utils.buildSvgWithAssets(icon: AppAssets.call_ambulance_icon, width: 40.h, height: 40.h),
Utils.buildSvgWithAssets(icon: AppAssets.call_ambulance_icon, width: 40.h, height: 40.h, applyThemeColor: false),
SizedBox(width: 12.h),
Expanded(
child: Column(
@ -87,7 +87,7 @@ class EmergencyServicesPage extends StatelessWidget {
"".toText14(),
Utils.buildSvgWithAssets(
icon: AppAssets.cancel_circle_icon,
iconColor: AppColors.whiteColor,
iconColor: Colors.white,
width: 24.h,
height: 24.h,
fit: BoxFit.contain,
@ -99,10 +99,10 @@ class EmergencyServicesPage extends StatelessWidget {
Lottie.asset(AppAnimations.ambulanceAlert,
repeat: false, reverse: false, frameRate: FrameRate(60), width: 120.h, height: 120.h, fit: BoxFit.contain),
SizedBox(height: 8.h),
LocaleKeys.confirmation.tr().toText28(color: AppColors.whiteColor, isBold: true),
LocaleKeys.confirmation.tr().toText28(color: Colors.white, isBold: true),
SizedBox(height: 8.h),
LocaleKeys.areYouSureYouWantToCallAmbulance.tr()
.toText14(color: AppColors.whiteColor, weight: FontWeight.w500),
.toText14(color: Colors.white, weight: FontWeight.w500),
SizedBox(height: 24.h),
CustomButton(
text: LocaleKeys.confirm.tr(context: context),
@ -111,8 +111,8 @@ class EmergencyServicesPage extends StatelessWidget {
await emergencyServicesViewModel.getTransportationOption();
openTranportationSelectionBottomSheet(context);
},
backgroundColor: AppColors.whiteColor,
borderColor: AppColors.whiteColor,
backgroundColor: Colors.white,
borderColor: Colors.white,
textColor: AppColors.primaryRedColor,
icon: AppAssets.checkmark_icon,
iconColor: AppColors.primaryRedColor,
@ -140,7 +140,7 @@ class EmergencyServicesPage extends StatelessWidget {
),
child: Row(
children: [
Utils.buildSvgWithAssets(icon: AppAssets.nearest_er_icon, width: 40.h, height: 40.h),
Utils.buildSvgWithAssets(icon: AppAssets.nearest_er_icon, width: 40.h, height: 40.h, applyThemeColor: false),
SizedBox(width: 12.h),
Expanded(
child: Column(
@ -169,7 +169,7 @@ class EmergencyServicesPage extends StatelessWidget {
),
child: Row(
children: [
Utils.buildSvgWithAssets(icon: AppAssets.rrt_icon, width: 40.h, height: 40.h),
Utils.buildSvgWithAssets(icon: AppAssets.rrt_icon, width: 40.h, height: 40.h, applyThemeColor: false),
SizedBox(width: 12.h),
Expanded(
child: Column(
@ -199,10 +199,10 @@ class EmergencyServicesPage extends StatelessWidget {
children: [
Lottie.asset(AppAnimations.ambulanceAlert, repeat: false, reverse: false, frameRate: FrameRate(60), width: 120.h, height: 120.h, fit: BoxFit.contain),
SizedBox(height: 8.h),
LocaleKeys.confirm.tr().toText28(color: AppColors.whiteColor, isBold: true),
LocaleKeys.confirm.tr().toText28(color: Colors.white, isBold: true),
SizedBox(height: 8.h),
LocaleKeys.areYouSureYouWantToCallRRT.tr()
.toText14(color: AppColors.whiteColor, weight: FontWeight.w500),
.toText14(color: Colors.white, weight: FontWeight.w500),
SizedBox(height: 24.h),
CustomButton(
text: LocaleKeys.confirm.tr(context: context),
@ -237,8 +237,8 @@ class EmergencyServicesPage extends StatelessWidget {
);
});
},
backgroundColor: AppColors.whiteColor,
borderColor: AppColors.whiteColor,
backgroundColor: Colors.white,
borderColor: Colors.white,
textColor: AppColors.primaryRedColor,
icon: AppAssets.checkmark_icon,
iconColor: AppColors.primaryRedColor,
@ -268,7 +268,7 @@ class EmergencyServicesPage extends StatelessWidget {
),
child: Row(
children: [
Utils.buildSvgWithAssets(icon: AppAssets.rrt_icon, width: 40.h, height: 40.h),
Utils.buildSvgWithAssets(icon: AppAssets.rrt_icon, width: 40.h, height: 40.h, applyThemeColor: false),
SizedBox(width: 12.h),
Expanded(
child: Column(
@ -311,9 +311,9 @@ class EmergencyServicesPage extends StatelessWidget {
Lottie.asset(AppAnimations.ambulanceAlert,
repeat: false, reverse: false, frameRate: FrameRate(60), width: 120.h, height: 120.h, fit: BoxFit.contain),
SizedBox(height: 8.h),
LocaleKeys.confirm.tr().toText28(color: AppColors.whiteColor, isBold: true),
LocaleKeys.confirm.tr().toText28(color: Colors.white, isBold: true),
SizedBox(height: 8.h),
LocaleKeys.areYouSureYouWantToMakeERCheckIn.tr().toText14(color: AppColors.whiteColor, weight: FontWeight.w500),
LocaleKeys.areYouSureYouWantToMakeERCheckIn.tr().toText14(color: Colors.white, weight: FontWeight.w500),
SizedBox(height: 24.h),
CustomButton(
text: LocaleKeys.confirm.tr(context: context),
@ -325,8 +325,8 @@ class EmergencyServicesPage extends StatelessWidget {
context.read<EmergencyServicesViewModel>().navigateToEROnlineCheckIn();
});
},
backgroundColor: AppColors.whiteColor,
borderColor: AppColors.whiteColor,
backgroundColor: Colors.white,
borderColor: Colors.white,
textColor: AppColors.primaryRedColor,
icon: AppAssets.checkmark_icon,
iconColor: AppColors.primaryRedColor,

@ -288,6 +288,7 @@ class _ErOnlineCheckinPaymentPageState extends State<ErOnlineCheckinPaymentPage>
width: 200.h,
height: 80.h,
fit: BoxFit.contain,
applyThemeColor: false
).paddingSymmetrical(24.h, 0.h).onPress(() {
if (Utils.havePrivilege(103)) {
startApplePay();

@ -26,7 +26,7 @@ class AmbulanceHistoryItem extends StatelessWidget {
Widget build(BuildContext context) {
return DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: Colors.white,
color: AppColors.whiteColor,
hasShadow: true,
customBorder: BorderRadius.all(
Radius.circular(20.h),

@ -26,7 +26,7 @@ class RRTItem extends StatelessWidget {
Widget build(BuildContext context) {
return DecoratedBox(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: Colors.white,
color: AppColors.whiteColor,
hasShadow: true,
customBorder: BorderRadius.all(
Radius.circular(20.h),

@ -27,7 +27,7 @@ class NearestERItem extends StatelessWidget {
Widget build(BuildContext context) {
return Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: Colors.white,
color: AppColors.whiteColor,
customBorder: BorderRadius.only(
topLeft: Radius.circular(24.h),
topRight: Radius.circular(24.h),

@ -133,7 +133,7 @@ class _RechargeWalletPageState extends State<RechargeWalletPage> {
children: [
Row(
children: [
Utils.buildSvgWithAssets(icon: AppAssets.my_account_icon, width: 40.h, height: 40.h),
Utils.buildSvgWithAssets(icon: AppAssets.my_account_icon, width: 40.h, height: 40.h, applyThemeColor: false),
SizedBox(width: 8.h),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -171,7 +171,7 @@ class _RechargeWalletPageState extends State<RechargeWalletPage> {
children: [
Row(
children: [
Utils.buildSvgWithAssets(icon: AppAssets.select_hospital_icon, width: 40.h, height: 40.h),
Utils.buildSvgWithAssets(icon: AppAssets.select_hospital_icon, width: 40.h, height: 40.h, applyThemeColor: false),
SizedBox(width: 8.h),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -197,7 +197,7 @@ class _RechargeWalletPageState extends State<RechargeWalletPage> {
SizedBox(height: 16.h),
Row(
children: [
Utils.buildSvgWithAssets(icon: AppAssets.email_icon, width: 40.h, height: 40.h),
Utils.buildSvgWithAssets(icon: AppAssets.email_icon, width: 40.h, height: 40.h, applyThemeColor: false),
SizedBox(width: 8.h),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -281,14 +281,14 @@ class _RechargeWalletPageState extends State<RechargeWalletPage> {
},
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
textColor: Colors.white,
fontSize: 16,
fontWeight: FontWeight.w500,
borderRadius: 12,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 50.h,
icon: AppAssets.appointment_pay_icon,
iconColor: AppColors.whiteColor,
iconColor: Colors.white,
iconSize: 18.h,
).paddingSymmetrical(24.h, 24.h),
),

@ -188,10 +188,7 @@ class _WalletPaymentConfirmPageState extends State<WalletPaymentConfirmPage> {
Platform.isIOS
? Utils.buildSvgWithAssets(
icon: AppAssets.apple_pay_button,
width: 200.h,
height: 56.h,
fit: BoxFit.contain,
).paddingSymmetrical(24.h, 0.h).onPress(() {
width: 200.h, height: 56.h, fit: BoxFit.contain, applyThemeColor: false).paddingSymmetrical(24.h, 0.h).onPress(() {
if (Utils.havePrivilege(103)) {
startApplePay();
} else {

@ -54,6 +54,7 @@ class HospitalListItemAdvancePayment extends StatelessWidget {
children: [
Utils.buildSvgWithAssets(
icon: (hospitalModel.isHMC == true) ? AppAssets.hmc : AppAssets.hmg,
applyThemeColor: false
).paddingOnly(right: 10),
Expanded(
child: Text(

@ -39,10 +39,10 @@ class _HealthCalculatorsPageState extends State<HealthCalculatorsPage> {
? Column(
children: [
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: Colors.white, borderRadius: 20.r),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.r),
child: Row(
children: [
Utils.buildSvgWithAssets(icon: AppAssets.general_health, height: 40.h, width: 40.w, fit: BoxFit.none),
Utils.buildSvgWithAssets(icon: AppAssets.general_health, height: 40.h, width: 40.w, fit: BoxFit.none, applyThemeColor: false),
SizedBox(width: 12.w),
Flexible(
child: Column(
@ -70,10 +70,10 @@ class _HealthCalculatorsPageState extends State<HealthCalculatorsPage> {
}),
SizedBox(height: 16.h),
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: Colors.white, borderRadius: 20.r),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.r),
child: Row(
children: [
Utils.buildSvgWithAssets(icon: AppAssets.women_health, height: 40.h, width: 40.w, fit: BoxFit.none),
Utils.buildSvgWithAssets(icon: AppAssets.women_health, height: 40.h, width: 40.w, fit: BoxFit.none, applyThemeColor: false),
SizedBox(width: 12.w),
Flexible(
child: Column(
@ -102,11 +102,11 @@ class _HealthCalculatorsPageState extends State<HealthCalculatorsPage> {
: Column(
children: [
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: Colors.white, borderRadius: 20.r),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.r),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.bloodSugar, height: 40.h, width: 40.w, fit: BoxFit.none),
Utils.buildSvgWithAssets(icon: AppAssets.bloodSugar, height: 40.h, width: 40.w, fit: BoxFit.none, applyThemeColor: false),
SizedBox(width: 12.w),
Flexible(
child: Column(
@ -136,11 +136,11 @@ class _HealthCalculatorsPageState extends State<HealthCalculatorsPage> {
}),
SizedBox(height: 16.h),
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: Colors.white, borderRadius: 20.r),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.r),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.bloodCholestrol, height: 40.h, width: 40.w, fit: BoxFit.none),
Utils.buildSvgWithAssets(icon: AppAssets.bloodCholestrol, height: 40.h, width: 40.w, fit: BoxFit.none, applyThemeColor: false),
SizedBox(width: 12.w),
Flexible(
child: Column(
@ -166,11 +166,11 @@ class _HealthCalculatorsPageState extends State<HealthCalculatorsPage> {
}),
SizedBox(height: 16.h),
Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: Colors.white, borderRadius: 20.r),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.r),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.triglycerides, height: 40.h, width: 40.w, fit: BoxFit.none),
Utils.buildSvgWithAssets(icon: AppAssets.triglycerides, height: 40.h, width: 40.w, fit: BoxFit.none, applyThemeColor: false),
SizedBox(width: 12.w),
Flexible(
child: Column(

@ -85,7 +85,7 @@ class _BodyFatWidgetState extends State<BodyFatWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.gender, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.gender, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
child: Row(
@ -111,7 +111,7 @@ class _BodyFatWidgetState extends State<BodyFatWidget> {
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)),
child: ListView.separated(
shrinkWrap: true,
itemCount: _genders.length,
@ -165,7 +165,7 @@ class _BodyFatWidgetState extends State<BodyFatWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.height, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.height, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
flex: 3,
@ -221,7 +221,7 @@ class _BodyFatWidgetState extends State<BodyFatWidget> {
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)),
child: ListView.separated(
shrinkWrap: true,
itemCount: _heightUnits.length,
@ -277,7 +277,7 @@ class _BodyFatWidgetState extends State<BodyFatWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
flex: 3,
@ -338,7 +338,7 @@ class _BodyFatWidgetState extends State<BodyFatWidget> {
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)),
child: ListView.separated(
shrinkWrap: true,
itemCount: _heightUnits.length,
@ -394,7 +394,7 @@ class _BodyFatWidgetState extends State<BodyFatWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
flex: 3,
@ -455,7 +455,7 @@ class _BodyFatWidgetState extends State<BodyFatWidget> {
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)),
child: ListView.separated(
shrinkWrap: true,
itemCount: _heightUnits.length,
@ -511,7 +511,7 @@ class _BodyFatWidgetState extends State<BodyFatWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
flex: 3,
@ -572,7 +572,7 @@ class _BodyFatWidgetState extends State<BodyFatWidget> {
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)),
child: ListView.separated(
shrinkWrap: true,
itemCount: _heightUnits.length,

@ -67,7 +67,7 @@ class _BMIWidgetState extends State<BMIWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.height, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.height, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
flex: 3,
@ -123,7 +123,7 @@ class _BMIWidgetState extends State<BMIWidget> {
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)),
child: ListView.separated(
shrinkWrap: true,
itemCount: _heightUnits.length,
@ -179,7 +179,7 @@ class _BMIWidgetState extends State<BMIWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
flex: 3,
@ -240,7 +240,7 @@ class _BMIWidgetState extends State<BMIWidget> {
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)),
child: ListView.separated(
shrinkWrap: true,
itemCount: _weightUnits.length,

@ -80,7 +80,7 @@ class _BMRWidgetState extends State<BMRWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.gender, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.gender, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
child: Row(
@ -107,7 +107,7 @@ class _BMRWidgetState extends State<BMRWidget> {
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)),
child: ListView.separated(
shrinkWrap: true,
itemCount: _genders.length,
@ -162,7 +162,7 @@ class _BMRWidgetState extends State<BMRWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.age, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.age, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
flex: 3,
@ -199,7 +199,7 @@ class _BMRWidgetState extends State<BMRWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.height, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.height, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
flex: 3,
@ -255,7 +255,7 @@ class _BMRWidgetState extends State<BMRWidget> {
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)),
child: ListView.separated(
shrinkWrap: true,
itemCount: _heightUnits.length,
@ -312,7 +312,7 @@ class _BMRWidgetState extends State<BMRWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
flex: 3,
@ -373,7 +373,7 @@ class _BMRWidgetState extends State<BMRWidget> {
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)),
child: ListView.separated(
shrinkWrap: true,
itemCount: _weightUnits.length,
@ -430,7 +430,7 @@ class _BMRWidgetState extends State<BMRWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.activity, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.activity, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
child: Row(
@ -456,7 +456,7 @@ class _BMRWidgetState extends State<BMRWidget> {
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)),
child: ListView.separated(
shrinkWrap: true,
itemCount: _activity.length,

@ -81,7 +81,7 @@ class _CaloriesWidgetState extends State<CaloriesWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.gender, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.gender, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
child: Row(
@ -108,7 +108,7 @@ class _CaloriesWidgetState extends State<CaloriesWidget> {
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)),
child: ListView.separated(
shrinkWrap: true,
itemCount: _genders.length,
@ -162,7 +162,7 @@ class _CaloriesWidgetState extends State<CaloriesWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.age, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.age, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
flex: 3,
@ -199,7 +199,7 @@ class _CaloriesWidgetState extends State<CaloriesWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.height, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.height, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
flex: 3,
@ -255,7 +255,7 @@ class _CaloriesWidgetState extends State<CaloriesWidget> {
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)),
child: ListView.separated(
shrinkWrap: true,
itemCount: _heightUnits.length,
@ -311,7 +311,7 @@ class _CaloriesWidgetState extends State<CaloriesWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
flex: 3,
@ -372,7 +372,7 @@ class _CaloriesWidgetState extends State<CaloriesWidget> {
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)),
child: ListView.separated(
shrinkWrap: true,
itemCount: _weightUnits.length,
@ -429,7 +429,7 @@ class _CaloriesWidgetState extends State<CaloriesWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.activity, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.activity, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
child: Row(
@ -455,7 +455,7 @@ class _CaloriesWidgetState extends State<CaloriesWidget> {
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)),
child: ListView.separated(
shrinkWrap: true,
itemCount: _activity.length,

@ -62,7 +62,7 @@ class _CrabsWidgetState extends State<CrabsWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.age, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.age, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
flex: 3,
@ -93,7 +93,7 @@ class _CrabsWidgetState extends State<CrabsWidget> {
],
),
),
Utils.buildSvgWithAssets(icon: AppAssets.ask_doctor_icon).onPress(() {
Utils.buildSvgWithAssets(icon: AppAssets.ask_doctor_icon, applyThemeColor: false).onPress(() {
Navigator.pop(context);
Navigator.of(context).push(CustomPageRoute(page: HealthCalculatorDetailedPage(calculatorType: HealthCalculatorsTypeEnum.calories)));
}),
@ -104,7 +104,7 @@ class _CrabsWidgetState extends State<CrabsWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.activity, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.activity, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
child: Row(
@ -130,7 +130,7 @@ class _CrabsWidgetState extends State<CrabsWidget> {
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)),
child: ListView.separated(
shrinkWrap: true,
itemCount: _activity.length,

@ -73,7 +73,7 @@ class _IdealBodyWeightWidgetState extends State<IdealBodyWeightWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.height, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.height, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
flex: 3,
@ -129,7 +129,7 @@ class _IdealBodyWeightWidgetState extends State<IdealBodyWeightWidget> {
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)),
child: ListView.separated(
shrinkWrap: true,
itemCount: _heightUnits.length,
@ -185,7 +185,7 @@ class _IdealBodyWeightWidgetState extends State<IdealBodyWeightWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.weight, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
flex: 3,
@ -246,7 +246,7 @@ class _IdealBodyWeightWidgetState extends State<IdealBodyWeightWidget> {
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)),
child: ListView.separated(
shrinkWrap: true,
itemCount: _weightUnits.length,
@ -301,7 +301,7 @@ class _IdealBodyWeightWidgetState extends State<IdealBodyWeightWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.activity, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.activity, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
child: Row(
@ -327,7 +327,7 @@ class _IdealBodyWeightWidgetState extends State<IdealBodyWeightWidget> {
message: "",
child: Container(
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)),
child: ListView.separated(
shrinkWrap: true,
itemCount: _activity.length,

@ -89,7 +89,7 @@ class _OvulationWidgetState extends State<OvulationWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.age, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.age, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
flex: 3,
@ -126,7 +126,7 @@ class _OvulationWidgetState extends State<OvulationWidget> {
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.age, width: 40.w, height: 40.w),
Utils.buildSvgWithAssets(icon: AppAssets.age, width: 40.w, height: 40.w, applyThemeColor: false),
SizedBox(width: 12.w),
Expanded(
flex: 3,

@ -211,7 +211,7 @@ class _AddHealthTrackerEntryPageState extends State<AddHealthTrackerEntryPage> {
child: Container(
constraints: BoxConstraints(maxHeight: MediaQuery.of(context).size.height * 0.7),
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 4.h, bottom: 4.h),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(20.r)),
decoration: BoxDecoration(color: AppColors.whiteColor, borderRadius: BorderRadius.circular(20.r)),
child: ListView.separated(
shrinkWrap: true,
itemCount: items.length,

@ -26,7 +26,7 @@ Widget buildHealthTrackerCard({
required VoidCallback onTap,
}) {
return Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: Colors.white, borderRadius: 20.r),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.r),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [

@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:hmg_patient_app_new/core/app_assets.dart';
import 'package:hmg_patient_app_new/core/app_export.dart';
import 'package:hmg_patient_app_new/core/enums.dart';
import 'package:hmg_patient_app_new/core/utils/date_util.dart';
import 'package:hmg_patient_app_new/extensions/string_extensions.dart';
import 'package:hmg_patient_app_new/extensions/widget_extensions.dart';
import 'package:hmg_patient_app_new/generated/locale_keys.g.dart';
@ -144,7 +145,16 @@ class TrackerLastValueCard extends StatelessWidget {
break;
}
final formattedDate = lastDate != null ? DateFormat('EEE DD MMM, yy').format(lastDate) : DateFormat('EEE DD MMM, yy').format(DateTime.now());
// final formattedDate = lastDate != null ? DateFormat('EE DD MMM, yy').format(lastDate) : DateFormat('EE DD MMM, yy').format(DateTime.now());
final formattedDate = lastDate != null
? DateUtil.getWeekDayMonthDayYearDateFormatted(
lastDate,
"en",
)
: DateUtil.getWeekDayMonthDayYearDateFormatted(
DateTime.now(),
"en",
);
// Show shimmer while loading
if (viewModel.isLoading) {

@ -389,7 +389,7 @@ class ServicesPage extends StatelessWidget {
spacing: 8.w,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.wallet, width: 40.w, height: 40.h),
Utils.buildSvgWithAssets(icon: AppAssets.wallet, width: 40.w, height: 40.h, applyThemeColor: false),
LocaleKeys.habibWallet.tr().toText14(weight: FontWeight.w600, maxlines: 2).expanded,
Utils.buildSvgWithAssets(icon: getIt.get<AppState>().isArabic() ? AppAssets.arrow_back : AppAssets.arrow_forward),
],
@ -449,7 +449,7 @@ class ServicesPage extends StatelessWidget {
spacing: 8.w,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.services_medical_file_icon, width: 40.w, height: 40.h),
Utils.buildSvgWithAssets(icon: AppAssets.services_medical_file_icon, width: 40.w, height: 40.h, applyThemeColor: false),
LocaleKeys.medicalFile.tr().toText16(weight: FontWeight.w600, maxlines: 2).expanded,
Utils.buildSvgWithAssets(icon: getIt.get<AppState>().isArabic() ? AppAssets.arrow_back : AppAssets.arrow_forward),
],

@ -48,6 +48,7 @@ class ServiceGridViewItem extends StatelessWidget {
icon: hmgServiceComponentModel.icon,
iconColor: isHealthToolIcon ? null : AppColors.whiteColor,
fit: BoxFit.contain,
applyThemeColor: false
),
),
),

@ -1,19 +1,20 @@
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<ServiceCardData> getNotLoggedInServiceCardsList = [
static List<ServiceCardData> get getNotLoggedInServiceCardsList => [
ServiceCardData(
serviceName: "emergency",
icon: AppAssets.emergency_services_icon,
title: LocaleKeys.emergency,
subtitle: LocaleKeys.services2,
backgroundColor: AppColors.primaryRedColor,
iconColor: AppColors.whiteColor,
textColor: AppColors.whiteColor,
iconColor: Colors.white,
textColor: Colors.white,
isBold: true,
),
ServiceCardData(
@ -68,15 +69,15 @@ class LandingPageData {
),
];
static List<ServiceCardData> getLoggedInServiceCardsList = [
static List<ServiceCardData> get getLoggedInServiceCardsList => [
ServiceCardData(
serviceName: "emergency",
icon: AppAssets.emergency_services_icon,
title: LocaleKeys.emergency,
subtitle: LocaleKeys.services2,
backgroundColor: AppColors.primaryRedColor,
iconColor: AppColors.whiteColor,
textColor: AppColors.whiteColor,
iconColor: Colors.white,
textColor: Colors.white,
isBold: true,
),
ServiceCardData(
@ -141,7 +142,7 @@ class LandingPageData {
),
];
static List<ServiceCardData> getServiceCardsList = [
static List<ServiceCardData> get getServiceCardsList => [
ServiceCardData(
serviceName: "livecare",
icon: AppAssets.small_livecare_icon,

@ -8,8 +8,8 @@ class ServiceCardData {
final String title;
final String subtitle;
final Color? iconColor;
final Color textColor;
final Color backgroundColor;
final Color? textColor;
final Color? backgroundColor;
final bool isBold;
final String largeCardIcon;
@ -19,9 +19,9 @@ class ServiceCardData {
this.title = "",
this.subtitle = "",
this.largeCardIcon = "",
this.backgroundColor = AppColors.whiteColor,
this.iconColor = AppColors.blackColor,
this.textColor = AppColors.blackColor,
this.backgroundColor,
this.iconColor,
this.textColor,
this.isBold = false
});
}

@ -296,9 +296,9 @@ class _LandingPageState extends State<LandingPage> {
context.navigateWithName(AppRoutes.userInfoSelection);
},
padding: EdgeInsetsGeometry.zero,
backgroundColor: Color(0xFF2B353E),
borderColor: Color(0xFF2B353E),
textColor: AppColors.whiteColor,
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
textColor: Colors.white,
fontSize: 14.f,
fontWeight: FontWeight.w600,
borderRadius: 12.r,

@ -45,7 +45,7 @@ class HabibWalletCard extends StatelessWidget {
child: Stack(children: [
Positioned(
right: 0,
child: ClipRRect(borderRadius: BorderRadius.circular(24.0), child: Utils.buildSvgWithAssets(icon: AppAssets.habib_background_icon, width: 150.h, height: 150.h)),
child: ClipRRect(borderRadius: BorderRadius.circular(24.0), child: Utils.buildSvgWithAssets(icon: AppAssets.habib_background_icon, width: 150.h, height: 150.h, applyThemeColor: false)),
),
Padding(
padding: EdgeInsets.all(16.h),
@ -123,7 +123,7 @@ class HabibWalletCard extends StatelessWidget {
icon: AppAssets.recharge_icon,
iconSize: 24.h,
backgroundColor: AppColors.infoColor,
textColor: AppColors.whiteColor,
textColor: Colors.white,
text: LocaleKeys.recharge.tr(context: context),
borderWidth: 0.w,
fontWeight: FontWeight.w500,

@ -72,7 +72,7 @@ class LargeServiceCard extends StatelessWidget {
height: 48.h,
width: 48.h,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: serviceCardData.backgroundColor,
color: serviceCardData.backgroundColor!,
borderRadius: 12.r,
hasShadow: false,
),
@ -82,6 +82,7 @@ class LargeServiceCard extends StatelessWidget {
icon: serviceCardData.icon,
iconColor: serviceCardData.iconColor,
fit: BoxFit.contain,
applyThemeColor: false,
),
),
),
@ -209,7 +210,7 @@ class FadedLargeServiceCard extends StatelessWidget {
height: 32.h,
width: 32.h,
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: serviceCardData.backgroundColor,
color: serviceCardData.backgroundColor!,
borderRadius: 30.r,
hasShadow: false,
),
@ -219,6 +220,7 @@ class FadedLargeServiceCard extends StatelessWidget {
icon: serviceCardData.icon,
iconColor: serviceCardData.iconColor,
fit: BoxFit.contain,
applyThemeColor: false
),
),
),

@ -32,9 +32,9 @@ class SmallServiceCard extends StatelessWidget {
final String icon;
final String title;
final String subtitle;
final Color iconColor;
final Color textColor;
final Color backgroundColor;
final Color? iconColor;
final Color? textColor;
final Color? backgroundColor;
final bool isBold;
SmallServiceCard({
@ -43,33 +43,36 @@ class SmallServiceCard extends StatelessWidget {
this.serviceName = "",
this.title = "",
this.subtitle = "",
this.backgroundColor = AppColors.whiteColor,
this.iconColor = AppColors.blackColor,
this.textColor = AppColors.blackColor,
this.backgroundColor,
this.iconColor,
this.textColor,
this.isBold = false,
});
@override
Widget build(BuildContext context) {
final resolvedBgColor = backgroundColor ?? AppColors.whiteColor;
final resolvedIconColor = iconColor ?? AppColors.blackColor;
final resolvedTextColor = textColor ?? AppColors.blackColor;
return Container(
height: 92.h,
width: 92.h,
padding: EdgeInsets.all(4.0),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(
color: backgroundColor,
color: resolvedBgColor,
borderRadius: 16,
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: icon, iconColor: iconColor, width: 32.h, height: 32.h),
Utils.buildSvgWithAssets(icon: icon, iconColor: resolvedIconColor, width: 32.h, height: 32.h),
SizedBox(height: 6.h),
if (isFoldable || isTablet) ...[
title.tr(context: context).toText10(color: textColor, weight: FontWeight.w500, isCenter: true, letterSpacing: -0.2, maxlines: 1),
subtitle.tr(context: context).toText10(color: textColor, weight: FontWeight.w500, isCenter: true, letterSpacing: -0.2, maxlines: 1),
title.tr(context: context).toText10(color: resolvedTextColor, weight: FontWeight.w500, isCenter: true, letterSpacing: -0.2, maxlines: 1),
subtitle.tr(context: context).toText10(color: resolvedTextColor, weight: FontWeight.w500, isCenter: true, letterSpacing: -0.2, maxlines: 1),
] else ...[
title.tr(context: context).toText12(color: textColor, fontWeight: FontWeight.w500, isCenter: true, letterSpacing: -0.2, maxLine: 1),
subtitle.tr(context: context).toText12(color: textColor, fontWeight: FontWeight.w500, isCenter: true, letterSpacing: -0.2, maxLine: 1),
title.tr(context: context).toText12(color: resolvedTextColor, fontWeight: FontWeight.w500, isCenter: true, letterSpacing: -0.2, maxLine: 1),
subtitle.tr(context: context).toText12(color: resolvedTextColor, fontWeight: FontWeight.w500, isCenter: true, letterSpacing: -0.2, maxLine: 1),
]
],
),

@ -40,7 +40,7 @@ class WelcomeWidget extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
children: [
Flexible(child: name.toText16(weight: FontWeight.w500, textOverflow: TextOverflow.ellipsis, maxlines: 1, height: 1)),
const Icon(Icons.keyboard_arrow_down, size: 20, color: Colors.black),
Icon(Icons.keyboard_arrow_down, size: 20, color: AppColors.greyTextColor),
],
),
],

@ -434,7 +434,7 @@ class _HhcProceduresPageState extends State<HhcProceduresPage> {
child: Container(
height: 80.h,
decoration: BoxDecoration(
color: Colors.white,
color: AppColors.whiteColor,
borderRadius: BorderRadius.circular(10.r),
),
),

@ -146,14 +146,14 @@ class LabResultByClinic extends StatelessWidget {
},
backgroundColor: AppColors.successColor,
borderColor: AppColors.successColor,
textColor: AppColors.whiteColor,
fontSize: 16,
textColor: Colors.white,
fontSize: 16.f,
fontWeight: FontWeight.w500,
borderRadius: 12,
padding: EdgeInsets.fromLTRB(10, 0, 10, 0),
height: 45.h,
icon: AppAssets.download,
iconColor: AppColors.whiteColor,
iconColor: Colors.white,
iconSize: 20.h,
).paddingSymmetrical(24.h, 24.h),
),

@ -20,7 +20,7 @@ class AiAnalysisWidget extends StatelessWidget {
padding: EdgeInsets.all(1.5.r), // Border thickness
child: Container(
decoration: BoxDecoration(
color: Colors.white,
color: AppColors.whiteColor,
borderRadius: BorderRadius.circular(22.r),
),
padding: EdgeInsets.all(20.r),
@ -44,7 +44,7 @@ class AiAnalysisWidget extends StatelessWidget {
SizedBox(height: 8.h),
data.summary!.toText14(color: AppColors.textColorLight, height: 1.5, weight: FontWeight.w400),
SizedBox(height: 16.h),
const Divider(color: AppColors.dividerColor, thickness: 1),
Divider(color: AppColors.dividerColor, thickness: 1),
SizedBox(height: 16.h),
],
if (data.aiPredictions != null && data.aiPredictions!.isNotEmpty) ...[
@ -52,7 +52,7 @@ class AiAnalysisWidget extends StatelessWidget {
SizedBox(height: 12.h),
...data.aiPredictions!.map((item) => _buildBulletItem(item)),
SizedBox(height: 16.h),
const Divider(color: AppColors.dividerColor, thickness: 1),
Divider(color: AppColors.dividerColor, thickness: 1),
SizedBox(height: 16.h),
],
if (data.prevention != null && data.prevention!.isNotEmpty) ...[
@ -88,7 +88,7 @@ class AiAnalysisWidget extends StatelessWidget {
child: Container(
width: 5.r,
height: 5.r,
decoration: const BoxDecoration(color: AppColors.blackColor, shape: BoxShape.circle),
decoration: BoxDecoration(color: AppColors.blackColor, shape: BoxShape.circle),
),
),
Expanded(

@ -133,7 +133,7 @@ class _LabAiAnalysisDetailedPageState extends State<LabAiAnalysisDetailedPage> {
),
if (!isLast) ...[
SizedBox(height: 12.h),
const Divider(color: AppColors.dividerColor, thickness: 1),
Divider(color: AppColors.dividerColor, thickness: 1),
SizedBox(height: 12.h),
],
],

@ -59,7 +59,7 @@ class _SearchLabResultsContentState extends State<SearchLabResultsContent> {
title: LocaleKeys.labResults.tr(),
isClose: true,
bottomChild: Container(
color: Colors.white,
color: AppColors.whiteColor,
padding: EdgeInsets.all(ResponsiveExtension(20).h),
child: CustomButton(
text: LocaleKeys.search.tr(),
@ -144,7 +144,8 @@ class SuggestionChip extends StatelessWidget {
borderRadius: BorderRadius.circular(8),
),
child: label.toText12(
color: isSelected ? Colors.white : Colors.black87,
// color: isSelected ? AppColors.textColor : Colors.black87,
color: AppColors.textColor,
fontWeight: FontWeight.w500,
),
),

@ -478,11 +478,12 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
// Using CustomExpandableList
CustomExpandableList(
expansionMode: ExpansionMode.exactlyOne,
dividerColor: Color(0xff2b353e1a),
dividerColor: AppColors.dividerColor,
itemPadding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 14.h),
items: [
ExpandableListItem(
title: LocaleKeys.medicalServices.tr(context: context).toText18(weight: FontWeight.w600),
expandedBackgroundColor: Colors.transparent,
children: [
SizedBox(height: 10.h),
getSelectedTabData(0),
@ -518,53 +519,6 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
defaultTrailingIcon: Utils.buildSvgWithAssets(icon: AppAssets.arrow_down, height: 22.h, width: 22.w, iconColor: AppColors.textColor),
),
).paddingSymmetrical(16.w, 0.0),
// ExpansionTileList(
// shrinkWrap: true,
// trailing: Icon(Icons.arrow_drop_down),
// expansionMode: ExpansionMode.exactlyOne,
// children: <ExpansionTile>[
// ExpansionTile(
// title: "Medical Services".toText20(weight: FontWeight.w600, color: AppColors.textColor),
// iconColor: Color(0xFF2E3039),
// trailing: Utils.buildSvgWithAssets(icon: AppAssets.arrow_down, height: 22.h, width: 22.w),
// children: <Widget>[Text('Child 1')],
// ),
// ExpansionTile(
// title: "Medical Reports".toText20(weight: FontWeight.w600, color: AppColors.textColor),
// children: <Widget>[Text('Child 2')],
// ),
// ExpansionTile(
// title: "Insurance & Payments".toText20(weight: FontWeight.w600, color: AppColors.textColor),
// children: <Widget>[Text('Child 3')],
// ),
// ExpansionTile(
// title: "Tracker & Others".toText20(weight: FontWeight.w600, color: AppColors.textColor),
// children: <Widget>[Text('Child 4')],
// ),
// ],
// ),
// Consumer<MedicalFileViewModel>(builder: (context, medicalFileVM, child) {
// return Column(
// children: [
// CustomTabBar(
// activeTextColor: AppColors.primaryRedColor,
// activeBackgroundColor: AppColors.primaryRedColor.withValues(alpha: .1),
// tabs: [
// CustomTabBarModel(AppAssets.myFilesBottom, LocaleKeys.general.tr(context: context).needTranslation),
// CustomTabBarModel(AppAssets.insurance, LocaleKeys.insurance.tr(context: context)),
// CustomTabBarModel(AppAssets.requests, LocaleKeys.request.tr(context: context).needTranslation),
// CustomTabBarModel(AppAssets.more, "More".needTranslation),
// ],
// onTabChange: (index) {
// medicalFileVM.onTabChanged(index);
// },
// ).paddingSymmetrical(24.w, 0.0),
// SizedBox(height: 24.h),
// getSelectedTabData(medicalFileVM.selectedTabIndex),
// ],
// );
// }),
],
),
);
@ -669,9 +623,9 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
),
);
},
backgroundColor: Color(0xffFEE9EA),
borderColor: Color(0xffFEE9EA),
textColor: Color(0xffED1C2B),
backgroundColor: AppColors.secondaryLightRedColor,
borderColor: AppColors.secondaryLightRedColor,
textColor: AppColors.primaryRedColor,
fontSize: 14.f,
fontWeight: FontWeight.w500,
borderRadius: 12.r,
@ -792,7 +746,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
? const CommonShimmerWidget().paddingSymmetrical(0.w, 0.h)
: prescriptionVM.patientPrescriptionOrders.isNotEmpty
? Container(
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: Colors.white, borderRadius: 20.r, hasShadow: false),
decoration: RoundedRectangleBorder().toSmoothCornerDecoration(color: AppColors.whiteColor, borderRadius: 20.r, hasShadow: false),
child: Padding(
padding: EdgeInsets.all(16.w),
child: Column(
@ -862,7 +816,7 @@ class _MedicalFilePageState extends State<MedicalFilePage> {
separatorBuilder: (BuildContext cxt, int index) => SizedBox(height: 16.h),
),
SizedBox(height: 16.h),
const Divider(color: AppColors.dividerColor),
Divider(color: AppColors.dividerColor),
SizedBox(height: 16.h),
Row(
children: [

@ -36,6 +36,7 @@ class LabRadCard extends StatelessWidget {
width: 40.w,
height: 40.h,
fit: BoxFit.cover,
applyThemeColor: false
).toShimmer2(isShow: false, radius: 12.r),
SizedBox(width: 8.w),
Flexible(

@ -37,7 +37,7 @@ class MedicalFileCard extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
mainAxisSize: MainAxisSize.min,
children: [
Utils.buildSvgWithAssets(icon: svgIcon, width: iconS, height: iconS, fit: BoxFit.contain),
Utils.buildSvgWithAssets(icon: svgIcon, width: iconS, height: iconS, fit: BoxFit.contain, applyThemeColor: false),
SizedBox(height: 8.h),
isLargeText ? label.toText13(color: textColor, isBold: true, maxLine: 2) : label.toText11(color: textColor, isBold: true, maxLine: 2),
],

@ -182,15 +182,15 @@ class PatientSickLeaveCard extends StatelessWidget {
}
Color getStatusColor() {
Color statusColor = Colors.white;
Color statusColor = AppColors.whiteColor;
if (patientSickLeavesResponseModel.status == 1) {
statusColor = Color(0xffCC9B14); // TODO change color as per In Queue design
statusColor = AppColors.statusPendingColor;
} else if (patientSickLeavesResponseModel.status == 2) {
statusColor = AppColors.successColor;
} else if (patientSickLeavesResponseModel.status == 3) {
statusColor = AppColors.primaryRedColor;
} else {
statusColor = Colors.white;
statusColor = AppColors.whiteColor;
}
return statusColor;
}

@ -370,13 +370,13 @@ class _MedicalReportsPageState extends State<MedicalReportsPage> {
},
backgroundColor: AppColors.primaryRedColor,
borderColor: AppColors.primaryRedColor,
textColor: AppColors.whiteColor,
textColor: Colors.white,
fontSize: 16.f,
fontWeight: FontWeight.w500,
borderRadius: 12.r,
height: 46.h,
icon: AppAssets.requests,
iconColor: AppColors.whiteColor,
iconColor: Colors.white,
iconSize: 20.h,
).paddingSymmetrical(24.h, 24.h),
),

@ -74,7 +74,7 @@ class MonthlyReport extends StatelessWidget {
children: [
Row(
children: [
Utils.buildSvgWithAssets(icon: AppAssets.email_icon, width: 40.h, height: 40.h),
Utils.buildSvgWithAssets(icon: AppAssets.email_icon, width: 40.h, height: 40.h, applyThemeColor: false),
SizedBox(width: 8.h),
Column(
crossAxisAlignment: CrossAxisAlignment.start,

@ -80,7 +80,7 @@ class InvoiceListCard extends StatelessWidget {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h),
Utils.buildSvgWithAssets(icon: AppAssets.rating_icon, width: 15.w, height: 15.h, applyThemeColor: false),
SizedBox(height: 2.h),
"${getInvoicesListResponseModel.decimalDoctorRate}".toText11(isBold: true, color: AppColors.textColor),
],

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save