# Conflicts:
#	lib/pages/DrawerPages/notifications/notification_details_page.dart
master
Haroon Amjad 3 weeks ago
commit bf32777ae1

@ -359,7 +359,7 @@ var CAN_PAY_FOR_FOR_WALKIN_APPOINTMENT = 'Services/Doctors.svc/REST/CanPayForWal
var CHANNEL = 3; var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958'; var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20'; var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 20.5; var VERSION_ID = 20.7;
var SETUP_ID = '91877'; var SETUP_ID = '91877';
var LANGUAGE = 2; var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0; // var PATIENT_OUT_SA = 0;

@ -1,5 +1,6 @@
import 'dart:io'; 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/model/notifications/get_notifications_response_model.dart';
import 'package:hmg_patient_app/core/viewModels/notifications_view_model.dart'; import 'package:hmg_patient_app/core/viewModels/notifications_view_model.dart';
import 'package:hmg_patient_app/core/viewModels/project_view_model.dart'; import 'package:hmg_patient_app/core/viewModels/project_view_model.dart';
@ -71,93 +72,103 @@ class _NotificationsDetailsPageState extends State<NotificationsDetailsPage> {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
NotificationViewModel notificationViewModel = Provider.of(context); NotificationViewModel notificationViewModel = Provider.of(context);
notificationViewModel.markAsRead(widget.notification.id); notificationViewModel.markAsRead(widget.notification.id);
return AppScaffold( return ScreenshotBlockerWidget(
isShowAppBar: true, blockScreenshots: true, // makes this widget appear black in screenshots
showNewAppBar: true, detectScreenshots: true, // listen for screenshot attempts
showNewAppBarTitle: true, onScreenshotDetected: (event) {
isShowDecPage: false, // event.type 'screenshot_taken' or 'screenshot_blocked'
appBarTitle: TranslationBase.of(context).notificationDetails, // ScaffoldMessenger.of(context).showSnackBar(
body: ListView( // SnackBar(content: Text('Screenshots are not allowed!')),
physics: BouncingScrollPhysics(), // );
padding: EdgeInsets.all(21), },
children: [ child: AppScaffold(
Text( isShowAppBar: true,
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.notification.createdOn!)) + showNewAppBar: true,
" " + showNewAppBarTitle: true,
DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(widget.notification.createdOn!), false), isShowDecPage: false,
style: TextStyle( appBarTitle: TranslationBase.of(context).notificationDetails,
fontSize: 16, body: ListView(
fontWeight: FontWeight.w600, physics: BouncingScrollPhysics(),
color: Color(0xff2E303A), padding: EdgeInsets.all(21),
letterSpacing: -0.64, children: [
), Text(
), DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.notification.createdOn!)) +
SizedBox(height: 18), " " +
Text( DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(widget.notification.createdOn!), false),
widget.notification.message ?? "", style: TextStyle(
style: TextStyle( fontSize: 16,
fontSize: 12, fontWeight: FontWeight.w600,
fontWeight: FontWeight.w600, color: Color(0xff2E303A),
color: Color(0xff575757), letterSpacing: -0.64,
letterSpacing: -0.48, ),
), ),
), SizedBox(height: 18),
if (widget.notification.notificationType == "2") Text(
Padding( widget.notification.message ?? "",
padding: const EdgeInsets.only(top: 18), style: TextStyle(
child: YoutubePlayer( fontSize: 12,
controller: _controller, fontWeight: FontWeight.w600,
showVideoProgressIndicator: true, color: Color(0xff575757),
letterSpacing: -0.48,
), ),
), ),
if (widget.notification.messageTypeData != null) if (widget.notification.notificationType == "2")
if (widget.notification.messageTypeData!.length != 0 && widget.notification.notificationType != "2")
Padding( Padding(
padding: const EdgeInsets.only(top: 18), padding: const EdgeInsets.only(top: 18),
child: Image.network(widget.notification.messageTypeData!, loadingBuilder: (BuildContext context, Widget child, ImageChunkEvent? loadingProgress) { child: YoutubePlayer(
if (loadingProgress == null) return child; controller: _controller,
return Center( showVideoProgressIndicator: true,
child: SizedBox( ),
width: 40.0,
height: 40.0,
child: AppCircularProgressIndicator(),
),
);
}, fit: BoxFit.fill),
), ),
SizedBox(height: 18), if (widget.notification.messageTypeData != null)
(widget.notification.isExternalRedirect.toString() == "true") if (widget.notification.messageTypeData!.length != 0 && widget.notification.notificationType != "2")
? DefaultButton( Padding(
projectViewModel.isArabic ? widget.notification.redirectButtonTextAr! : widget.notification.redirectButtonTextEn!, padding: const EdgeInsets.only(top: 18),
() { child: Image.network(widget.notification.messageTypeData!, loadingBuilder: (BuildContext context, Widget child, ImageChunkEvent? loadingProgress) {
if (Platform.isIOS) { if (loadingProgress == null) return child;
launchUrl(Uri.parse(widget.notification.externalRedirectURLIos.toString())); return Center(
} else { child: SizedBox(
launchUrl(Uri.parse(widget.notification.externalRedirectURLAndroid.toString())); width: 40.0,
} height: 40.0,
}, child: AppCircularProgressIndicator(),
color: CustomColors.accentColor, ),
) );
: SizedBox(), }, fit: BoxFit.fill),
// Text( ),
// widget.notification.message!.trim(), SizedBox(height: 18),
// style: TextStyle( (widget.notification.isExternalRedirect.toString() == "true")
// fontSize: 12, ? DefaultButton(
// fontWeight: FontWeight.w600, projectViewModel.isArabic ? widget.notification.redirectButtonTextAr! : widget.notification.redirectButtonTextEn!,
// color: Color(0xff575757), () {
// letterSpacing: -0.48, if (Platform.isIOS) {
// ), launchUrl(Uri.parse(widget.notification.externalRedirectURLIos.toString()));
// ), } else {
// Text( launchUrl(Uri.parse(widget.notification.externalRedirectURLAndroid.toString()));
// widget.notification.message.trim(), }
// style: TextStyle( },
// fontSize: 12, color: CustomColors.accentColor,
// fontWeight: FontWeight.w600, )
// color: Color(0xff575757), : SizedBox(),
// letterSpacing: -0.48, // 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,
// ),
// ),
],
),
), ),
); );
} }

