Updates & fixes

dev_v3.13.6_BLE_Faiz
haroon amjad 4 months ago
parent 6c9ab32d98
commit 5b7b40c732

@ -100,7 +100,7 @@ android {
} }
release { release {
debuggable false debuggable false
signingConfig signingConfigs.debug signingConfig signingConfigs.release
minifyEnabled true minifyEnabled true
shrinkResources true shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

@ -1,4 +1,4 @@
org.gradle.jvmargs=-Xmx2048m org.gradle.jvmargs=-Xmx4096m
#android.enableR8=true #android.enableR8=true
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true

Binary file not shown.

@ -0,0 +1,11 @@
-----BEGIN PUBLIC KEY-----
MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEApKqued5RaqBjKntLoVhj
rflB5NpGELhAftnKrXO+0lCQGm0huxWeb/KtSgniJpPQ1LXfhGKqjaZwu3zd2xsU
9D6i7Ie1QJvIJlxHwi/zKdBX7nSHx5phK+yRJF+Fnt5wieZ8bzT4Eqn31J6Cdahl
0sZDTjixl/fhM2G+E8gYNsWMihcWnMXejHdKT2yHG+rJXt4FvYYAuwIW/S75vSOM
L4CE4JS5D9UcYpNxU4Cv6KxiAAK/oQmzrrSoU9lJ6mp5wrwJDsBUgwOrXxYPct9N
FoqYgh54fs9xuh5fvHozst8wFY8Kf4hPVmOdPtcUlWQSbtRf0CehJ9yuftHmFxWX
yjyoa9X3MK7yHoZIAFXvbh1n+QUWGMNrCNIdqDtPEtjVBtSAGL5x+lxqfFMMRKJA
OfOtzjG1QDPP3EPrw/vfU2hCXZ75wlOoqEy6vmrVaYWJ5Apx0ftujtUxslSJ15Zz
CghYLtu/JolJT1Hxg5uOFpLaX3VoAs+y9e7+oRgPPVtHAgMBAAE=
-----END PUBLIC KEY-----

@ -22,8 +22,8 @@ var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:2018/'; // var BASE_URL = 'http://10.50.100.198:2018/';
// var BASE_URL = 'http://10.50.100.198:4422/'; // var BASE_URL = 'http://10.50.100.198:4422/';
var BASE_URL = 'https://uat.hmgwebservices.com/'; // var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/'; var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'http://10.20.200.111:1010/'; // var BASE_URL = 'http://10.20.200.111:1010/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/'; // var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
@ -344,7 +344,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari
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 = 15.7; var VERSION_ID = 15.8;
var SETUP_ID = '91877'; var SETUP_ID = '91877';
var LANGUAGE = 2; var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0; // var PATIENT_OUT_SA = 0;
@ -668,10 +668,10 @@ var GET_DENTAL_INSTRUCTIONS = 'Services/OUTPs.svc/Rest/getProcedureNotification'
//PAYFORT //PAYFORT
var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails"; var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails";
var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse"; var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse";
var payFortEnvironment = FortEnvironment.production; // var payFortEnvironment = FortEnvironment.production;
var applePayMerchantId = "merchant.com.hmgwebservices"; // var applePayMerchantId = "merchant.com.hmgwebservices";
// var payFortEnvironment = FortEnvironment.test; var payFortEnvironment = FortEnvironment.test;
// var applePayMerchantId = "merchant.com.hmgwebservices.uat"; var applePayMerchantId = "merchant.com.hmgwebservices.uat";
class AppGlobal { class AppGlobal {
static var context; static var context;

@ -12,6 +12,7 @@ import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.
import 'package:diplomaticquarterapp/pages/appUpdatePage/app_update_page.dart'; import 'package:diplomaticquarterapp/pages/appUpdatePage/app_update_page.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/navigation_service.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -201,11 +202,11 @@ class BaseAppClient {
body.removeWhere((key, value) => key == null || value == null); body.removeWhere((key, value) => key == null || value == null);
if (AppGlobal.isNetworkDebugEnabled) { // if (AppGlobal.isNetworkDebugEnabled) {
// print("URL : $url"); print("URL : $url");
// final jsonBody = json.encode(body); final jsonBody = json.encode(body);
// print(jsonBody); print(jsonBody);
} // }
if (await Utils.checkConnection( if (await Utils.checkConnection(
bypassConnectionCheck: bypassConnectionCheck)) { bypassConnectionCheck: bypassConnectionCheck)) {
@ -559,7 +560,7 @@ class BaseAppClient {
Future navigateToAppUpdate(context, String text) async { Future navigateToAppUpdate(context, String text) async {
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
context, locator<NavigationService>().navigatorKey.currentContext!,
MaterialPageRoute(builder: (context) => AppUpdatePage(appUpdateText: text)), MaterialPageRoute(builder: (context) => AppUpdatePage(appUpdateText: text)),
(Route<dynamic> route) => false, (Route<dynamic> route) => false,
); );

@ -8,18 +8,14 @@ import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/payfort_services/payfort_view_model.dart'; import 'package:diplomaticquarterapp/services/payfort_services/payfort_view_model.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart'; import 'package:diplomaticquarterapp/services/robo_search/search_provider.dart';
import 'package:diplomaticquarterapp/splashPage.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart'; import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart'; import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart'; import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
import 'package:diplomaticquarterapp/uitl/navigation_service.dart'; import 'package:diplomaticquarterapp/uitl/navigation_service.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:firebase_core/firebase_core.dart'; import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:logger/logger.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'config/size_config.dart'; import 'config/size_config.dart';

@ -10,7 +10,7 @@ class IncomingCallData {
String? title; String? title;
String? projectID; String? projectID;
String? notificationType; String? notificationType;
String? background; String? background; // 0 for Zoom, 1 for OpenTok
String? doctorname; String? doctorname;
String? clinicname; String? clinicname;
String? speciality; String? speciality;

@ -205,7 +205,7 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
callDoctorsSearchAPI() { callDoctorsSearchAPI() {
int languageID = projectViewModel.isArabic ? 1 : 2; int languageID = projectViewModel.isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false);
List<DoctorList> doctorsList = []; List<DoctorList> doctorsList = [];
List<String> arr = []; List<String> arr = [];
List<String> arrDistance = []; List<String> arrDistance = [];

@ -231,7 +231,7 @@ class DoctorView extends StatelessWidget {
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err, localContext: context);
print(err); print(err);
}); });
} }

@ -55,6 +55,7 @@ import 'package:provider/provider.dart';
class ToDo extends StatefulWidget { class ToDo extends StatefulWidget {
PatientShareResponse? patientShareResponse; PatientShareResponse? patientShareResponse;
var languageID; var languageID;
// MyInAppBrowser? browser; // MyInAppBrowser? browser;
bool? isShowAppBar = true; bool? isShowAppBar = true;
Function()? onBackClick; Function()? onBackClick;
@ -317,7 +318,24 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
itemSize: 16.0, itemSize: 16.0,
glowColor: Color(0XFFD02127), glowColor: Color(0XFFD02127),
unratedColor: Color(0XFFD02127), unratedColor: Color(0XFFD02127),
allowHalfRating: true, ratingWidget: RatingWidget(full:Icon(Icons.star), half: Icon(Icons.star_half), empty: Icon( Icons.star_border)), onRatingUpdate: (double value) { }, ignoreGestures: true,
ratingWidget: RatingWidget(
full: Icon(
Icons.star,
color: CustomColors.accentColor,
),
half: Icon(
Icons.star_half,
color: CustomColors.accentColor,
),
empty: Icon(
Icons.star,
color: CustomColors.accentColor,
),
),
tapOnlyMode: true,
allowHalfRating: true,
onRatingUpdate: (double value) {},
// : Icons.star_half, // : Icons.star_half,
// ic: Icons.star, // ic: Icons.star,
// emptyIcon: Icons.star_border, itemBuilder: (BuildContext context, int index) { }, // emptyIcon: Icons.star_border, itemBuilder: (BuildContext context, int index) { },
@ -1075,7 +1093,12 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0), transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity( child: Opacity(
opacity: a1.value, opacity: a1.value,
child: PaymentDialog(appo: appo, patientShareResponse: patientShareResponse, isCashPatient: isCash, onPaymentMethodSelected: (){},), child: PaymentDialog(
appo: appo,
patientShareResponse: patientShareResponse,
isCashPatient: isCash,
onPaymentMethodSelected: () {},
),
), ),
); );
}, },
@ -1083,8 +1106,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
barrierDismissible: false, barrierDismissible: false,
barrierLabel: '', barrierLabel: '',
context: context, context: context,
pageBuilder: (context, animation1, animation2) =>SizedBox()) pageBuilder: (context, animation1, animation2) => SizedBox()).then((value) {
.then((value) {
if (value != null) { if (value != null) {
navigateToPaymentMethod(context, value as PatientShareResponse, appo); navigateToPaymentMethod(context, value as PatientShareResponse, appo);
projectViewModel.analytics.todoList.to_do_list_confirm_payment_details(appo); projectViewModel.analytics.todoList.to_do_list_confirm_payment_details(appo);

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:in_app_update/in_app_update.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class AppUpdatePage extends StatefulWidget { class AppUpdatePage extends StatefulWidget {
@ -78,16 +79,17 @@ class _AppUpdatePageState extends State<AppUpdatePage> {
openAppUpdateLink() { openAppUpdateLink() {
if (Platform.isAndroid) { if (Platform.isAndroid) {
// _launchURL("https://play.google.com/store/apps/details?id=com.ejada.hmg"); // _launchURL("https://play.google.com/store/apps/details?id=com.ejada.hmg");
// InAppUpdate.checkForUpdate().then((info) { InAppUpdate.checkForUpdate().then((info) {
// print("checkForUpdate!!!"); print("checkForUpdate!!!");
// print(info.toString()); print(info.toString());
// if (info.immediateUpdateAllowed) { if (info.immediateUpdateAllowed) {
// print("Immediate Allowed!!!"); print("Immediate Allowed!!!");
// InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString())); InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString()));
// } }
// }).catchError((e) { }).catchError((e) {
// print(e.toString()); print(e.toString());
// }); _launchURL("https://play.google.com/store/apps/details?id=com.ejada.hmg");
});
} }
if (Platform.isIOS) { if (Platform.isIOS) {
_launchURL("https://itunes.apple.com/app/id733503978"); _launchURL("https://itunes.apple.com/app/id733503978");

@ -333,43 +333,45 @@ class _CallScreenState extends State<CallScreen> {
ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf();
if (data['status'] == RecordingStatus.Start) { if (data['status'] == RecordingStatus.Start) {
if (mySelf != null && !mySelf.isHost!) { if (mySelf != null && !mySelf.isHost!) {
showDialog<String>(
context: context,
builder: (BuildContext context) => AlertDialog(
content: const Text('The session is being recorded.'),
actions: <Widget>[
TextButton(
onPressed: () async {
await zoom.acceptRecordingConsent(); await zoom.acceptRecordingConsent();
// if (context.mounted) { // isRecordingStarted.value = true;
Navigator.pop(context); // showDialog<String>(
// }; // context: context,
}, // builder: (BuildContext context) => AlertDialog(
child: const Text('accept'), // content: const Text('The session is being recorded.'),
), // actions: <Widget>[
TextButton( // TextButton(
onPressed: () async { // onPressed: () async {
String currentConsentType = await zoom.getRecordingConsentType(); // await zoom.acceptRecordingConsent();
if (currentConsentType == ConsentType.ConsentType_Individual) { // // if (context.mounted) {
await zoom.declineRecordingConsent(); // Navigator.pop(context);
Navigator.pop(context); // // };
} else { // },
await zoom.declineRecordingConsent(); // child: const Text('accept'),
zoom.leaveSession(false); // ),
// if (!context.mounted) return; // TextButton(
// Navigator.popAndPushNamed( // onPressed: () async {
// context, // String currentConsentType = await zoom.getRecordingConsentType();
// "Join", // if (currentConsentType == ConsentType.ConsentType_Individual) {
// arguments: JoinArguments(args.isJoin, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role), // await zoom.declineRecordingConsent();
// Navigator.pop(context);
// } else {
// await zoom.declineRecordingConsent();
// zoom.leaveSession(false);
// // if (!context.mounted) return;
// // Navigator.popAndPushNamed(
// // context,
// // "Join",
// // arguments: JoinArguments(args.isJoin, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role),
// // );
// Navigator.pop(context);
// }
// },
// child: const Text('decline'),
// ),
// ],
// ),
// ); // );
Navigator.pop(context);
}
},
child: const Text('decline'),
),
],
),
);
} }
isRecordingStarted.value = true; isRecordingStarted.value = true;
} else { } else {
@ -1156,79 +1158,81 @@ class _CallScreenState extends State<CallScreen> {
void onLeaveSession(bool isEndSession) async { void onLeaveSession(bool isEndSession) async {
await zoom.leaveSession(isEndSession); await zoom.leaveSession(isEndSession);
Navigator.pop(context); Navigator.pop(context);
Navigator.pop(context); // Navigator.pop(context);
} }
void showLeaveOptions() async { void showLeaveOptions() async {
ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf();
bool isHost = await mySelf!.getIsHost(); bool isHost = await mySelf!.getIsHost();
Widget endSession; onLeaveSession(true);
Widget leaveSession;
Widget cancel = TextButton(
child: const Text('Cancel'),
onPressed: () {
Navigator.pop(context); //close Dialog
},
);
switch (defaultTargetPlatform) { // Widget endSession;
case TargetPlatform.android: // Widget leaveSession;
endSession = TextButton( // Widget cancel = TextButton(
child: const Text('End Session'), // child: const Text('Cancel'),
onPressed: () => onLeaveSession(true), // onPressed: () {
); // Navigator.pop(context); //close Dialog
leaveSession = TextButton( // },
child: const Text('Leave Session'), // );
onPressed: () => onLeaveSession(false),
);
break;
default:
endSession = CupertinoActionSheetAction(
isDestructiveAction: true,
child: const Text('End Session'),
onPressed: () => onLeaveSession(true),
);
leaveSession = CupertinoActionSheetAction(
child: const Text('Leave Session'),
onPressed: () => onLeaveSession(false),
);
break;
}
List<Widget> options = [
leaveSession,
cancel,
];
if (Platform.isAndroid) { // switch (defaultTargetPlatform) {
if (isHost) { // case TargetPlatform.android:
options.removeAt(1); // endSession = TextButton(
options.insert(0, endSession); // child: const Text('End Session'),
} // onPressed: () => onLeaveSession(true),
showDialog( // );
context: context, // leaveSession = TextButton(
builder: (context) { // child: const Text('Leave Session'),
return AlertDialog( // onPressed: () => onLeaveSession(false),
content: const Text("Do you want to leave this session?"), // );
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))), // break;
actions: options, // default:
); // endSession = CupertinoActionSheetAction(
}); // isDestructiveAction: true,
} else { // child: const Text('End Session'),
options.removeAt(1); // onPressed: () => onLeaveSession(true),
if (isHost) { // );
options.insert(1, endSession); // leaveSession = CupertinoActionSheetAction(
} // child: const Text('Leave Session'),
showCupertinoModalPopup( // onPressed: () => onLeaveSession(false),
context: context, // );
builder: (context) => CupertinoActionSheet( // break;
message: const Text('Are you sure that you want to leave the call?'), // }
actions: options, //
cancelButton: cancel, // List<Widget> options = [
), // leaveSession,
); // cancel,
} // ];
//
// if (Platform.isAndroid) {
// if (isHost) {
// options.removeAt(1);
// options.insert(0, endSession);
// }
// showDialog(
// context: context,
// builder: (context) {
// return AlertDialog(
// content: const Text("Do you want to leave this session?"),
// shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))),
// actions: options,
// );
// });
// } else {
// options.removeAt(1);
// if (isHost) {
// options.insert(1, endSession);
// }
// showCupertinoModalPopup(
// context: context,
// builder: (context) => CupertinoActionSheet(
// message: const Text('Are you sure that you want to leave the call?'),
// actions: options,
// cancelButton: cancel,
// ),
// );
// }
} }
final chatMessageController = TextEditingController(); final chatMessageController = TextEditingController();
@ -1353,154 +1357,154 @@ class _CallScreenState extends State<CallScreen> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Container(
height: 70,
width: 150,
margin: const EdgeInsets.only(top: 16, left: 8),
padding: const EdgeInsets.all(8),
alignment: Alignment.topLeft,
decoration: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(8.0)),
color: buttonBackgroundColor,
),
child: InkWell(
onTap: () async {
showDialog(
context: context,
builder: (context) {
return Dialog(
elevation: 0.0,
insetPadding: const EdgeInsets.symmetric(horizontal: 40),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
child: SizedBox(
height: 280,
width: 200,
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
ListView(
shrinkWrap: true,
children: ListTile.divideTiles(
context: context,
tiles: [
ListTile(
title: Text(
'Session Information',
style: GoogleFonts.lato(
textStyle: const TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
),
),
),
),
ListTile(
title: Text(
'Session Name',
style: GoogleFonts.lato(
textStyle: const TextStyle(
fontSize: 14,
),
),
),
subtitle: Text(
sessionName.value,
style: GoogleFonts.lato(
textStyle: const TextStyle(
fontSize: 12,
),
),
),
),
ListTile(
title: Text(
'Session Password',
style: GoogleFonts.lato(
textStyle: const TextStyle(
fontSize: 14,
),
),
),
subtitle: Text(
sessionPassword.value,
style: GoogleFonts.lato(
textStyle: const TextStyle(
fontSize: 12,
),
),
),
),
ListTile(
title: Text(
'Participants',
style: GoogleFonts.lato(
textStyle: const TextStyle(
fontSize: 14,
),
),
),
subtitle: Text(
'${users.value.length}',
style: GoogleFonts.lato(
textStyle: const TextStyle(
fontSize: 12,
),
),
),
),
],
).toList(),
),
],
),
));
});
},
child: Stack(
children: [
Column(
children: [
const Padding(padding: EdgeInsets.symmetric(vertical: 3)),
Align(
alignment: Alignment.centerLeft,
child: Text(
sessionName.value,
overflow: TextOverflow.ellipsis,
style: GoogleFonts.lato(
textStyle: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: Colors.white,
),
),
),
),
const Padding(padding: EdgeInsets.symmetric(vertical: 5)),
Align(
alignment: Alignment.centerLeft,
child: Text(
"Participants: ${users.value.length}",
style: GoogleFonts.lato(
textStyle: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: Colors.white,
),
),
),
)
],
),
// Container( // Container(
// alignment: Alignment.centerRight, // height: 70,
// child: Image.asset( // width: 150,
// "assets/icons/unlocked@2x.png", // margin: const EdgeInsets.only(top: 16, left: 8),
// height: 22, // padding: const EdgeInsets.all(8),
// )), // alignment: Alignment.topLeft,
], // decoration: BoxDecoration(
), // borderRadius: const BorderRadius.all(Radius.circular(8.0)),
), // color: buttonBackgroundColor,
), // ),
// child: InkWell(
// onTap: () async {
// showDialog(
// context: context,
// builder: (context) {
// return Dialog(
// elevation: 0.0,
// insetPadding: const EdgeInsets.symmetric(horizontal: 40),
// shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
// child: SizedBox(
// height: 280,
// width: 200,
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.stretch,
// children: [
// ListView(
// shrinkWrap: true,
// children: ListTile.divideTiles(
// context: context,
// tiles: [
// ListTile(
// title: Text(
// 'Session Information',
// style: GoogleFonts.lato(
// textStyle: const TextStyle(
// fontSize: 18,
// fontWeight: FontWeight.w600,
// ),
// ),
// ),
// ),
// ListTile(
// title: Text(
// 'Session Name',
// style: GoogleFonts.lato(
// textStyle: const TextStyle(
// fontSize: 14,
// ),
// ),
// ),
// subtitle: Text(
// sessionName.value,
// style: GoogleFonts.lato(
// textStyle: const TextStyle(
// fontSize: 12,
// ),
// ),
// ),
// ),
// ListTile(
// title: Text(
// 'Session Password',
// style: GoogleFonts.lato(
// textStyle: const TextStyle(
// fontSize: 14,
// ),
// ),
// ),
// subtitle: Text(
// sessionPassword.value,
// style: GoogleFonts.lato(
// textStyle: const TextStyle(
// fontSize: 12,
// ),
// ),
// ),
// ),
// ListTile(
// title: Text(
// 'Participants',
// style: GoogleFonts.lato(
// textStyle: const TextStyle(
// fontSize: 14,
// ),
// ),
// ),
// subtitle: Text(
// '${users.value.length}',
// style: GoogleFonts.lato(
// textStyle: const TextStyle(
// fontSize: 12,
// ),
// ),
// ),
// ),
// ],
// ).toList(),
// ),
// ],
// ),
// ));
// });
// },
// child: Stack(
// children: [
// // Column(
// // children: [
// // const Padding(padding: EdgeInsets.symmetric(vertical: 3)),
// // Align(
// // alignment: Alignment.centerLeft,
// // child: Text(
// // sessionName.value,
// // overflow: TextOverflow.ellipsis,
// // style: GoogleFonts.lato(
// // textStyle: const TextStyle(
// // fontSize: 14,
// // fontWeight: FontWeight.w600,
// // color: Colors.white,
// // ),
// // ),
// // ),
// // ),
// // const Padding(padding: EdgeInsets.symmetric(vertical: 5)),
// // Align(
// // alignment: Alignment.centerLeft,
// // child: Text(
// // "Participants: ${users.value.length}",
// // style: GoogleFonts.lato(
// // textStyle: const TextStyle(
// // fontSize: 14,
// // fontWeight: FontWeight.w600,
// // color: Colors.white,
// // ),
// // ),
// // ),
// // )
// // ],
// // ),
// // Container(
// // alignment: Alignment.centerRight,
// // child: Image.asset(
// // "assets/icons/unlocked@2x.png",
// // height: 22,
// // )),
// ],
// ),
// ),
// ),
TextButton( TextButton(
onPressed: (showLeaveOptions), onPressed: (showLeaveOptions),
child: Container( child: Container(

@ -322,15 +322,20 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// HMGNetworkConnectivity(context).start(); // HMGNetworkConnectivity(context).start();
_firebaseMessaging.getToken().then((String? token) { _firebaseMessaging.getToken().then((String? token) {
// print("Firebase Token: " + token!); print("Firebase Token: " + token!);
// sharedPref.setString(PUSH_TOKEN, token!); sharedPref.setString(PUSH_TOKEN, token!);
// if (Platform.isIOS) { if (Platform.isIOS) {
FirebaseMessaging.instance.getAPNSToken().then((value) {
print("Push APNS getToken: " + value!);
AppSharedPreferences().setString(APNS_TOKEN, value);
AppSharedPreferences().setString(ONESIGNAL_APNS_TOKEN, value);
});
// voIPKit.getVoIPToken().then((value) { // voIPKit.getVoIPToken().then((value) {
// print('🎈 example: getVoIPToken: $value'); // print('🎈 example: getVoIPToken: $value');
// AppSharedPreferences().setString(APNS_TOKEN, value!); // AppSharedPreferences().setString(APNS_TOKEN, value!);
// // getOneSignalVOIPToken(value); // // getOneSignalVOIPToken(value);
// }); // });
// } }
if (token != null) { if (token != null) {
DEVICE_TOKEN = token; DEVICE_TOKEN = token;
if (!projectViewModel.isLoginChild) { if (!projectViewModel.isLoginChild) {
@ -394,11 +399,11 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
} else { } else {
// AppGlobal.context = context; // AppGlobal.context = context;
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES? value) async { authService.selectDeviceImei(DEVICE_TOKEN).then((value) async {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
var data = await sharedPref.getObject(IMEI_USER_DATA); var data = await sharedPref.getObject(IMEI_USER_DATA);
if (data != null) { if (value != null) {
setUserValues(data); setUserValues(value);
Navigator.of(context).pushNamed(CONFIRM_LOGIN); Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else { } else {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -733,7 +738,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
} }
if (Platform.isIOS) { if (Platform.isIOS) {
String voipToken = await sharedPref.getString(APNS_TOKEN); String voipToken = await sharedPref.getString(APNS_TOKEN);
getOneSignalVOIPToken(voipToken); // getOneSignalVOIPToken(voipToken);
} }
// registerGeofences(); // registerGeofences();
} }

@ -216,39 +216,30 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
LandingPage.isOpenCallPage = false; LandingPage.isOpenCallPage = false;
player.stop(); player.stop();
changeCallStatusAPI(4); changeCallStatusAPI(4);
Navigator.of(context).pop();
Navigator.pushNamed( if (widget.incomingCallData!.background == "0") {
// Navigator.of(context).pop();
Navigator.pushReplacementNamed(
context, context,
"zoom_call_page", "zoom_call_page",
arguments: CallArguments(widget.incomingCallData!.sessionId!, "123", "Patient", "40", "1", false), arguments: CallArguments(widget.incomingCallData!.sessionId!, "123", "Patient", "40", "0", false),
); );
} else {
// await Navigator.of(context).pushReplacement( await Navigator.of(context).pushReplacement(
// MaterialPageRoute( MaterialPageRoute(
// // fullscreenDialog: true, // fullscreenDialog: true,
// builder: (BuildContext context) { builder: (BuildContext context) {
// // final caller = widget.incomingCallData.callerID; // final caller = widget.incomingCallData.callerID;
// // final receiver = widget.incomingCallData.receiverID; // final receiver = widget.incomingCallData.receiverID;
// // final host = widget.incomingCallData.server; // final host = widget.incomingCallData.server;
// // if(widget.incomingCallData.isWebRTC == "true"){ // if(widget.incomingCallData.isWebRTC == "true"){
// // return StartVideoCall(caller: caller, receiver: receiver, iAmCaller: false, host: host); // return StartVideoCall(caller: caller, receiver: receiver, iAmCaller: false, host: host);
// // }else{ // }else{
// return OpenTokConnectCallPage( return OpenTokConnectCallPage(apiKey: OPENTOK_API_KEY, sessionId: widget.incomingCallData!.sessionId!, token: widget.incomingCallData!.token!);
// apiKey: OPENTOK_API_KEY, },
// sessionId: widget.incomingCallData!.sessionId!, ),
// token: widget.incomingCallData!.token! );
// ); }
// // }
//
// // return VideoCallWebPage(receiverId: widget.incomingCallData.receiverID, callerId: widget.incomingCallData.callerID); // Web WebRTC VideoCall
//
// // return CallHomePage(receiverId: widget.incomingCallData.receiverID, callerId: widget.incomingCallData.callerID); // App WebRTC VideoCall
//
// },
// ),
// );
} catch (err) { } catch (err) {
print(err); print(err);
await PlatformExceptionAlertDialog( await PlatformExceptionAlertDialog(

@ -667,7 +667,7 @@ class _clinic_listState extends State<ClinicList> {
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err); AppToast.showErrorToast(message: err, localContext: context);
print(err); print(err);
}); });
} }

@ -788,7 +788,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
sharedPref.remove(FAMILY_FILE), sharedPref.remove(FAMILY_FILE),
result.list.isFamily = false, result.list.isFamily = false,
userData = result.list, userData = result.list,
sharedPref.setString(BLOOD_TYPE, result.patientBloodType), sharedPref.setString(BLOOD_TYPE, result.patientBloodType ?? ""),
//Remove o+ from here Added by Aamir //Remove o+ from here Added by Aamir
authenticatedUserObject.user = result.list, authenticatedUserObject.user = result.list,
projectViewModel.setPrivilege(privilegeList: res), projectViewModel.setPrivilege(privilegeList: res),

@ -1,6 +1,6 @@
import 'dart:io'; import 'dart:io';
import 'package:carousel_slider/carousel_slider.dart'; // import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
@ -22,7 +22,7 @@ class SmartWatchInstructions extends StatefulWidget {
} }
class _SmartWatchInstructionsState extends State<SmartWatchInstructions> { class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
CarouselController buttonCarouselController = CarouselController(); // CarouselController buttonCarouselController = CarouselController();
bool hasAlreadySynced = false; bool hasAlreadySynced = false;

@ -11,7 +11,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart'; import 'package:flutter/rendering.dart';
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart' as grid_view; // import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart' as grid_view;
import 'CreateCustomerDailogPage.dart'; import 'CreateCustomerDailogPage.dart';
@ -37,8 +37,7 @@ class _ClinicPackagesPageState extends State<ClinicPackagesPage> with AfterLayou
if (viewModel!.service.customer != null) { if (viewModel!.service.customer != null) {
var request = AddProductToCartRequestModel(product_id: product.id, customer_id: viewModel!.service!.customer!.id); var request = AddProductToCartRequestModel(product_id: product.id, customer_id: viewModel!.service!.customer!.id);
await viewModel!.service.addProductToCart(request, context: context).then((response) { await viewModel!.service.addProductToCart(request, context: context).then((response) {}).catchError((error) {
}).catchError((error) {
utils.Utils.showErrorToast(error); utils.Utils.showErrorToast(error);
}); });
} }
@ -74,20 +73,21 @@ class _ClinicPackagesPageState extends State<ClinicPackagesPage> with AfterLayou
showNewAppBarTitle: true, showNewAppBarTitle: true,
body: Padding( body: Padding(
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(12),
child:grid_view.AlignedGridView.count( // child: grid_view.AlignedGridView.count(
crossAxisCount: 4, // crossAxisCount: 4,
itemCount: _products.length, // itemCount: _products.length,
itemBuilder: (BuildContext context, int index) => new Container( // itemBuilder: (BuildContext context, int index) => new Container(
color: Colors.transparent, // color: Colors.transparent,
child: PackagesItemCard( // child: PackagesItemCard(
itemContentPadding: 10, // itemContentPadding: 10,
itemModel: _products[index], // itemModel: _products[index],
onCartClick: OFFERS_VIEW_ONLY ? onProductCartClick : (PackagesResponseModel){}, // onCartClick: OFFERS_VIEW_ONLY ? onProductCartClick : (PackagesResponseModel) {},
)), // )),
// staggeredTileBuilder: (int index) => StaggeredTile.fit(2), // // staggeredTileBuilder: (int index) => StaggeredTile.fit(2),
mainAxisSpacing: 20, // mainAxisSpacing: 20,
crossAxisSpacing: 10, // crossAxisSpacing: 10,
)), // ),
),
), ),
); );
} }

@ -1,5 +1,5 @@
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import 'package:carousel_slider/carousel_slider.dart'; // import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/landing/home_page.dart'; import 'package:diplomaticquarterapp/pages/landing/home_page.dart';
@ -32,47 +32,47 @@ class _BannerPagerState extends State<BannerPager> {
return Container( return Container(
child: Column( child: Column(
children: [ children: [
CarouselSlider( // CarouselSlider(
options: CarouselOptions( // options: CarouselOptions(
aspectRatio: 5 / 2, // aspectRatio: 5 / 2,
enlargeCenterPage: true, // enlargeCenterPage: true,
enableInfiniteScroll: false, // enableInfiniteScroll: false,
viewportFraction: 1.0, // viewportFraction: 1.0,
initialPage: 0, // initialPage: 0,
autoPlay: true, // autoPlay: true,
autoPlayInterval: Duration(seconds: 3), // autoPlayInterval: Duration(seconds: 3),
autoPlayAnimationDuration: Duration(milliseconds: 800), // autoPlayAnimationDuration: Duration(milliseconds: 800),
autoPlayCurve: Curves.decelerate, // autoPlayCurve: Curves.decelerate,
onPageChanged: (index, reason) { // onPageChanged: (index, reason) {
setState(() { // setState(() {
_current = index; // _current = index;
}); // });
}, // },
), // ),
items: widget._model.getBannerImagesUrl(projectViewModel).mapIndexed( // items: widget._model.getBannerImagesUrl(projectViewModel).mapIndexed(
(item, index) { // (item, index) {
return InkWell( // return InkWell(
onTap: () { // onTap: () {
bannerNavigator(index); // bannerNavigator(index);
}, // },
child: Container( // child: Container(
margin: EdgeInsets.symmetric(horizontal: 1.0), // margin: EdgeInsets.symmetric(horizontal: 1.0),
child: ClipRRect( // child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5.0)), // borderRadius: BorderRadius.all(Radius.circular(5.0)),
child: Center( // child: Center(
child: index == 0 || index == 1 // child: index == 0 || index == 1
? Image.asset( // ? Image.asset(
item, // item,
fit: BoxFit.cover, // fit: BoxFit.cover,
) // )
: CachedNetworkImage(imageUrl: item, fit: BoxFit.fitWidth, errorWidget: (context, url, error) => SizedBox()), // : CachedNetworkImage(imageUrl: item, fit: BoxFit.fitWidth, errorWidget: (context, url, error) => SizedBox()),
), // ),
), // ),
), // ),
); // );
}, // },
).toList(), // ).toList(),
), // ),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Row( child: Row(

@ -1,4 +1,4 @@
import 'package:carousel_slider/carousel_slider.dart'; // import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart';
@ -24,231 +24,231 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
return Container( return Container(
child: Stack( child: Stack(
children: [ children: [
CarouselSlider( // CarouselSlider(
options: CarouselOptions( // options: CarouselOptions(
enableInfiniteScroll: false, // enableInfiniteScroll: false,
enlargeCenterPage: false, // enlargeCenterPage: false,
viewportFraction: 1.0, // viewportFraction: 1.0,
scrollPhysics: widget.isLacumHomePage // scrollPhysics: widget.isLacumHomePage
? ScrollPhysics() // ? ScrollPhysics()
: NeverScrollableScrollPhysics(), // : NeverScrollableScrollPhysics(),
initialPage: 0, // initialPage: 0,
onPageChanged: (index, reason) { // onPageChanged: (index, reason) {
setState(() { // setState(() {
_current = index; // _current = index;
}); // });
}, // },
), // ),
items: [ // items: [
Container( // Container(
decoration: BoxDecoration( // decoration: BoxDecoration(
shape: BoxShape.rectangle, // shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(4), // borderRadius: BorderRadius.circular(4),
border: Border.fromBorderSide(BorderSide( // border: Border.fromBorderSide(BorderSide(
color: Colors.grey, // color: Colors.grey,
width: 0.4, // width: 0.4,
)), // )),
), // ),
margin: EdgeInsets.symmetric(horizontal: 16), // margin: EdgeInsets.symmetric(horizontal: 16),
child: Stack( // child: Stack(
children: [ // children: [
Image.asset( // Image.asset(
"assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", // "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png",
fit: BoxFit.fill, // fit: BoxFit.fill,
width: widget.mediaQuery.size.width * 1.0, // width: widget.mediaQuery.size.width * 1.0,
height: widget.mediaQuery.size.width * 1.0, // height: widget.mediaQuery.size.width * 1.0,
), // ),
Container( // Container(
margin: EdgeInsets.fromLTRB(12, 75, 12, 0), // margin: EdgeInsets.fromLTRB(12, 75, 12, 0),
child: Column( // child: Column(
children: [ // children: [
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // children: [
Column( // Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ // children: [
Texts( // Texts(
widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName, // widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName,
fontSize: 13, // fontSize: 13,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.black, // color: Colors.black,
), // ),
Texts( // Texts(
"${widget.model.lacumInformation!.yahalaAccountNo}", // "${widget.model.lacumInformation!.yahalaAccountNo}",
fontSize: 13, // fontSize: 13,
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
color: Colors.black, // color: Colors.black,
), // ),
], // ],
), // ),
BorderedButton( // BorderedButton(
widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountStatus == "Active" // widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountStatus == "Active"
? TranslationBase.of(context).active // ? TranslationBase.of(context).active
: TranslationBase.of(context).inactive, // : TranslationBase.of(context).inactive,
textColor: widget.model.lacumInformation! // textColor: widget.model.lacumInformation!
.accountStatus == // .accountStatus ==
1 // 1
? Colors.green // ? Colors.green
: Colors.red, // : Colors.red,
hasBorder: true, // hasBorder: true,
borderColor: widget.model.lacumInformation! // borderColor: widget.model.lacumInformation!
.accountStatus == // .accountStatus ==
1 // 1
? Colors.green // ? Colors.green
: Colors.red, // : Colors.red,
radius: 16, // radius: 16,
rPadding: 16, // rPadding: 16,
icon: widget.model.lacumInformation! // icon: widget.model.lacumInformation!
.accountStatus == // .accountStatus ==
1 // 1
? Icon( // ? Icon(
Icons.check_circle, // Icons.check_circle,
size: 25, // size: 25,
color: Colors.green, // color: Colors.green,
) // )
: Image.asset( // : Image.asset(
"assets/images/pharmacy_module/lakum/inactive_cross.png", // "assets/images/pharmacy_module/lakum/inactive_cross.png",
fit: BoxFit.fill, // fit: BoxFit.fill,
width: 25, // width: 25,
height: 25, // height: 25,
), // ),
), // ),
], // ],
), // ),
SizedBox( // SizedBox(
height: 5, // height: 5,
), // ),
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // children: [
Column( // Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ // children: [
Texts(TranslationBase.of(context).identificationNumber, // Texts(TranslationBase.of(context).identificationNumber,
// "IDENTIFICATION #", // // "IDENTIFICATION #",
fontSize: 13, // fontSize: 13,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.black, // color: Colors.black,
), // ),
Texts( // Texts(
widget.model.lacumInformation! // widget.model.lacumInformation!
.identificationNo, // .identificationNo,
fontSize: 13, // fontSize: 13,
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
color: Colors.black, // color: Colors.black,
), // ),
], // ],
), // ),
Column( // Column(
crossAxisAlignment: CrossAxisAlignment.end, // crossAxisAlignment: CrossAxisAlignment.end,
children: [ // children: [
Texts(TranslationBase.of(context).MEMBERSINCE, // Texts(TranslationBase.of(context).MEMBERSINCE,
// "MEMBER SINCE", // // "MEMBER SINCE",
fontSize: 13, // fontSize: 13,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.black, // color: Colors.black,
), // ),
Texts( // Texts(
widget.model.formatCreatedDateToString(), // widget.model.formatCreatedDateToString(),
fontSize: 13, // fontSize: 13,
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
color: Colors.black, // color: Colors.black,
), // ),
], // ],
), // ),
], // ],
), // ),
SizedBox( // SizedBox(
height: 5, // height: 5,
), // ),
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // children: [
Column( // Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ // children: [
Texts(TranslationBase.of(context).lakumMobile, // Texts(TranslationBase.of(context).lakumMobile,
// "MOBILE #", // // "MOBILE #",
fontSize: 13, // fontSize: 13,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.black, // color: Colors.black,
), // ),
Texts( // Texts(
widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber, // widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber,
fontSize: 13, // fontSize: 13,
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
color: Colors.black, // color: Colors.black,
), // ),
], // ],
), // ),
Column( // Column(
crossAxisAlignment: CrossAxisAlignment.end, // crossAxisAlignment: CrossAxisAlignment.end,
children: [ // children: [
Texts( // Texts(
TranslationBase.of(context).language, // TranslationBase.of(context).language,
fontSize: 13, // fontSize: 13,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.black, // color: Colors.black,
), // ),
Texts( // Texts(
widget.model.lacumInformation!.prefLang == // widget.model.lacumInformation!.prefLang ==
"2" // "2"
? TranslationBase.of(context).lanEnglish // ? TranslationBase.of(context).lanEnglish
: TranslationBase.of(context).lanArabic, // : TranslationBase.of(context).lanArabic,
fontSize: 13, // fontSize: 13,
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
color: Colors.black, // color: Colors.black,
), // ),
], // ],
), // ),
], // ],
), // ),
], // ],
), // ),
), // ),
], // ],
), // ),
), // ),
widget.isLacumHomePage // widget.isLacumHomePage
? Container( // ? Container(
decoration: BoxDecoration( // decoration: BoxDecoration(
shape: BoxShape.rectangle, // shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(4), // borderRadius: BorderRadius.circular(4),
border: Border.fromBorderSide(BorderSide( // border: Border.fromBorderSide(BorderSide(
color: Colors.grey, // color: Colors.grey,
width: 0.4, // width: 0.4,
)), // )),
), // ),
margin: EdgeInsets.symmetric(horizontal: 16), // margin: EdgeInsets.symmetric(horizontal: 16),
child: Stack( // child: Stack(
children: [ // children: [
Image.asset( // Image.asset(
"assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", // "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png",
fit: BoxFit.fill, // fit: BoxFit.fill,
width: widget.mediaQuery.size.width * 1.0, // width: widget.mediaQuery.size.width * 1.0,
height: widget.mediaQuery.size.width * 1.0, // height: widget.mediaQuery.size.width * 1.0,
), // ),
Center( // Center(
child: Container( // child: Container(
margin: EdgeInsets.fromLTRB(5, 70, 5, 4), // margin: EdgeInsets.fromLTRB(5, 70, 5, 4),
child: widget.model.convertBase64ToBarCodeImage() != // child: widget.model.convertBase64ToBarCodeImage() !=
null // null
? Image.memory( // ? Image.memory(
widget.model.convertBase64ToBarCodeImage(), // widget.model.convertBase64ToBarCodeImage(),
fit: BoxFit.fill, // fit: BoxFit.fill,
height: 100.0, // height: 100.0,
width: 180.0 // width: 180.0
) // )
: Container(), // : Container(),
), // ),
), // ),
], // ],
), // ),
) // )
: Container(), // : Container(),
], // ],
), // ),
widget.isLacumHomePage widget.isLacumHomePage
? Positioned( ? Positioned(
bottom: 1, bottom: 1,

@ -1,4 +1,4 @@
import 'package:carousel_slider/carousel_slider.dart'; // import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart';
@ -24,225 +24,225 @@ class _LakumBannerWidgetState extends State<LakumBannerWidget> {
return Container( return Container(
child: Stack( child: Stack(
children: [ children: [
CarouselSlider( // CarouselSlider(
options: CarouselOptions( // options: CarouselOptions(
enableInfiniteScroll: false, // enableInfiniteScroll: false,
enlargeCenterPage: false, // enlargeCenterPage: false,
viewportFraction: 1.0, // viewportFraction: 1.0,
scrollPhysics: widget.isLacumHomePage // scrollPhysics: widget.isLacumHomePage
? ScrollPhysics() // ? ScrollPhysics()
: NeverScrollableScrollPhysics(), // : NeverScrollableScrollPhysics(),
initialPage: 0, // initialPage: 0,
onPageChanged: (index, reason) { // onPageChanged: (index, reason) {
setState(() { // setState(() {
_current = index; // _current = index;
}); // });
}, // },
), // ),
items: [ // items: [
Container( // Container(
decoration: BoxDecoration( // decoration: BoxDecoration(
shape: BoxShape.rectangle, // shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(4), // borderRadius: BorderRadius.circular(4),
border: Border.fromBorderSide(BorderSide( // border: Border.fromBorderSide(BorderSide(
color: Colors.grey, // color: Colors.grey,
width: 0.4, // width: 0.4,
)), // )),
), // ),
margin: EdgeInsets.symmetric(horizontal: 16), // margin: EdgeInsets.symmetric(horizontal: 16),
child: Stack( // child: Stack(
children: [ // children: [
Image.asset( // Image.asset(
"assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", // "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png",
fit: BoxFit.fill, // fit: BoxFit.fill,
width: widget.mediaQuery.size.width * 1.0, // width: widget.mediaQuery.size.width * 1.0,
height: widget.mediaQuery.size.width * 1.0, // height: widget.mediaQuery.size.width * 1.0,
), // ),
Container( // Container(
margin: EdgeInsets.fromLTRB(12, 70, 12, 4), // margin: EdgeInsets.fromLTRB(12, 70, 12, 4),
child: Column( // child: Column(
children: [ // children: [
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // children: [
Column( // Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ // children: [
Texts( // Texts(
widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName, // widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName,
fontSize: 14, // fontSize: 14,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.black, // color: Colors.black,
), // ),
Texts( // Texts(
"${widget.model.lacumInformation!.yahalaAccountNo}", // "${widget.model.lacumInformation!.yahalaAccountNo}",
fontSize: 16, // fontSize: 16,
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
color: Colors.black, // color: Colors.black,
), // ),
], // ],
), // ),
BorderedButton( // BorderedButton(
widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountStatus == "Active" // widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountStatus == "Active"
? TranslationBase.of(context).active // ? TranslationBase.of(context).active
: TranslationBase.of(context).inactive, // : TranslationBase.of(context).inactive,
textColor: widget.model.lacumInformation! // textColor: widget.model.lacumInformation!
.accountStatus! == // .accountStatus! ==
1 // 1
? Colors.green // ? Colors.green
: Colors.red, // : Colors.red,
hasBorder: true, // hasBorder: true,
borderColor: widget.model.lacumInformation! // borderColor: widget.model.lacumInformation!
.accountStatus == // .accountStatus ==
1 // 1
? Colors.green // ? Colors.green
: Colors.red, // : Colors.red,
radius: 16, // radius: 16,
rPadding: 16, // rPadding: 16,
icon: widget.model.lacumInformation! // icon: widget.model.lacumInformation!
.accountStatus == // .accountStatus ==
1 // 1
? Icon( // ? Icon(
Icons.check_circle, // Icons.check_circle,
size: 25, // size: 25,
color: Colors.green, // color: Colors.green,
) // )
: Image.asset( // : Image.asset(
"assets/images/pharmacy_module/lakum/inactive_cross.png", // "assets/images/pharmacy_module/lakum/inactive_cross.png",
fit: BoxFit.fill, // fit: BoxFit.fill,
width: 25, // width: 25,
height: 25, // height: 25,
), // ),
), // ),
], // ],
), // ),
SizedBox( // SizedBox(
height: 10, // height: 10,
), // ),
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // children: [
Column( // Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ // children: [
Texts( // Texts(
"IDENTIFICATION #", // "IDENTIFICATION #",
fontSize: 14, // fontSize: 14,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.black, // color: Colors.black,
), // ),
Texts( // Texts(
widget.model.lacumInformation! // widget.model.lacumInformation!
.identificationNo, // .identificationNo,
fontSize: 16, // fontSize: 16,
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
color: Colors.black, // color: Colors.black,
), // ),
], // ],
), // ),
Column( // Column(
crossAxisAlignment: CrossAxisAlignment.end, // crossAxisAlignment: CrossAxisAlignment.end,
children: [ // children: [
Texts( // Texts(
"MEMBER SINCE", // "MEMBER SINCE",
fontSize: 14, // fontSize: 14,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.black, // color: Colors.black,
), // ),
Texts( // Texts(
widget.model.formatCreatedDateToString(), // widget.model.formatCreatedDateToString(),
fontSize: 16, // fontSize: 16,
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
color: Colors.black, // color: Colors.black,
), // ),
], // ],
), // ),
], // ],
), // ),
SizedBox( // SizedBox(
height: 10, // height: 10,
), // ),
Row( // Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, // mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ // children: [
Column( // Column(
crossAxisAlignment: CrossAxisAlignment.start, // crossAxisAlignment: CrossAxisAlignment.start,
children: [ // children: [
Texts( // Texts(
"MOBILE #", // "MOBILE #",
fontSize: 14, // fontSize: 14,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.black, // color: Colors.black,
), // ),
Texts( // Texts(
widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber, // widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber,
fontSize: 16, // fontSize: 16,
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
color: Colors.black, // color: Colors.black,
), // ),
], // ],
), // ),
Column( // Column(
crossAxisAlignment: CrossAxisAlignment.end, // crossAxisAlignment: CrossAxisAlignment.end,
children: [ // children: [
Texts( // Texts(
TranslationBase.of(context).language, // TranslationBase.of(context).language,
fontSize: 14, // fontSize: 14,
fontWeight: FontWeight.bold, // fontWeight: FontWeight.bold,
color: Colors.black, // color: Colors.black,
), // ),
Texts( // Texts(
widget.model.lacumInformation!.prefLang == // widget.model.lacumInformation!.prefLang ==
"1" // "1"
? TranslationBase.of(context).lanEnglish // ? TranslationBase.of(context).lanEnglish
: TranslationBase.of(context).lanArabic, // : TranslationBase.of(context).lanArabic,
fontSize: 16, // fontSize: 16,
fontWeight: FontWeight.normal, // fontWeight: FontWeight.normal,
color: Colors.black, // color: Colors.black,
), // ),
], // ],
), // ),
], // ],
), // ),
], // ],
), // ),
), // ),
], // ],
), // ),
), // ),
widget.isLacumHomePage // widget.isLacumHomePage
? Container( // ? Container(
decoration: BoxDecoration( // decoration: BoxDecoration(
shape: BoxShape.rectangle, // shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(4), // borderRadius: BorderRadius.circular(4),
border: Border.fromBorderSide(BorderSide( // border: Border.fromBorderSide(BorderSide(
color: Colors.grey, // color: Colors.grey,
width: 0.4, // width: 0.4,
)), // )),
), // ),
margin: EdgeInsets.symmetric(horizontal: 16), // margin: EdgeInsets.symmetric(horizontal: 16),
child: Stack( // child: Stack(
children: [ // children: [
Image.asset( // Image.asset(
"assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", // "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png",
fit: BoxFit.fill, // fit: BoxFit.fill,
width: widget.mediaQuery.size.width * 1.0, // width: widget.mediaQuery.size.width * 1.0,
height: widget.mediaQuery.size.width * 1.0, // height: widget.mediaQuery.size.width * 1.0,
), // ),
Container( // Container(
margin: EdgeInsets.fromLTRB(12, 70, 12, 4), // margin: EdgeInsets.fromLTRB(12, 70, 12, 4),
child: widget.model.convertBase64ToBarCodeImage() != // child: widget.model.convertBase64ToBarCodeImage() !=
null // null
? Image.memory( // ? Image.memory(
widget.model.convertBase64ToBarCodeImage()) // widget.model.convertBase64ToBarCodeImage())
: Container(), // : Container(),
), // ),
], // ],
), // ),
) // )
: Container(), // : Container(),
], // ],
), // ),
widget.isLacumHomePage widget.isLacumHomePage
? Positioned( ? Positioned(
bottom: 1, bottom: 1,

@ -33,48 +33,35 @@ enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED }
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
AppGlobal appGlobal = AppGlobal(); AppGlobal appGlobal = AppGlobal();
const String INSERT_DEVICE_IMEI = const String INSERT_DEVICE_IMEI = 'Services/Patients.svc/REST/Patient_INSERTDeviceIMEI';
'Services/Patients.svc/REST/Patient_INSERTDeviceIMEI'; const String SELECT_DEVICE_IMEI = 'Services/Patients.svc/REST/Patient_SELECTDeviceIMEIbyIMEI';
const String SELECT_DEVICE_IMEI = const String CHECK_PATIENT_AUTH = 'Services/Authentication.svc/REST/CheckPatientAuthentication';
'Services/Patients.svc/REST/Patient_SELECTDeviceIMEIbyIMEI';
const String CHECK_PATIENT_AUTH =
'Services/Authentication.svc/REST/CheckPatientAuthentication';
const GET_MOBILE_INFO = 'Services/Authentication.svc/REST/GetMobileLoginInfo'; const GET_MOBILE_INFO = 'Services/Authentication.svc/REST/GetMobileLoginInfo';
const SEND_ACTIVATION_CODE = const SEND_ACTIVATION_CODE = 'Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationType';
'Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationType';
const SEND_ACTIVATION_CODE_REGISTER = const SEND_ACTIVATION_CODE_REGISTER = 'Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationTypeForRegistration';
'Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationTypeForRegistration'; const CHECK_ACTIVATION_CODE = 'Services/Authentication.svc/REST/CheckActivationCode';
const CHECK_ACTIVATION_CODE = const CHECK_ACTIVATION_CODE_REGISTER = 'Services/Authentication.svc/REST/CheckActivationCodeForRegistration';
'Services/Authentication.svc/REST/CheckActivationCode';
const CHECK_ACTIVATION_CODE_REGISTER =
'Services/Authentication.svc/REST/CheckActivationCodeForRegistration';
const FORGOT_PASSWORD = const FORGOT_PASSWORD = 'Services/Authentication.svc/REST/CheckActivationCodeForSendFileNo';
'Services/Authentication.svc/REST/CheckActivationCodeForSendFileNo'; const CHECK_PATIENT_FOR_REGISTRATION = "Services/Authentication.svc/REST/CheckPatientForRegisteration";
const CHECK_PATIENT_FOR_REGISTRATION =
"Services/Authentication.svc/REST/CheckPatientForRegisteration";
const CHECK_USER_STATUS = "Services/NHIC.svc/REST/GetPatientInfo"; const CHECK_USER_STATUS = "Services/NHIC.svc/REST/GetPatientInfo";
const REGISTER_USER = 'Services/Authentication.svc/REST/PatientRegistration'; const REGISTER_USER = 'Services/Authentication.svc/REST/PatientRegistration';
const LOGGED_IN_USER_URL = const LOGGED_IN_USER_URL = 'Services/MobileNotifications.svc/REST/Insert_PatientMobileDeviceInfo';
'Services/MobileNotifications.svc/REST/Insert_PatientMobileDeviceInfo';
const FORGOT_PATIENT_ID = const FORGOT_PATIENT_ID = 'Services/Authentication.svc/REST/SendPatientIDSMSByMobileNumber';
'Services/Authentication.svc/REST/SendPatientIDSMSByMobileNumber';
const DASHBOARD = 'Services/Patients.svc/REST/PatientDashboard'; const DASHBOARD = 'Services/Patients.svc/REST/PatientDashboard';
const PROFILE_SETTING = 'Services/Patients.svc/REST/GetPateintInfoForUpdate'; const PROFILE_SETTING = 'Services/Patients.svc/REST/GetPateintInfoForUpdate';
const SAVE_SETTING = 'Services/Patients.svc/REST/UpdatePateintInfo'; const SAVE_SETTING = 'Services/Patients.svc/REST/UpdatePateintInfo';
const DEACTIVATE_ACCOUNT = const DEACTIVATE_ACCOUNT = 'Services/Patients.svc/REST/PatientAppleActivation_InsertUpdate';
'Services/Patients.svc/REST/PatientAppleActivation_InsertUpdate';
class AuthProvider with ChangeNotifier { class AuthProvider with ChangeNotifier {
bool isLogin = false; bool isLogin = false;
bool isLoading = true; bool isLoading = true;
dynamic authenticatedUser; dynamic authenticatedUser;
AuthenticatedUserObject authenticatedUserObject = AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
locator<AuthenticatedUserObject>();
var languageID; var languageID;
AuthProvider() { AuthProvider() {
@ -130,17 +117,14 @@ class AuthProvider with ChangeNotifier {
var lastLogin = lstLogin; //await sharedPref.getInt( var lastLogin = lstLogin; //await sharedPref.getInt(
// LAST_LOGIN); //this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN); //this.cs.sharedService.getSharedData(AuthenticationService.LAST_LOGIN, false); // LAST_LOGIN); //this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN); //this.cs.sharedService.getSharedData(AuthenticationService.LAST_LOGIN, false);
var request = var request = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE));
var newRequest = INSERTDeviceIMEIRequest(); var newRequest = INSERTDeviceIMEIRequest();
var imei = await sharedPref.getString(PUSH_TOKEN); var imei = await sharedPref.getString(PUSH_TOKEN);
// if (!request.) { // if (!request.) {
newRequest.iMEI = imei; //imei!=null ? imei : ''; newRequest.iMEI = imei; //imei!=null ? imei : '';
newRequest.firstName = newRequest.firstName = request.firstName ?? "" + " " + request.lastName! ?? "";
request.firstName ?? "" + " " + request.lastName! ?? ""; newRequest.firstNameN = request.firstNameN ?? "" + " " + request.lastNameN! ?? "";
newRequest.firstNameN =
request.firstNameN ?? "" + " " + request.lastNameN! ?? "";
newRequest.lastNameN = request.lastNameN ?? ""; newRequest.lastNameN = request.lastNameN ?? "";
newRequest.outSA = request.outSA == 1 ? true : false; newRequest.outSA = request.outSA == 1 ? true : false;
newRequest.biometricEnabled = false; newRequest.biometricEnabled = false;
@ -155,8 +139,7 @@ class AuthProvider with ChangeNotifier {
newRequest.tokenID = await sharedPref.getString(TOKEN); newRequest.tokenID = await sharedPref.getString(TOKEN);
// } // }
await new BaseAppClient().post(INSERT_DEVICE_IMEI, await new BaseAppClient().post(INSERT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
@ -168,8 +151,8 @@ class AuthProvider with ChangeNotifier {
} }
} }
Future<SelectDeviceIMEIRES?> selectDeviceImei(imei, Future<SelectDeviceIMEIRES?> selectDeviceImei(imei, {int languageID = 1}) async {
{int languageID = 1}) async { SelectDeviceIMEIRES? selectDeviceIMEIRES;
try { try {
// SelectDeviceIMEIRES? localRes; // SelectDeviceIMEIRES? localRes;
print(imei); print(imei);
@ -177,21 +160,15 @@ class AuthProvider with ChangeNotifier {
request['IMEI'] = imei; request['IMEI'] = imei;
request['LanguageID'] = languageID; request['LanguageID'] = languageID;
await BaseAppClient().post(SELECT_DEVICE_IMEI, await BaseAppClient().post(SELECT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) async {
onSuccess: (dynamic response, int statusCode) async {
// localRes = Map(); // localRes = Map();
print( print("Here response: ${response['Patient_SELECTDeviceIMEIbyIMEIList'][0]}");
"Here response: ${response['Patient_SELECTDeviceIMEIbyIMEIList'][0]}");
if (response['Patient_SELECTDeviceIMEIbyIMEIList'][0] != null) { if (response['Patient_SELECTDeviceIMEIbyIMEIList'][0] != null) {
selectDeviceIMEIRES = SelectDeviceIMEIRES.fromJson(response['Patient_SELECTDeviceIMEIbyIMEIList'][0]);
sharedPref.setObject( sharedPref.setObject(IMEI_USER_DATA, selectDeviceIMEIRES);
IMEI_USER_DATA,
SelectDeviceIMEIRES.fromJson(
response['Patient_SELECTDeviceIMEIbyIMEIList'][0]));
return SelectDeviceIMEIRES.fromJson(
response['Patient_SELECTDeviceIMEIbyIMEIList'][0]);
} else { } else {
print("ELSE TRIGERRED!!!!!!!!!"); print("ELSE TRIGERRED!!!!!!!!!");
selectDeviceIMEIRES = null;
} }
// await new BaseAppClient().post(SELECT_DEVICE_IMEI, // await new BaseAppClient().post(SELECT_DEVICE_IMEI,
// onSuccess: (dynamic response, int statusCode) { // onSuccess: (dynamic response, int statusCode) {
@ -207,21 +184,19 @@ class AuthProvider with ChangeNotifier {
print("in the error"); print("in the error");
// return Future.error(error); // return Future.error(error);
} }
return Future.value(selectDeviceIMEIRES);
} }
Future<dynamic> checkPatientAuthentication( Future<dynamic> checkPatientAuthentication(CheckPatientAuthenticationReq request) async {
CheckPatientAuthenticationReq request) async {
request.versionID = VERSION_ID; request.versionID = VERSION_ID;
request.channel = CHANNEL; request.channel = CHANNEL;
request.iPAdress = IP_ADDRESS; request.iPAdress = IP_ADDRESS;
request.generalid = GENERAL_ID; request.generalid = GENERAL_ID;
request.languageID = (languageID == 'ar' ? 1 : 2); request.languageID = (languageID == 'ar' ? 1 : 2);
request.patientOutSA = request.patientOutSA = (request.zipCode == '966' || request.zipCode == '+966') ? 0 : 1;
(request.zipCode == '966' || request.zipCode == '+966') ? 0 : 1;
try { try {
dynamic localRes; dynamic localRes;
await new BaseAppClient().post(CHECK_PATIENT_AUTH, await new BaseAppClient().post(CHECK_PATIENT_AUTH, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
@ -245,8 +220,7 @@ class AuthProvider with ChangeNotifier {
// request.patientTypeID = request.patientType; // request.patientTypeID = request.patientType;
// request.patientType = request.patientType; // request.patientType = request.patientType;
dynamic localRes; dynamic localRes;
await new BaseAppClient().post(GET_MOBILE_INFO, await new BaseAppClient().post(GET_MOBILE_INFO, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
@ -266,8 +240,7 @@ class AuthProvider with ChangeNotifier {
request.isDentalAllowedBackend = false; request.isDentalAllowedBackend = false;
dynamic localRes; dynamic localRes;
await new BaseAppClient().post(SEND_ACTIVATION_CODE, await new BaseAppClient().post(SEND_ACTIVATION_CODE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
authenticatedUser = CheckActivationCode.fromJson(localRes); authenticatedUser = CheckActivationCode.fromJson(localRes);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
@ -287,8 +260,7 @@ class AuthProvider with ChangeNotifier {
request.isDentalAllowedBackend = false; request.isDentalAllowedBackend = false;
dynamic localRes; dynamic localRes;
await new BaseAppClient().post(SEND_ACTIVATION_CODE_REGISTER, await new BaseAppClient().post(SEND_ACTIVATION_CODE_REGISTER, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
authenticatedUser = CheckActivationCode.fromJson(localRes); authenticatedUser = CheckActivationCode.fromJson(localRes);
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
@ -311,13 +283,11 @@ class AuthProvider with ChangeNotifier {
neRequest.projectOutSA = neRequest.zipCode == '966' ? false : true; neRequest.projectOutSA = neRequest.zipCode == '966' ? false : true;
neRequest.isDentalAllowedBackend = false; neRequest.isDentalAllowedBackend = false;
// neRequest.deviceToken = null; // neRequest.deviceToken = null;
neRequest.forRegisteration = neRequest.forRegisteration = neRequest.isRegister != null ? neRequest.isRegister : false;
neRequest.isRegister != null ? neRequest.isRegister : false;
neRequest.isRegister = false; neRequest.isRegister = false;
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(CHECK_ACTIVATION_CODE, await new BaseAppClient().post(CHECK_ACTIVATION_CODE, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; //CheckActivationCode.fromJson(); localRes = response; //CheckActivationCode.fromJson();
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -345,13 +315,11 @@ class AuthProvider with ChangeNotifier {
neRequest.projectOutSA = neRequest.zipCode == '966' ? false : true; neRequest.projectOutSA = neRequest.zipCode == '966' ? false : true;
neRequest.isDentalAllowedBackend = false; neRequest.isDentalAllowedBackend = false;
// neRequest.deviceToken = null; // neRequest.deviceToken = null;
neRequest.forRegisteration = neRequest.forRegisteration = neRequest.isRegister != null ? neRequest.isRegister : false;
neRequest.isRegister != null ? neRequest.isRegister : false;
neRequest.isRegister = false; neRequest.isRegister = false;
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(CHECK_ACTIVATION_CODE_REGISTER, await new BaseAppClient().post(CHECK_ACTIVATION_CODE_REGISTER, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; //CheckActivationCode.fromJson(); localRes = response; //CheckActivationCode.fromJson();
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -371,8 +339,7 @@ class AuthProvider with ChangeNotifier {
return authenticatedUser; return authenticatedUser;
} }
Future<dynamic> checkPatientForRegisteration( Future<dynamic> checkPatientForRegisteration(CheckPatientForRegistration request) async {
CheckPatientForRegistration request) async {
request.versionID = VERSION_ID; request.versionID = VERSION_ID;
request.channel = CHANNEL; request.channel = CHANNEL;
request.iPAdress = IP_ADDRESS; request.iPAdress = IP_ADDRESS;
@ -383,8 +350,7 @@ class AuthProvider with ChangeNotifier {
// request.tokenID = ''; // request.tokenID = '';
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(CHECK_PATIENT_FOR_REGISTRATION, await new BaseAppClient().post(CHECK_PATIENT_FOR_REGISTRATION, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -407,8 +373,7 @@ class AuthProvider with ChangeNotifier {
// request.tokenID = ''; // request.tokenID = '';
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(CHECK_USER_STATUS, await new BaseAppClient().post(CHECK_USER_STATUS, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -434,9 +399,7 @@ class AuthProvider with ChangeNotifier {
final DateFormat dateFormat = DateFormat('MM/dd/yyyy'); final DateFormat dateFormat = DateFormat('MM/dd/yyyy');
final DateFormat dateFormat2 = DateFormat('dd/MM/yyyy'); final DateFormat dateFormat2 = DateFormat('dd/MM/yyyy');
if (nhic != null) { if (nhic != null) {
requestN.dob = nhic['IsHijri'] requestN.dob = nhic['IsHijri'] ? nhic['DateOfBirth'] : dateFormat2.format(dateFormat.parse(nhic['DateOfBirth']));
? nhic['DateOfBirth']
: dateFormat2.format(dateFormat.parse(nhic['DateOfBirth']));
requestN.isHijri = nhic['IsHijri'] ? 1 : 0; requestN.isHijri = nhic['IsHijri'] ? 1 : 0;
requestN.healthId = requestN.patientobject!.eHealthIDField!; requestN.healthId = requestN.patientobject!.eHealthIDField!;
} }
@ -447,8 +410,7 @@ class AuthProvider with ChangeNotifier {
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(REGISTER_USER, await new BaseAppClient().post(REGISTER_USER, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -460,23 +422,17 @@ class AuthProvider with ChangeNotifier {
} }
} }
Future registeredAuthenticatedUser( Future registeredAuthenticatedUser(AuthenticatedUser user, deviceToken, lat, long) async {
AuthenticatedUser user, deviceToken, lat, long) async {
var request = new RegisteredAuthenticatedUserRequest(); var request = new RegisteredAuthenticatedUserRequest();
request.deviceToken = deviceToken; request.deviceToken = deviceToken;
request.voipToken = request.voipToken = ""; //this.cs.sharedService.getSharedData(AuthenticationService.APNS_TOKEN, false);
""; //this.cs.sharedService.getSharedData(AuthenticationService.APNS_TOKEN, false);
request.deviceType = Platform.isIOS ? "1" : "2"; request.deviceType = Platform.isIOS ? "1" : "2";
request.patientMobileNumber = user.mobileNumber![0] == '0' request.patientMobileNumber = user.mobileNumber![0] == '0' ? user.mobileNumber : '0' + user.mobileNumber!;
? user.mobileNumber
: '0' + user.mobileNumber!;
request.nationalID = user.patientIdentificationNo; request.nationalID = user.patientIdentificationNo;
request.gender = user.gender; request.gender = user.gender;
request.patientID = user.patientID; request.patientID = user.patientID;
request.patientOutSA = user.outSA; request.patientOutSA = user.outSA;
request.loginType = await sharedPref.getInt(LAST_LOGIN) != null request.loginType = await sharedPref.getInt(LAST_LOGIN) != null ? await sharedPref.getInt(LAST_LOGIN) : 1;
? await sharedPref.getInt(LAST_LOGIN)
: 1;
request.mACAddress = '00:00:00:00:00:00'; request.mACAddress = '00:00:00:00:00:00';
request.latitude = lat; request.latitude = lat;
request.longitude = long; request.longitude = long;
@ -485,8 +441,7 @@ class AuthProvider with ChangeNotifier {
request.patientType = user.patientType; request.patientType = user.patientType;
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(LOGGED_IN_USER_URL, await new BaseAppClient().post(LOGGED_IN_USER_URL, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -512,8 +467,7 @@ class AuthProvider with ChangeNotifier {
dynamic localRes; dynamic localRes;
await new BaseAppClient().post(FORGOT_PATIENT_ID, await new BaseAppClient().post(FORGOT_PATIENT_ID, onSuccess: (response, statusCode) async {
onSuccess: (response, statusCode) async {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
throw error; throw error;
@ -531,8 +485,7 @@ class AuthProvider with ChangeNotifier {
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(FORGOT_PASSWORD, await new BaseAppClient().post(FORGOT_PASSWORD, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; //CheckActivationCode.fromJson(); localRes = response; //CheckActivationCode.fromJson();
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -551,8 +504,7 @@ class AuthProvider with ChangeNotifier {
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(DASHBOARD, await new BaseAppClient().post(DASHBOARD, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; //CheckActivationCode.fromJson(); localRes = response; //CheckActivationCode.fromJson();
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -569,8 +521,7 @@ class AuthProvider with ChangeNotifier {
getSettings() async { getSettings() async {
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(PROFILE_SETTING, await new BaseAppClient().post(PROFILE_SETTING, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -585,8 +536,7 @@ class AuthProvider with ChangeNotifier {
Future saveSettings(request) async { Future saveSettings(request) async {
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(SAVE_SETTING, await new BaseAppClient().post(SAVE_SETTING, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -601,8 +551,7 @@ class AuthProvider with ChangeNotifier {
Future deactivateAccount(request, bool isLogin) async { Future deactivateAccount(request, bool isLogin) async {
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(DEACTIVATE_ACCOUNT, await new BaseAppClient().post(DEACTIVATE_ACCOUNT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -618,8 +567,7 @@ class AuthProvider with ChangeNotifier {
Future activateAccount(request) async { Future activateAccount(request) async {
dynamic localRes; dynamic localRes;
try { try {
await new BaseAppClient().post(DEACTIVATE_ACCOUNT, await new BaseAppClient().post(DEACTIVATE_ACCOUNT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
localRes = error; localRes = error;
@ -636,10 +584,8 @@ class AuthProvider with ChangeNotifier {
await sharedPref.remove(LOGIN_TOKEN_ID); await sharedPref.remove(LOGIN_TOKEN_ID);
await sharedPref.remove(PHARMACY_CUSTOMER_ID); await sharedPref.remove(PHARMACY_CUSTOMER_ID);
await authenticatedUserObject.getUser(); await authenticatedUserObject.getUser();
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin = Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin = false;
false; var model = Provider.of<ToDoCountProviderModel>(AppGlobal.context, listen: false);
var model =
Provider.of<ToDoCountProviderModel>(AppGlobal.context, listen: false);
model.setState(0, 0, false, null); model.setState(0, 0, false, null);
Navigator.of(AppGlobal.context).pushReplacementNamed(HOME); Navigator.of(AppGlobal.context).pushReplacementNamed(HOME);
} }

@ -214,7 +214,8 @@ class LiveCareService extends BaseService {
String? deviceToken; String? deviceToken;
String voipToken = Platform.isIOS ? (await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN)): ""; // String voipToken = Platform.isIOS ? (await AppSharedPreferences().getString(ONESIGNAL_APNS_TOKEN)) : "";
String voipToken = Platform.isIOS ? (await AppSharedPreferences().getString(APNS_TOKEN)) : "";
getDeviceToken().then((value) { getDeviceToken().then((value) {
print(value); print(value);
deviceToken = value; deviceToken = value;

@ -21,8 +21,8 @@ import 'package:firebase_messaging/firebase_messaging.dart' as fir;
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_ios_voip_kit/call_state_type.dart'; // import 'package:flutter_ios_voip_kit/call_state_type.dart';
import 'package:flutter_ios_voip_kit/flutter_ios_voip_kit.dart'; // import 'package:flutter_ios_voip_kit/flutter_ios_voip_kit.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:get_it/get_it.dart'; import 'package:get_it/get_it.dart';
import 'package:huawei_hmsavailability/huawei_hmsavailability.dart'; import 'package:huawei_hmsavailability/huawei_hmsavailability.dart';
@ -180,7 +180,7 @@ class PushNotificationHandler {
late HmsApiAvailability hmsApiAvailability; late HmsApiAvailability hmsApiAvailability;
final voIPKit = FlutterIOSVoIPKit.instance; // final voIPKit = FlutterIOSVoIPKit.instance;
late Timer timeOutTimer; late Timer timeOutTimer;
bool isTalking = false; bool isTalking = false;
@ -211,73 +211,73 @@ class PushNotificationHandler {
static PushNotificationHandler getInstance() => _instance; static PushNotificationHandler getInstance() => _instance;
void _timeOut({ // void _timeOut({
int seconds = 30, // int seconds = 30,
}) async { // }) async {
timeOutTimer = Timer(Duration(seconds: seconds), () async { // timeOutTimer = Timer(Duration(seconds: seconds), () async {
print('🎈 example: timeOut'); // print('🎈 example: timeOut');
final incomingCallerName = await voIPKit.getIncomingCallerName(); // final incomingCallerName = await voIPKit.getIncomingCallerName();
voIPKit.unansweredIncomingCall( // voIPKit.unansweredIncomingCall(
skipLocalNotification: false, // skipLocalNotification: false,
missedCallTitle: '📞 Missed call', // missedCallTitle: '📞 Missed call',
missedCallBody: 'There was a call from $incomingCallerName', // missedCallBody: 'There was a call from $incomingCallerName',
); // );
}); // });
} // }
init(BuildContext context) async { init(BuildContext context) async {
this.context = context; this.context = context;
if (Platform.isIOS) { if (Platform.isIOS) {
voIPKit.getVoIPToken().then((value) { // voIPKit.getVoIPToken().then((value) {
print("APNS VOIP KIT TOKEN: $value"); // print("APNS VOIP KIT TOKEN: $value");
AppSharedPreferences().setString(APNS_TOKEN, value!); // AppSharedPreferences().setString(APNS_TOKEN, value!);
}); // });
//
voIPKit.onDidUpdatePushToken = (String token) { // voIPKit.onDidUpdatePushToken = (String token) {
print('🎈 example: onDidUpdatePushToken: $token'); // print('🎈 example: onDidUpdatePushToken: $token');
}; // };
//
voIPKit.onDidReceiveIncomingPush = ( // voIPKit.onDidReceiveIncomingPush = (
Map<String, dynamic> payload, // Map<String, dynamic> payload,
) async { // ) async {
print('🎈 example: onDidReceiveIncomingPush $payload'); // print('🎈 example: onDidReceiveIncomingPush $payload');
_timeOut(); // _timeOut();
}; // };
//
voIPKit.onDidRejectIncomingCall = ( // voIPKit.onDidRejectIncomingCall = (
String uuid, // String uuid,
String callerId, // String callerId,
) async { // ) async {
try { // try {
print('🎈 example: onDidRejectIncomingCall $uuid - $callerId'); // print('🎈 example: onDidRejectIncomingCall $uuid - $callerId');
timeOutTimer.cancel(); // timeOutTimer.cancel();
} catch (err) {} // } catch (err) {}
}; // };
//
voIPKit.onDidAcceptIncomingCall = ( // voIPKit.onDidAcceptIncomingCall = (
String uuid, // String uuid,
String callerId, // String callerId,
) async { // ) async {
print('🎈 example: onDidAcceptIncomingCall $uuid - $callerId'); // print('🎈 example: onDidAcceptIncomingCall $uuid - $callerId');
await voIPKit.acceptIncomingCall(callerState: CallStateType.calling); // await voIPKit.acceptIncomingCall(callerState: CallStateType.calling);
await voIPKit.callConnected(); // await voIPKit.callConnected();
await Future.delayed(Duration(seconds: 1)); // await Future.delayed(Duration(seconds: 1));
//
Navigator.pushNamed( // Navigator.pushNamed(
locator<NavigationService>().navigatorKey.currentContext!, // locator<NavigationService>().navigatorKey.currentContext!,
"zoom_call_page", // "zoom_call_page",
arguments: CallArguments("hoover-dam", "123", "Patient", "40", "1", false), // arguments: CallArguments("hoover-dam", "123", "Patient", "40", "1", false),
); // );
//
await voIPKit.endCall(); // await voIPKit.endCall();
//
// Navigator.pushNamed(navigatorKey.currentContext!, VIDEO_CALL_SCREEN, // // Navigator.pushNamed(navigatorKey.currentContext!, VIDEO_CALL_SCREEN,
// arguments: VideoArgus( // // arguments: VideoArgus(
// reservationId: int.parse(callerId), token: null, isVideo: true)); // // reservationId: int.parse(callerId), token: null, isVideo: true));
//
timeOutTimer.cancel(); // timeOutTimer.cancel();
}; // };
} }
if (Platform.isAndroid) { if (Platform.isAndroid) {

@ -38,9 +38,9 @@ class MyInAppBrowser extends InAppBrowser {
static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE
// static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT // static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS // static String SERVICE_URL = 'https://uat.hmgwebservices.com/payfortforvidaplus/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL UAT VIDA PLUS

@ -3,7 +3,7 @@ import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:shimmer/shimmer.dart'; // import 'package:shimmer/shimmer.dart';
class ShimmerLoadingWidget extends StatefulWidget { class ShimmerLoadingWidget extends StatefulWidget {
Future<void> Function()? onPreProccess; Future<void> Function()? onPreProccess;
@ -46,7 +46,7 @@ class _ShimmerLoadingWidgetState extends State<ShimmerLoadingWidget> {
case ConnectionState.active: case ConnectionState.active:
break; break;
case ConnectionState.waiting: case ConnectionState.waiting:
widget = Shimmer.fromColors(child: super.widget.loadingWidget!(), baseColor: Colors.red, highlightColor: Colors.yellow); // widget = Shimmer.fromColors(child: super.widget.loadingWidget!(), baseColor: Colors.red, highlightColor: Colors.yellow);
break; break;
case ConnectionState.done: case ConnectionState.done:
widget = super.widget.realWidget!(); widget = super.widget.realWidget!();

@ -1,5 +1,5 @@
import 'package:carousel_slider/carousel_slider.dart'; // import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersCategoriesRequestModel.dart';
import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersProductsRequestModel.dart'; import 'package:diplomaticquarterapp/core/model/packages_offers/requests/OffersProductsRequestModel.dart';
import 'package:diplomaticquarterapp/core/service/packages_offers/PackagesOffersServices.dart'; import 'package:diplomaticquarterapp/core/service/packages_offers/PackagesOffersServices.dart';
@ -32,20 +32,20 @@ class _OffersAndPackagesWidgetState extends State<OffersAndPackagesWidget> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// TODO: implement build // TODO: implement build
var option = CarouselOptions( // var option = CarouselOptions(
height: HEIGHT, // height: HEIGHT,
aspectRatio: 16 / 9, // aspectRatio: 16 / 9,
viewportFraction: 1, // viewportFraction: 1,
initialPage: 0, // initialPage: 0,
enableInfiniteScroll: true, // enableInfiniteScroll: true,
reverse: false, // reverse: false,
autoPlay: true, // autoPlay: true,
autoPlayInterval: Duration(seconds: AUTO_SLIDE_INTERVAL), // autoPlayInterval: Duration(seconds: AUTO_SLIDE_INTERVAL),
autoPlayAnimationDuration: Duration(milliseconds: ANIMATION_DURATION), // autoPlayAnimationDuration: Duration(milliseconds: ANIMATION_DURATION),
autoPlayCurve: Curves.fastOutSlowIn, // autoPlayCurve: Curves.fastOutSlowIn,
enlargeCenterPage: true, // enlargeCenterPage: true,
scrollDirection: Axis.horizontal, // scrollDirection: Axis.horizontal,
); // );
// return Container( // return Container(
// height: HEIGHT, // height: HEIGHT,
@ -102,13 +102,13 @@ class _OffersAndPackagesWidgetState extends State<OffersAndPackagesWidget> {
realWidget: () { realWidget: () {
if (widget.models.isNotEmpty) { if (widget.models.isNotEmpty) {
return Container( return Container(
child: CarouselSlider.builder( // child: CarouselSlider.builder(
itemCount: widget.models.length, // itemCount: widget.models.length,
itemBuilder: (BuildContext context, int itemIndex,int realIndex) { // itemBuilder: (BuildContext context, int itemIndex,int realIndex) {
var item = widget.models[itemIndex]; // var item = widget.models[itemIndex];
return OfferPackagesItemWidget(model: item); // return OfferPackagesItemWidget(model: item);
}, // },
options: option), // options: option),
); );
} else { } else {
return Container(); return Container();

Binary file not shown.

@ -1,7 +1,7 @@
name: diplomaticquarterapp name: diplomaticquarterapp
description: A new Flutter application. description: A new Flutter application.
version: 4.5.73+1 version: 4.5.054+4050054
environment: environment:
sdk: ">=3.0.0 <3.13.0" sdk: ">=3.0.0 <3.13.0"
@ -51,7 +51,7 @@ dependencies:
pull_to_refresh: ^2.0.0 pull_to_refresh: ^2.0.0
# Native # Native
local_auth: ^2.2.0 local_auth: ^2.1.7
localstorage: ^4.0.0+1 localstorage: ^4.0.0+1
maps_launcher: ^2.0.1 maps_launcher: ^2.0.1
url_launcher: ^6.0.15 url_launcher: ^6.0.15
@ -143,18 +143,18 @@ dependencies:
#geofencing: any #geofencing: any
speech_to_text: ^6.1.1 speech_to_text: ^6.1.1
#in_app_update: ^4.2.2 in_app_update: ^4.2.2
in_app_review: ^2.0.3 in_app_review: ^2.0.3
badges: ^3.1.2 badges: ^3.1.2
flutter_app_icon_badge: ^2.0.0 flutter_app_icon_badge: ^2.0.0
dropdown_search: 5.0.6 # dropdown_search: 5.0.6
youtube_player_flutter: ^8.1.2 youtube_player_flutter: ^8.1.2
shimmer: ^3.0.0 # shimmer: ^3.0.0
carousel_slider: ^4.0.0 carousel_slider: ^4.0.0
flutter_staggered_grid_view: ^0.7.0 # flutter_staggered_grid_view: ^0.7.0
huawei_hmsavailability: ^6.11.0+301 huawei_hmsavailability: ^6.11.0+301
huawei_location: ^6.11.0+301 huawei_location: ^6.11.0+301
share_plus: ^6.3.4 share_plus: ^6.3.4
@ -163,7 +163,7 @@ dependencies:
equatable: ^2.0.3 equatable: ^2.0.3
wave: ^0.2.0 wave: ^0.2.0
sms_otp_auto_verify: ^2.1.0 sms_otp_auto_verify: ^2.1.0
flutter_ios_voip_kit: ^0.1.0 # flutter_ios_voip_kit: ^0.1.0
google_api_availability: ^5.0.0 google_api_availability: ^5.0.0
open_filex: ^4.3.2 open_filex: ^4.3.2
path_provider: ^2.0.8 path_provider: ^2.0.8

Loading…
Cancel
Save