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;
@ -176,189 +177,206 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
title: TranslationBase.of(context).appointments, title: TranslationBase.of(context).appointments,
bodyWidget: appoList.length != 0 bodyWidget: appoList.length != 0
? ListView.builder( ? ListView.builder(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
physics: ScrollPhysics(), physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0), padding: EdgeInsets.all(0.0),
itemCount: appoList.length, itemCount: appoList.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Container( return Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0), margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0),
decoration: cardRadius(12), decoration: cardRadius(12),
padding: EdgeInsets.all(16), padding: EdgeInsets.all(16),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
flex: 2,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( Expanded(
padding: const EdgeInsets.only(top: 4.0), flex: 2,
child: appoList[index].clinicID == 265 child: Row(
? Container( crossAxisAlignment: CrossAxisAlignment.start,
margin: EdgeInsets.only(left: 5.0, right: 5.0), children: [
child: SvgPicture.asset("assets/images/new/CoronaIcon.svg", width: 35.0, height: 35.0), Padding(
) padding: const EdgeInsets.only(top: 4.0),
: appoList[index].isLiveCareAppointment! child: appoList[index].clinicID == 265
? SvgPicture.asset("assets/images/new/virtual.svg") ? Container(
: SvgPicture.asset("assets/images/new/hospital-visit.svg"), margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: SvgPicture.asset("assets/images/new/CoronaIcon.svg", width: 35.0, height: 35.0),
)
: appoList[index].isLiveCareAppointment!
? SvgPicture.asset("assets/images/new/virtual.svg")
: SvgPicture.asset("assets/images/new/hospital-visit.svg"),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Text(
appoList[index].clinicID == 265
? TranslationBase.of(context).covidTestTodo
: appoList[index].isLiveCareAppointment!
? TranslationBase.of(context).liveCareAppo
: TranslationBase.of(context).walkinAppo,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48)),
),
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: CountdownTimer(
controller:
new CountdownTimerController(endTime: DateTime.now().millisecondsSinceEpoch + (appoList[index].remaniningHoursTocanPay! * 1000) * 60),
widgetBuilder: (_, CurrentRemainingTime? time) {
return time != null
? Text(
'${time.days != null ? time.days : "0"}:${time.hours != null ? time.hours.toString().length == 1 ? "0" + time.hours.toString() : time.hours : "00"}:${time.min}:${time.sec} \n' +
TranslationBase.of(context).upcomingTimeLeft,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: CustomColors.accentColor, letterSpacing: -0.48))
: Container();
},
),
),
],
),
],
),
), ),
Column( Expanded(
crossAxisAlignment: CrossAxisAlignment.start, child: Container(
children: [ child: InkWell(
Padding( onTap: () {
padding: const EdgeInsets.only(left: 8.0, right: 8.0), performNextAction(appoList[index]);
child: Text( },
appoList[index].clinicID == 265 child: Container(
? TranslationBase.of(context).covidTestTodo padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),
: appoList[index].isLiveCareAppointment! decoration: BoxDecoration(
? TranslationBase.of(context).liveCareAppo color: getNextActionButtonColor(appoList[index].nextAction),
: TranslationBase.of(context).walkinAppo, border: Border.all(color: Colors.white, width: 1),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48)), borderRadius: BorderRadius.circular(6),
), ),
Padding( child: Text(
padding: const EdgeInsets.only(left: 8.0, right: 8.0), getNextActionText(appoList[index].nextAction),
child: CountdownTimer( textAlign: TextAlign.center,
controller: style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4),
new CountdownTimerController(endTime: DateTime.now().millisecondsSinceEpoch + (appoList[index].remaniningHoursTocanPay! * 1000) * 60), ),
widgetBuilder: (_, CurrentRemainingTime? time) {
return time != null
? Text(
'${time.days != null ? time.days : "0"}:${time.hours != null ? time.hours.toString().length == 1 ? "0" + time.hours.toString() : time.hours : "00"}:${time.min}:${time.sec} \n' +
TranslationBase.of(context).upcomingTimeLeft,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: CustomColors.accentColor, letterSpacing: -0.48))
: Container();
},
), ),
), ),
], ),
), ),
], ],
), ),
), Padding(
Expanded( padding: const EdgeInsets.only(top: 8.0),
child: Container( child: Text(
child: InkWell( appoList[index].doctorTitle! + " " + appoList[index].doctorNameObj!,
onTap: () { style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
performNextAction(appoList[index]);
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),
decoration: BoxDecoration(
color: getNextActionButtonColor(appoList[index].nextAction),
border: Border.all(color: Colors.white, width: 1),
borderRadius: BorderRadius.circular(6),
),
child: Text(
getNextActionText(appoList[index].nextAction),
textAlign: TextAlign.center,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4),
),
),
), ),
), ),
), Row(
],
),
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Text(
appoList[index].doctorTitle! + " " + appoList[index].doctorNameObj!,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
),
Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
LargeAvatar(
name: appoList[index].doctorTitle! + " " + appoList[index].doctorNameObj!,
url: appoList[index].doctorImageURL,
width: 52,
height: 52,
),
SizedBox(width: 11),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
MyRichText(TranslationBase.of(context).clinic + ": ", appoList[index].clinicName!, projectViewModel.isArabic), LargeAvatar(
// MyRichText(TranslationBase.of(context).appointmentDate + ": ", name: appoList[index].doctorTitle! + " " + appoList[index].doctorNameObj!,
// DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) + " " + appoList[index].startTime.substring(0, 5), projectViewModel.isArabic), url: appoList[index].doctorImageURL,
width: 52,
// Timezone changes height: 52,
appoList[index].isLiveCareAppointment! ),
? MyRichText( SizedBox(width: 11),
TranslationBase.of(context).appointmentDate + ": ", Expanded(
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) + child: Column(
" " + crossAxisAlignment: CrossAxisAlignment.start,
DateUtil.convertStringToDate(appoList[index].appointmentDate).toString().split(" ")[1].substring(0, 5), mainAxisSize: MainAxisSize.min,
projectViewModel.isArabic) children: <Widget>[
: MyRichText( MyRichText(TranslationBase.of(context).clinic + ": ", appoList[index].clinicName!, projectViewModel.isArabic),
TranslationBase.of(context).appointmentDate + ": ", // MyRichText(TranslationBase.of(context).appointmentDate + ": ",
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) + // DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) + " " + appoList[index].startTime.substring(0, 5), projectViewModel.isArabic),
" " +
appoList[index].startTime!.substring(0, 5), // Timezone changes
projectViewModel.isArabic), appoList[index].isLiveCareAppointment!
? MyRichText(
MyRichText(TranslationBase.of(context).branch, appoList[index].projectName!, projectViewModel.isArabic), TranslationBase.of(context).appointmentDate + ": ",
Row( DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) +
mainAxisAlignment: MainAxisAlignment.spaceBetween, " " +
mainAxisSize: MainAxisSize.max, DateUtil.convertStringToDate(appoList[index].appointmentDate).toString().split(" ")[1].substring(0, 5),
children: <Widget>[ projectViewModel.isArabic)
RatingBar( : MyRichText(
initialRating: appoList[index].actualDoctorRate.toDouble(), TranslationBase.of(context).appointmentDate + ": ",
itemSize: 16.0, DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) +
glowColor: Color(0XFFD02127), " " +
unratedColor: Color(0XFFD02127), appoList[index].startTime!.substring(0, 5),
allowHalfRating: true, ratingWidget: RatingWidget(full:Icon(Icons.star), half: Icon(Icons.star_half), empty: Icon( Icons.star_border)), onRatingUpdate: (double value) { }, projectViewModel.isArabic),
// : Icons.star_half,
// ic: Icons.star, MyRichText(TranslationBase.of(context).branch, appoList[index].projectName!, projectViewModel.isArabic),
// emptyIcon: Icons.star_border, itemBuilder: (BuildContext context, int index) { }, Row(
), mainAxisAlignment: MainAxisAlignment.spaceBetween,
], mainAxisSize: MainAxisSize.max,
children: <Widget>[
RatingBar(
initialRating: appoList[index].actualDoctorRate.toDouble(),
itemSize: 16.0,
glowColor: Color(0XFFD02127),
unratedColor: Color(0XFFD02127),
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,
// ic: Icons.star,
// emptyIcon: Icons.star_border, itemBuilder: (BuildContext context, int index) { },
),
],
),
],
),
), ),
], ],
), ),
), Padding(
], padding: const EdgeInsets.only(top: 12.0),
), child: Text(
Padding( getNextActionDescription(appoList[index].nextAction),
padding: const EdgeInsets.only(top: 12.0), style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 25 / 16),
child: Text( ),
getNextActionDescription(appoList[index].nextAction), ),
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 25 / 16), InkWell(
), onTap: () {
), navigateToAppointmentDetails(context, appoList[index]);
InkWell( },
onTap: () { child: Padding(
navigateToAppointmentDetails(context, appoList[index]); padding: const EdgeInsets.only(top: 0.0),
}, child: Text(
child: Padding( TranslationBase.of(context).moreDetails,
padding: const EdgeInsets.only(top: 0.0), style: TextStyle(
child: Text( fontSize: 10,
TranslationBase.of(context).moreDetails, fontWeight: FontWeight.w600,
style: TextStyle( color: CustomColors.accentColor,
fontSize: 10, letterSpacing: -0.48,
fontWeight: FontWeight.w600, height: 25 / 16,
color: CustomColors.accentColor, decoration: TextDecoration.underline),
letterSpacing: -0.48, ),
height: 25 / 16, ),
decoration: TextDecoration.underline), ),
), ],
), ),
), );
], },
), )
);
},
)
: getNoDataWidget(context), : getNoDataWidget(context),
), ),
), ),
@ -371,28 +389,28 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
title: TranslationBase.of(context).anicllaryOrders, title: TranslationBase.of(context).anicllaryOrders,
bodyWidget: ancillaryLists.length != 0 bodyWidget: ancillaryLists.length != 0
? Container( ? Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
child: ListView.separated( child: ListView.separated(
shrinkWrap: true, shrinkWrap: true,
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
reverse: true, reverse: true,
itemBuilder: (context, index) { itemBuilder: (context, index) {
return DoctorCard( return DoctorCard(
onTap: () => ancillaryOrdersDetails(ancillaryLists[0].ancillaryOrderList![index], ancillaryLists[0].projectID), onTap: () => ancillaryOrdersDetails(ancillaryLists[0].ancillaryOrderList![index], ancillaryLists[0].projectID),
isInOutPatient: true, isInOutPatient: true,
name: TranslationBase.of(context).dr.toString() + " " + (ancillaryLists[0].ancillaryOrderList![index].doctorName ?? ""), name: TranslationBase.of(context).dr.toString() + " " + (ancillaryLists[0].ancillaryOrderList![index].doctorName ?? ""),
billNo: ancillaryLists[0].ancillaryOrderList![index].orderNo.toString(), billNo: ancillaryLists[0].ancillaryOrderList![index].orderNo.toString(),
profileUrl: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", profileUrl: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png",
subName: ancillaryLists[0].projectName, subName: ancillaryLists[0].projectName,
isLiveCareAppointment: false, isLiveCareAppointment: false,
date: DateUtil.convertStringToDate(ancillaryLists[0].ancillaryOrderList![index].orderDate), date: DateUtil.convertStringToDate(ancillaryLists[0].ancillaryOrderList![index].orderDate),
isSortByClinic: true, isSortByClinic: true,
); );
}, },
itemCount: ancillaryLists[0].ancillaryOrderList!.length, itemCount: ancillaryLists[0].ancillaryOrderList!.length,
separatorBuilder: (context, index) => SizedBox(height: 14), separatorBuilder: (context, index) => SizedBox(height: 14),
), ),
) )
: getNoDataWidget(context), : getNoDataWidget(context),
)), )),
], ],
@ -401,104 +419,104 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
Container( Container(
child: obGyneAppoList.length != 0 child: obGyneAppoList.length != 0
? ListView.builder( ? ListView.builder(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
physics: ScrollPhysics(), physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0), padding: EdgeInsets.all(0.0),
itemCount: obGyneAppoList.length, itemCount: obGyneAppoList.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
return Container( return Container(
width: double.infinity, width: double.infinity,
margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0), margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0),
decoration: cardRadius(12), decoration: cardRadius(12),
padding: EdgeInsets.all(16), padding: EdgeInsets.all(16),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.only(top: 0.0), padding: const EdgeInsets.only(top: 0.0),
child: Container( child: Container(
margin: EdgeInsets.only(left: 5.0, right: 5.0), margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: SvgPicture.asset("assets/images/new/ultrasound.svg", width: 20.0, height: 20.0), child: SvgPicture.asset("assets/images/new/ultrasound.svg", width: 20.0, height: 20.0),
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Text(TranslationBase.of(context).walkinAppo,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48)),
),
],
),
],
), ),
), Container(
Column( child: InkWell(
crossAxisAlignment: CrossAxisAlignment.start, onTap: () {
children: [ getOBGyneDoctorsList(obGyneAppoList[index].projectID!, obGyneAppoList[index].setupID!, obGyneAppoList[index]);
Padding( },
padding: const EdgeInsets.only(left: 8.0, right: 8.0), child: Container(
child: Text(TranslationBase.of(context).walkinAppo, padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48)), decoration: BoxDecoration(
color: CustomColors.green,
border: Border.all(color: Colors.white, width: 1),
borderRadius: BorderRadius.circular(6),
),
child: Text(
TranslationBase.of(context).bookNow,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4),
),
),
), ),
],
),
],
),
Container(
child: InkWell(
onTap: () {
getOBGyneDoctorsList(obGyneAppoList[index].projectID!, obGyneAppoList[index].setupID!, obGyneAppoList[index]);
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),
decoration: BoxDecoration(
color: CustomColors.green,
border: Border.all(color: Colors.white, width: 1),
borderRadius: BorderRadius.circular(6),
),
child: Text(
TranslationBase.of(context).bookNow,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4),
), ),
],
),
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Text(
TranslationBase.of(context).dr + " " + obGyneAppoList[index].doctorName!,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
), ),
), ),
), Row(
],
),
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Text(
TranslationBase.of(context).dr + " " + obGyneAppoList[index].doctorName!,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
),
Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
LargeAvatar(
name: TranslationBase.of(context).dr + " " + obGyneAppoList[index].doctorName!,
url: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png",
width: 52,
height: 52,
),
SizedBox(width: 11),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: <Widget>[ children: <Widget>[
MyRichText(TranslationBase.of(context).clinic + ": ", obGyneAppoList[index].clinicDescription!, projectViewModel.isArabic), LargeAvatar(
MyRichText( name: TranslationBase.of(context).dr + " " + obGyneAppoList[index].doctorName!,
TranslationBase.of(context).orderDate + ": ", url: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png",
DateUtil.getDayMonthYearHourMinuteDateFormatted(DateUtil.convertStringToDate(obGyneAppoList[index].orderDate)).split(" ")[0], width: 52,
projectViewModel.isArabic), height: 52,
MyRichText(TranslationBase.of(context).branch, obGyneAppoList[index].projectDescription!, projectViewModel.isArabic), ),
SizedBox(width: 11),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
MyRichText(TranslationBase.of(context).clinic + ": ", obGyneAppoList[index].clinicDescription!, projectViewModel.isArabic),
MyRichText(
TranslationBase.of(context).orderDate + ": ",
DateUtil.getDayMonthYearHourMinuteDateFormatted(DateUtil.convertStringToDate(obGyneAppoList[index].orderDate)).split(" ")[0],
projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).branch, obGyneAppoList[index].projectDescription!, projectViewModel.isArabic),
],
),
),
], ],
), ),
), ],
], ),
), );
], },
), )
);
},
)
: getNoDataWidget(context), : getNoDataWidget(context),
), ),
], ],
@ -552,7 +570,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
performNextAction(AppoitmentAllHistoryResultList appo) { performNextAction(AppoitmentAllHistoryResultList appo) {
switch (appo.nextAction) { switch (appo.nextAction) {
case 0: case 0:
// getAppoQR(context, appo); // getAppoQR(context, appo);
break; break;
case 10: case 10:
confirmAppointment(appo); confirmAppointment(appo);
@ -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);
@ -1328,13 +1350,13 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
Future navigateToPaymentMethod(context, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async { Future navigateToPaymentMethod(context, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async {
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(
page: PaymentMethod( page: PaymentMethod(
onSelectedMethod: (String metohd, [String? selectedInstallmentPlan]) { onSelectedMethod: (String metohd, [String? selectedInstallmentPlan]) {
setState(() {}); setState(() {});
}, },
patientShare: widget.patientShareResponse!.patientShareWithTax))) patientShare: widget.patientShareResponse!.patientShareWithTax)))
.then((value) { .then((value) {
print(value); print(value);
selectedPaymentMethod = value[0] ?? ""; selectedPaymentMethod = value[0] ?? "";
@ -1414,26 +1436,26 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
service.applePayInsertRequest(applePayInsertRequest, context).then((res) async { service.applePayInsertRequest(applePayInsertRequest, context).then((res) async {
if (res["MessageStatus"] == 1) { if (res["MessageStatus"] == 1) {
await context.read<PayfortViewModel>().initiateApplePayWithPayfort( await context.read<PayfortViewModel>().initiateApplePayWithPayfort(
customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!,
// customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress,
customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com", customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com",
orderDescription: "Appointment Payment", orderDescription: "Appointment Payment",
orderAmount: double.parse(patientShareResponse.patientShareWithTax.toString()), orderAmount: double.parse(patientShareResponse.patientShareWithTax.toString()),
merchantReference: transID, merchantReference: transID,
payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, payfortProjectDetailsRespModel: payfortProjectDetailsRespModel,
currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR",
onFailed: (failureResult) async { onFailed: (failureResult) async {
log("failureResult: ${failureResult.toString()}"); log("failureResult: ${failureResult.toString()}");
AppToast.showErrorToast(message: failureResult.toString()); AppToast.showErrorToast(message: failureResult.toString());
}, },
onSuccess: (successResult) async { onSuccess: (successResult) async {
log("Payfort: ${successResult.responseMessage}"); log("Payfort: ${successResult.responseMessage}");
await context.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult); await context.read<PayfortViewModel>().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult);
checkPaymentStatus(appo); checkPaymentStatus(appo);
}, },
projectId: appo.projectID, projectId: appo.projectID,
serviceTypeEnum: ServiceTypeEnum.appointmentPayment, serviceTypeEnum: ServiceTypeEnum.appointmentPayment,
); );
} else { } else {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: "An error occurred while processing your request"); AppToast.showErrorToast(message: "An error occurred while processing your request");
@ -1472,7 +1494,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
service service
.insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, appo.serviceID, appo.doctorID, appo.appointmentDate!, .insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, appo.serviceID, appo.doctorID, appo.appointmentDate!,
Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), projectViewModel.isArabic ? 1 : 2, context) Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), projectViewModel.isArabic ? 1 : 2, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {

@ -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 {
@ -57,10 +58,10 @@ class _AppUpdatePageState extends State<AppUpdatePage> {
minWidth: MediaQuery.of(context).size.width, minWidth: MediaQuery.of(context).size.width,
height: 45.0, height: 45.0,
child: CustomTextButton( child: CustomTextButton(
backgroundColor: Colors.red[800]!, backgroundColor: Colors.red[800]!,
disabledForegroundColor: Color(0xFFbcc2c4).withOpacity(0.38), disabledForegroundColor: Color(0xFFbcc2c4).withOpacity(0.38),
disabledBackgroundColor: Color(0xFFbcc2c4).withOpacity(0.12), disabledBackgroundColor: Color(0xFFbcc2c4).withOpacity(0.12),
elevation: 0, elevation: 0,
onPressed: () { onPressed: () {
openAppUpdateLink(); openAppUpdateLink();
}, },
@ -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>( await zoom.acceptRecordingConsent();
context: context, // isRecordingStarted.value = true;
builder: (BuildContext context) => AlertDialog( // showDialog<String>(
content: const Text('The session is being recorded.'), // context: context,
actions: <Widget>[ // builder: (BuildContext context) => AlertDialog(
TextButton( // content: const Text('The session is being recorded.'),
onPressed: () async { // actions: <Widget>[
await zoom.acceptRecordingConsent(); // TextButton(
// if (context.mounted) { // onPressed: () async {
Navigator.pop(context); // await zoom.acceptRecordingConsent();
// }; // // if (context.mounted) {
}, // Navigator.pop(context);
child: const Text('accept'), // // };
), // },
TextButton( // child: const Text('accept'),
onPressed: () async { // ),
String currentConsentType = await zoom.getRecordingConsentType(); // TextButton(
if (currentConsentType == ConsentType.ConsentType_Individual) { // onPressed: () async {
await zoom.declineRecordingConsent(); // String currentConsentType = await zoom.getRecordingConsentType();
Navigator.pop(context); // if (currentConsentType == ConsentType.ConsentType_Individual) {
} else { // await zoom.declineRecordingConsent();
await zoom.declineRecordingConsent(); // Navigator.pop(context);
zoom.leaveSession(false); // } else {
// if (!context.mounted) return; // await zoom.declineRecordingConsent();
// Navigator.popAndPushNamed( // zoom.leaveSession(false);
// context, // // if (!context.mounted) return;
// "Join", // // Navigator.popAndPushNamed(
// arguments: JoinArguments(args.isJoin, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role), // // context,
// ); // // "Join",
Navigator.pop(context); // // arguments: JoinArguments(args.isJoin, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role),
} // // );
}, // Navigator.pop(context);
child: const Text('decline'), // }
), // },
], // 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( // Widget endSession;
child: const Text('Cancel'), // Widget leaveSession;
onPressed: () { // Widget cancel = TextButton(
Navigator.pop(context); //close Dialog // child: const Text('Cancel'),
}, // onPressed: () {
); // Navigator.pop(context); //close Dialog
// },
switch (defaultTargetPlatform) { // );
case TargetPlatform.android:
endSession = TextButton( // switch (defaultTargetPlatform) {
child: const Text('End Session'), // case TargetPlatform.android:
onPressed: () => onLeaveSession(true), // endSession = TextButton(
); // child: const Text('End Session'),
leaveSession = TextButton( // onPressed: () => onLeaveSession(true),
child: const Text('Leave Session'), // );
onPressed: () => onLeaveSession(false), // leaveSession = TextButton(
); // child: const Text('Leave Session'),
break; // onPressed: () => onLeaveSession(false),
default: // );
endSession = CupertinoActionSheetAction( // break;
isDestructiveAction: true, // default:
child: const Text('End Session'), // endSession = CupertinoActionSheetAction(
onPressed: () => onLeaveSession(true), // isDestructiveAction: true,
); // child: const Text('End Session'),
leaveSession = CupertinoActionSheetAction( // onPressed: () => onLeaveSession(true),
child: const Text('Leave Session'), // );
onPressed: () => onLeaveSession(false), // leaveSession = CupertinoActionSheetAction(
); // child: const Text('Leave Session'),
break; // onPressed: () => onLeaveSession(false),
} // );
// break;
List<Widget> options = [ // }
leaveSession, //
cancel, // List<Widget> options = [
]; // leaveSession,
// cancel,
if (Platform.isAndroid) { // ];
if (isHost) { //
options.removeAt(1); // if (Platform.isAndroid) {
options.insert(0, endSession); // if (isHost) {
} // options.removeAt(1);
showDialog( // options.insert(0, endSession);
context: context, // }
builder: (context) { // showDialog(
return AlertDialog( // context: context,
content: const Text("Do you want to leave this session?"), // builder: (context) {
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))), // return AlertDialog(
actions: options, // 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) { // } else {
options.insert(1, endSession); // options.removeAt(1);
} // if (isHost) {
showCupertinoModalPopup( // options.insert(1, endSession);
context: context, // }
builder: (context) => CupertinoActionSheet( // showCupertinoModalPopup(
message: const Text('Are you sure that you want to leave the call?'), // context: context,
actions: options, // builder: (context) => CupertinoActionSheet(
cancelButton: cancel, // 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( // Container(
height: 70, // height: 70,
width: 150, // width: 150,
margin: const EdgeInsets.only(top: 16, left: 8), // margin: const EdgeInsets.only(top: 16, left: 8),
padding: const EdgeInsets.all(8), // padding: const EdgeInsets.all(8),
alignment: Alignment.topLeft, // alignment: Alignment.topLeft,
decoration: BoxDecoration( // decoration: BoxDecoration(
borderRadius: const BorderRadius.all(Radius.circular(8.0)), // borderRadius: const BorderRadius.all(Radius.circular(8.0)),
color: buttonBackgroundColor, // color: buttonBackgroundColor,
), // ),
child: InkWell( // child: InkWell(
onTap: () async { // onTap: () async {
showDialog( // showDialog(
context: context, // context: context,
builder: (context) { // builder: (context) {
return Dialog( // return Dialog(
elevation: 0.0, // elevation: 0.0,
insetPadding: const EdgeInsets.symmetric(horizontal: 40), // insetPadding: const EdgeInsets.symmetric(horizontal: 40),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), // shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
child: SizedBox( // child: SizedBox(
height: 280, // height: 280,
width: 200, // width: 200,
child: Column( // child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch, // crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ // children: [
ListView( // ListView(
shrinkWrap: true, // shrinkWrap: true,
children: ListTile.divideTiles( // children: ListTile.divideTiles(
context: context, // context: context,
tiles: [ // tiles: [
ListTile( // ListTile(
title: Text( // title: Text(
'Session Information', // 'Session Information',
style: GoogleFonts.lato( // style: GoogleFonts.lato(
textStyle: const TextStyle( // textStyle: const TextStyle(
fontSize: 18, // fontSize: 18,
fontWeight: FontWeight.w600, // fontWeight: FontWeight.w600,
), // ),
), // ),
), // ),
), // ),
ListTile( // ListTile(
title: Text( // title: Text(
'Session Name', // 'Session Name',
style: GoogleFonts.lato( // style: GoogleFonts.lato(
textStyle: const TextStyle( // textStyle: const TextStyle(
fontSize: 14, // fontSize: 14,
), // ),
), // ),
), // ),
subtitle: Text( // subtitle: Text(
sessionName.value, // sessionName.value,
style: GoogleFonts.lato( // style: GoogleFonts.lato(
textStyle: const TextStyle( // textStyle: const TextStyle(
fontSize: 12, // fontSize: 12,
), // ),
), // ),
), // ),
), // ),
ListTile( // ListTile(
title: Text( // title: Text(
'Session Password', // 'Session Password',
style: GoogleFonts.lato( // style: GoogleFonts.lato(
textStyle: const TextStyle( // textStyle: const TextStyle(
fontSize: 14, // fontSize: 14,
), // ),
), // ),
), // ),
subtitle: Text( // subtitle: Text(
sessionPassword.value, // sessionPassword.value,
style: GoogleFonts.lato( // style: GoogleFonts.lato(
textStyle: const TextStyle( // textStyle: const TextStyle(
fontSize: 12, // fontSize: 12,
), // ),
), // ),
), // ),
), // ),
ListTile( // ListTile(
title: Text( // title: Text(
'Participants', // 'Participants',
style: GoogleFonts.lato( // style: GoogleFonts.lato(
textStyle: const TextStyle( // textStyle: const TextStyle(
fontSize: 14, // fontSize: 14,
), // ),
), // ),
), // ),
subtitle: Text( // subtitle: Text(
'${users.value.length}', // '${users.value.length}',
style: GoogleFonts.lato( // style: GoogleFonts.lato(
textStyle: const TextStyle( // textStyle: const TextStyle(
fontSize: 12, // fontSize: 12,
), // ),
), // ),
), // ),
), // ),
], // ],
).toList(), // ).toList(),
), // ),
], // ],
), // ),
)); // ));
}); // });
}, // },
child: Stack( // child: Stack(
children: [ // children: [
Column( // // Column(
children: [ // // children: [
const Padding(padding: EdgeInsets.symmetric(vertical: 3)), // // const Padding(padding: EdgeInsets.symmetric(vertical: 3)),
Align( // // Align(
alignment: Alignment.centerLeft, // // alignment: Alignment.centerLeft,
child: Text( // // child: Text(
sessionName.value, // // sessionName.value,
overflow: TextOverflow.ellipsis, // // overflow: TextOverflow.ellipsis,
style: GoogleFonts.lato( // // style: GoogleFonts.lato(
textStyle: const TextStyle( // // textStyle: const TextStyle(
fontSize: 14, // // fontSize: 14,
fontWeight: FontWeight.w600, // // fontWeight: FontWeight.w600,
color: Colors.white, // // color: Colors.white,
), // // ),
), // // ),
), // // ),
), // // ),
const Padding(padding: EdgeInsets.symmetric(vertical: 5)), // // const Padding(padding: EdgeInsets.symmetric(vertical: 5)),
Align( // // Align(
alignment: Alignment.centerLeft, // // alignment: Alignment.centerLeft,
child: Text( // // child: Text(
"Participants: ${users.value.length}", // // "Participants: ${users.value.length}",
style: GoogleFonts.lato( // // style: GoogleFonts.lato(
textStyle: const TextStyle( // // textStyle: const TextStyle(
fontSize: 14, // // fontSize: 14,
fontWeight: FontWeight.w600, // // fontWeight: FontWeight.w600,
color: Colors.white, // // color: Colors.white,
), // // ),
), // // ),
), // // ),
) // // )
], // // ],
), // // ),
// Container( // // Container(
// alignment: Alignment.centerRight, // // alignment: Alignment.centerRight,
// child: Image.asset( // // child: Image.asset(
// "assets/icons/unlocked@2x.png", // // "assets/icons/unlocked@2x.png",
// height: 22, // // 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) {
// voIPKit.getVoIPToken().then((value) { FirebaseMessaging.instance.getAPNSToken().then((value) {
// print('🎈 example: getVoIPToken: $value'); print("Push APNS getToken: " + value!);
// AppSharedPreferences().setString(APNS_TOKEN, value!); AppSharedPreferences().setString(APNS_TOKEN, value);
// // getOneSignalVOIPToken(value); AppSharedPreferences().setString(ONESIGNAL_APNS_TOKEN, value);
// }); });
// } // voIPKit.getVoIPToken().then((value) {
// print('🎈 example: getVoIPToken: $value');
// AppSharedPreferences().setString(APNS_TOKEN, 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();
if (widget.incomingCallData!.background == "0") {
Navigator.pushNamed( // Navigator.of(context).pop();
context, Navigator.pushReplacementNamed(
"zoom_call_page", context,
arguments: CallArguments(widget.incomingCallData!.sessionId!, "123", "Patient", "40", "1", false), "zoom_call_page",
); arguments: CallArguments(widget.incomingCallData!.sessionId!, "123", "Patient", "40", "0", false),
);
// await Navigator.of(context).pushReplacement( } else {
// MaterialPageRoute( await Navigator.of(context).pushReplacement(
// // fullscreenDialog: true, MaterialPageRoute(
// builder: (BuildContext context) { // fullscreenDialog: true,
// // final caller = widget.incomingCallData.callerID; builder: (BuildContext context) {
// // final receiver = widget.incomingCallData.receiverID; // final caller = widget.incomingCallData.callerID;
// // final host = widget.incomingCallData.server; // final receiver = widget.incomingCallData.receiverID;
// // if(widget.incomingCallData.isWebRTC == "true"){ // final host = widget.incomingCallData.server;
// // return StartVideoCall(caller: caller, receiver: receiver, iAmCaller: false, host: host); // if(widget.incomingCallData.isWebRTC == "true"){
// // }else{ // return StartVideoCall(caller: caller, receiver: receiver, iAmCaller: false, host: host);
// return OpenTokConnectCallPage( // }else{
// apiKey: OPENTOK_API_KEY, return OpenTokConnectCallPage(apiKey: OPENTOK_API_KEY, sessionId: widget.incomingCallData!.sessionId!, token: widget.incomingCallData!.token!);
// 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);
}); });
} }
@ -73,21 +72,22 @@ class _ClinicPackagesPageState extends State<ClinicPackagesPage> with AfterLayou
showNewAppBar: true, showNewAppBar: true,
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