@ -103,7 +103,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
children: [ children: [
_loginOptionButton(TranslationBase.of(context).livecareOption1, 'assets/images/new/Live_Care.svg', 1), _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).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( SizedBox(

@ -108,7 +108,7 @@ class _LiveCarePendingRequestState extends State<LiveCarePendingRequest> {
mHeight(12.0), mHeight(12.0),
Container( Container(
child: DefaultButton(TranslationBase.of(context).callLiveCareSupport, () { child: DefaultButton(TranslationBase.of(context).callLiveCareSupport, () {
launchUrl(Uri.parse("tel://" + "011 525 9553")); launchUrl(Uri.parse("tel://" + "966 11 525 9553"));
// cancelLiveCareRequest(); // cancelLiveCareRequest();
}), }),
), ),

@ -180,7 +180,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
// user!.editedOn != null // user!.editedOn != null
// ? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user!.editedOn!)) // ? 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), style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48),
), ),
], ],

@ -158,6 +158,8 @@ class AuthProvider with ChangeNotifier {
print(imei); print(imei);
Map<String, dynamic> request = {}; Map<String, dynamic> request = {};
request['IMEI'] = imei; request['IMEI'] = imei;
// request['IMEI'] = "c1wqiJvLQJyqDTUss_gEEY:APA91bGZL1Cw-rraPTZjtPYJbh_tTDPZ0SEUaHOb1W14R4nl9tCMYobhwmjTHx8xvtwqY0b25NxaLb7-hQIj1rBdblmffhc9FnofZi6DNOFhvachv2G_Km4";
// request['IMEI'] = "fIIkruERSt6sBze-ZAe5EL:APA91bH9aIVR6vrICryFJv_MTwsAvyoL48jIHyGnTiN9ZYf-B9cg-d-9zKaFWR54dO9htemHtkgqsOauzAHi265DM6tiuapxTegrsS0s7g4ivZXVfkX1ELM";
request['LanguageID'] = languageID; request['LanguageID'] = languageID;
await BaseAppClient().post(SELECT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) async { await BaseAppClient().post(SELECT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) async {

@ -1,8 +1,8 @@
name: hmg_patient_app name: hmg_patient_app
description: A new Flutter application. description: A new Flutter application.
#version: 4.6.033+1 #version: 4.6.035+1
version: 4.6.0988+40500988 version: 4.6.0990+40500990
environment: environment:
# sdk: ">=3.0.0 <3.13.0" # sdk: ">=3.0.0 <3.13.0"
@ -145,6 +145,7 @@ dependencies:
# vital_sign_camera: # vital_sign_camera:
# path: ./packages/vital_sign_camera # path: ./packages/vital_sign_camera
readmore: ^3.0.0 readmore: ^3.0.0
flutter_screenshot_blocker: ^1.0.4
dependency_overrides: dependency_overrides:
intl: ^0.20.2 intl: ^0.20.2

Loading…
Cancel
Save