diff --git a/New Patient App android keystore/NewPatientAppKeyStore.jks b/New Patient App android keystore/NewPatientAppKeyStore.jks
new file mode 100644
index 00000000..e50988ea
Binary files /dev/null and b/New Patient App android keystore/NewPatientAppKeyStore.jks differ
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 7267f0ac..0e77b6b6 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -49,7 +49,7 @@
-
+
@@ -62,7 +62,6 @@
-
+
+
+
diff --git a/assets/langs/ar-SA.json b/assets/langs/ar-SA.json
index 3635e650..0886f376 100644
--- a/assets/langs/ar-SA.json
+++ b/assets/langs/ar-SA.json
@@ -1581,5 +1581,6 @@
"invalidInsurance": "لا يمكنك إجراء الدفع عبر الإنترنت لأنه ليس لديك تأمين صالح.",
"continueCash": "متابعة الدفع نقدًا",
"timeFor": "الوقت",
- "hmgPolicies": "سياسات مجموعة الحبيب الطبية"
+ "hmgPolicies": "سياسات مجموعة الحبيب الطبية",
+ "darkMode": "المظهر الداكن"
}
diff --git a/assets/langs/en-US.json b/assets/langs/en-US.json
index 15d78000..294201db 100644
--- a/assets/langs/en-US.json
+++ b/assets/langs/en-US.json
@@ -1574,5 +1574,6 @@
"invalidInsurance": "You cannot make online payment because you do not have a valid insurance.",
"continueCash": "Continue as cash",
"timeFor": "Time For",
- "hmgPolicies": "HMG Policies"
+ "hmgPolicies": "HMG Policies",
+ "darkMode": "Dark Mode"
}
diff --git a/lib/core/api/api_client.dart b/lib/core/api/api_client.dart
index f9c44e76..b17db626 100644
--- a/lib/core/api/api_client.dart
+++ b/lib/core/api/api_client.dart
@@ -195,7 +195,7 @@ class ApiClientImp implements ApiClient {
}
// body['TokenID'] = "@dm!n";
- // body['PatientID'] = 4773922;
+ // body['PatientID'] = 4773715;
// body['PatientTypeID'] = 1;
// body['PatientOutSA'] = 0;
// body['SessionID'] = "45786230487560q";
diff --git a/lib/core/api_consts.dart b/lib/core/api_consts.dart
index 39132004..ecfbc70a 100644
--- a/lib/core/api_consts.dart
+++ b/lib/core/api_consts.dart
@@ -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";
diff --git a/lib/core/app_assets.dart b/lib/core/app_assets.dart
index 942eb46b..efe62775 100644
--- a/lib/core/app_assets.dart
+++ b/lib/core/app_assets.dart
@@ -331,6 +331,7 @@ class AppAssets {
static const String doctorResponseIcon = '$svgBasePath/doctor_response_icon.svg';
static const String changeLanguageHomePageIcon = '$svgBasePath/change_language_home_page.svg';
static const String aiOverView = '$svgBasePath/ai_overview.svg';
+ static const String darkModeIcon = '$svgBasePath/dark_mode_icon.svg';
// PNGS //
static const String hmgLogo = '$pngBasePath/hmg_logo.png';
diff --git a/lib/core/dependencies.dart b/lib/core/dependencies.dart
index e7ac0515..4266aa3b 100644
--- a/lib/core/dependencies.dart
+++ b/lib/core/dependencies.dart
@@ -224,7 +224,7 @@ class AppDependencies {
authenticationRepo: getIt(), cacheService: getIt(), navigationService: getIt(), dialogService: getIt(), appState: getIt(), errorHandlerService: getIt(), localAuthService: getIt()),
);
- getIt.registerLazySingleton(() => ProfileSettingsViewModel());
+ getIt.registerLazySingleton(() => ProfileSettingsViewModel(cacheService: getIt()));
getIt.registerLazySingleton(() => DateRangeSelectorRangeViewModel());
diff --git a/lib/core/utils/calendar_utils.dart b/lib/core/utils/calendar_utils.dart
deleted file mode 100644
index 8b21111f..00000000
--- a/lib/core/utils/calendar_utils.dart
+++ /dev/null
@@ -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? _completer;
-
- dynamic get writableCalendars => calendars.firstWhere((c) => !c.isReadOnly!);
- dynamic calendars;
-
- CalendarUtils._(this.calendars);
-
- // static Future getInstance() async {
- // if (_completer == null) {
- // _completer = Completer();
- // 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 getInstance() async {
- tzl.initializeTimeZones();
- if (_completer != null) {
- return _completer!.future;
- }
- _completer = Completer();
- 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? scheduleList, String? title, String? description, List? scheduleDateTime, List? daysOfWeek}) async {
- tzl.initializeTimeZones();
- List 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 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