From ce9680c70f9fb12d87794f38a8ffe75bf4991b59 Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Mon, 22 Jun 2026 10:14:29 +0300 Subject: [PATCH 1/2] updates --- lib/config/config.dart | 2 +- lib/pages/livecare/livecare_type_select.dart | 2 +- lib/pages/livecare/widgets/LiveCarePendingRequest.dart | 2 +- pubspec.yaml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 19f19aed..79ecbdc7 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -359,7 +359,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 20.5; +var VERSION_ID = 20.6; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/lib/pages/livecare/livecare_type_select.dart b/lib/pages/livecare/livecare_type_select.dart index bb9751c7..4ab5f58f 100644 --- a/lib/pages/livecare/livecare_type_select.dart +++ b/lib/pages/livecare/livecare_type_select.dart @@ -103,7 +103,7 @@ class _LiveCareTypeSelectState extends State { children: [ _loginOptionButton(TranslationBase.of(context).livecareOption1, 'assets/images/new/Live_Care.svg', 1), _loginOptionButton(TranslationBase.of(context).livecareOption4, 'assets/images/new/book appointment.svg', 2), - _loginOptionButton(TranslationBase.of(context).pharmaLiveCare, 'assets/images/new/pharma.svg', 3, isEnable: projectViewModel.havePrivilege(99)), + // _loginOptionButton(TranslationBase.of(context).pharmaLiveCare, 'assets/images/new/pharma.svg', 3, isEnable: projectViewModel.havePrivilege(99)), ], ), SizedBox( diff --git a/lib/pages/livecare/widgets/LiveCarePendingRequest.dart b/lib/pages/livecare/widgets/LiveCarePendingRequest.dart index 0eeffe2f..a2e175e8 100644 --- a/lib/pages/livecare/widgets/LiveCarePendingRequest.dart +++ b/lib/pages/livecare/widgets/LiveCarePendingRequest.dart @@ -108,7 +108,7 @@ class _LiveCarePendingRequestState extends State { mHeight(12.0), Container( child: DefaultButton(TranslationBase.of(context).callLiveCareSupport, () { - launchUrl(Uri.parse("tel://" + "011 525 9553")); + launchUrl(Uri.parse("tel://" + "966 11 525 9553")); // cancelLiveCareRequest(); }), ), diff --git a/pubspec.yaml b/pubspec.yaml index 2d81c2da..bf9f8a75 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,8 @@ name: hmg_patient_app description: A new Flutter application. -#version: 4.6.033+1 -version: 4.6.0988+40500988 +#version: 4.6.034+1 +version: 4.6.0989+40500989 environment: # sdk: ">=3.0.0 <3.13.0" From baf080f949c2ecb68bbdd43d8613f885d73ba13b Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Wed, 15 Jul 2026 10:05:46 +0300 Subject: [PATCH 2/2] Update to stores, VersionID 20.7 --- lib/config/config.dart | 2 +- .../notification_details_page.dart | 173 ++++++++++-------- lib/pages/login/confirm-login.dart | 2 +- .../authentication/auth_provider.dart | 2 + pubspec.yaml | 5 +- 5 files changed, 99 insertions(+), 85 deletions(-) diff --git a/lib/config/config.dart b/lib/config/config.dart index 79ecbdc7..5af679fa 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -359,7 +359,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal var CHANNEL = 3; var GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 20.6; +var VERSION_ID = 20.7; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; diff --git a/lib/pages/DrawerPages/notifications/notification_details_page.dart b/lib/pages/DrawerPages/notifications/notification_details_page.dart index 78115746..8af38ac9 100644 --- a/lib/pages/DrawerPages/notifications/notification_details_page.dart +++ b/lib/pages/DrawerPages/notifications/notification_details_page.dart @@ -1,5 +1,6 @@ import 'dart:io'; +import 'package:flutter_screenshot_blocker/flutter_screenshot_blocker.dart'; import 'package:hmg_patient_app/core/model/notifications/get_notifications_response_model.dart'; import 'package:hmg_patient_app/core/viewModels/project_view_model.dart'; import 'package:hmg_patient_app/theme/colors.dart'; @@ -68,93 +69,103 @@ class _NotificationsDetailsPageState extends State { @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); - return AppScaffold( - isShowAppBar: true, - showNewAppBar: true, - showNewAppBarTitle: true, - isShowDecPage: false, - appBarTitle: TranslationBase.of(context).notificationDetails, - body: ListView( - physics: BouncingScrollPhysics(), - padding: EdgeInsets.all(21), - children: [ - Text( - DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.notification.createdOn!)) + - " " + - DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(widget.notification.createdOn!), false), - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w600, - color: Color(0xff2E303A), - letterSpacing: -0.64, - ), - ), - SizedBox(height: 18), - Text( - widget.notification.message ?? "", - style: TextStyle( - fontSize: 12, - fontWeight: FontWeight.w600, - color: Color(0xff575757), - letterSpacing: -0.48, + return ScreenshotBlockerWidget( + blockScreenshots: true, // makes this widget appear black in screenshots + detectScreenshots: true, // listen for screenshot attempts + onScreenshotDetected: (event) { + // event.type → 'screenshot_taken' or 'screenshot_blocked' + // ScaffoldMessenger.of(context).showSnackBar( + // SnackBar(content: Text('Screenshots are not allowed!')), + // ); + }, + child: AppScaffold( + isShowAppBar: true, + showNewAppBar: true, + showNewAppBarTitle: true, + isShowDecPage: false, + appBarTitle: TranslationBase.of(context).notificationDetails, + body: ListView( + physics: BouncingScrollPhysics(), + padding: EdgeInsets.all(21), + children: [ + Text( + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.notification.createdOn!)) + + " " + + DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(widget.notification.createdOn!), false), + style: TextStyle( + fontSize: 16, + fontWeight: FontWeight.w600, + color: Color(0xff2E303A), + letterSpacing: -0.64, + ), ), - ), - if (widget.notification.notificationType == "2") - Padding( - padding: const EdgeInsets.only(top: 18), - child: YoutubePlayer( - controller: _controller, - showVideoProgressIndicator: true, + SizedBox(height: 18), + Text( + widget.notification.message ?? "", + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.w600, + color: Color(0xff575757), + letterSpacing: -0.48, ), ), - if (widget.notification.messageTypeData != null) - if (widget.notification.messageTypeData!.length != 0 && widget.notification.notificationType != "2") + if (widget.notification.notificationType == "2") Padding( padding: const EdgeInsets.only(top: 18), - child: Image.network(widget.notification.messageTypeData!, loadingBuilder: (BuildContext context, Widget child, ImageChunkEvent? loadingProgress) { - if (loadingProgress == null) return child; - return Center( - child: SizedBox( - width: 40.0, - height: 40.0, - child: AppCircularProgressIndicator(), - ), - ); - }, fit: BoxFit.fill), + child: YoutubePlayer( + controller: _controller, + showVideoProgressIndicator: true, + ), ), - SizedBox(height: 18), - (widget.notification.isExternalRedirect.toString() == "true") - ? DefaultButton( - projectViewModel.isArabic ? widget.notification.redirectButtonTextAr! : widget.notification.redirectButtonTextEn!, - () { - if (Platform.isIOS) { - launchUrl(Uri.parse(widget.notification.externalRedirectURLIos.toString())); - } else { - launchUrl(Uri.parse(widget.notification.externalRedirectURLAndroid.toString())); - } - }, - color: CustomColors.accentColor, - ) - : SizedBox(), - // Text( - // widget.notification.message!.trim(), - // style: TextStyle( - // fontSize: 12, - // fontWeight: FontWeight.w600, - // color: Color(0xff575757), - // letterSpacing: -0.48, - // ), - // ), - // Text( - // widget.notification.message.trim(), - // style: TextStyle( - // fontSize: 12, - // fontWeight: FontWeight.w600, - // color: Color(0xff575757), - // letterSpacing: -0.48, - // ), - // ), - ], + if (widget.notification.messageTypeData != null) + if (widget.notification.messageTypeData!.length != 0 && widget.notification.notificationType != "2") + Padding( + padding: const EdgeInsets.only(top: 18), + child: Image.network(widget.notification.messageTypeData!, loadingBuilder: (BuildContext context, Widget child, ImageChunkEvent? loadingProgress) { + if (loadingProgress == null) return child; + return Center( + child: SizedBox( + width: 40.0, + height: 40.0, + child: AppCircularProgressIndicator(), + ), + ); + }, fit: BoxFit.fill), + ), + SizedBox(height: 18), + (widget.notification.isExternalRedirect.toString() == "true") + ? DefaultButton( + projectViewModel.isArabic ? widget.notification.redirectButtonTextAr! : widget.notification.redirectButtonTextEn!, + () { + if (Platform.isIOS) { + launchUrl(Uri.parse(widget.notification.externalRedirectURLIos.toString())); + } else { + launchUrl(Uri.parse(widget.notification.externalRedirectURLAndroid.toString())); + } + }, + color: CustomColors.accentColor, + ) + : SizedBox(), + // Text( + // widget.notification.message!.trim(), + // style: TextStyle( + // fontSize: 12, + // fontWeight: FontWeight.w600, + // color: Color(0xff575757), + // letterSpacing: -0.48, + // ), + // ), + // Text( + // widget.notification.message.trim(), + // style: TextStyle( + // fontSize: 12, + // fontWeight: FontWeight.w600, + // color: Color(0xff575757), + // letterSpacing: -0.48, + // ), + // ), + ], + ), ), ); } diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 1299f1e8..6877b5f0 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -180,7 +180,7 @@ class _ConfirmLogin extends State { // user!.editedOn != null // ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user!.editedOn!)) // : - user!.createdOn != null ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user!.createdOn!)) : '--', + (user!.createdOn != null || user!.createdOn != "null") ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user!.createdOn!)) : '--', style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48), ), ], diff --git a/lib/services/authentication/auth_provider.dart b/lib/services/authentication/auth_provider.dart index 6c03f9e9..abe1b3c1 100644 --- a/lib/services/authentication/auth_provider.dart +++ b/lib/services/authentication/auth_provider.dart @@ -158,6 +158,8 @@ class AuthProvider with ChangeNotifier { print(imei); Map request = {}; request['IMEI'] = imei; + // request['IMEI'] = "c1wqiJvLQJyqDTUss_gEEY:APA91bGZL1Cw-rraPTZjtPYJbh_tTDPZ0SEUaHOb1W14R4nl9tCMYobhwmjTHx8xvtwqY0b25NxaLb7-hQIj1rBdblmffhc9FnofZi6DNOFhvachv2G_Km4"; + // request['IMEI'] = "fIIkruERSt6sBze-ZAe5EL:APA91bH9aIVR6vrICryFJv_MTwsAvyoL48jIHyGnTiN9ZYf-B9cg-d-9zKaFWR54dO9htemHtkgqsOauzAHi265DM6tiuapxTegrsS0s7g4ivZXVfkX1ELM"; request['LanguageID'] = languageID; await BaseAppClient().post(SELECT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) async { diff --git a/pubspec.yaml b/pubspec.yaml index bf9f8a75..3e5bd170 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,8 @@ name: hmg_patient_app description: A new Flutter application. -#version: 4.6.034+1 -version: 4.6.0989+40500989 +#version: 4.6.035+1 +version: 4.6.0990+40500990 environment: # sdk: ">=3.0.0 <3.13.0" @@ -145,6 +145,7 @@ dependencies: # vital_sign_camera: # path: ./packages/vital_sign_camera readmore: ^3.0.0 + flutter_screenshot_blocker: ^1.0.4 dependency_overrides: intl: ^0.20.2