diff --git a/Google Play Signing Certs/deployment_cert.der b/Google Play Signing Certs/deployment_cert.der new file mode 100644 index 00000000..46c10c23 Binary files /dev/null and b/Google Play Signing Certs/deployment_cert.der differ diff --git a/Google Play Signing Certs/upload_cert.der b/Google Play Signing Certs/upload_cert.der new file mode 100644 index 00000000..46c10c23 Binary files /dev/null and b/Google Play Signing Certs/upload_cert.der differ diff --git a/android/app/build.gradle b/android/app/build.gradle index 45bd064e..19ff9383 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -100,7 +100,7 @@ android { } release { debuggable false - signingConfig signingConfigs.debug + signingConfig signingConfigs.release minifyEnabled true shrinkResources true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' diff --git a/android/gradle.properties b/android/gradle.properties index f144b48e..06a44c05 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,4 +1,4 @@ -org.gradle.jvmargs=-Xmx2048m +org.gradle.jvmargs=-Xmx4096m #android.enableR8=true android.useAndroidX=true android.enableJetifier=true diff --git a/encrypted_private_key_path b/encrypted_private_key_path new file mode 100644 index 00000000..50e125b3 Binary files /dev/null and b/encrypted_private_key_path differ diff --git a/encryption_public_key.pem b/encryption_public_key.pem new file mode 100644 index 00000000..f250df1a --- /dev/null +++ b/encryption_public_key.pem @@ -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----- diff --git a/lib/config/config.dart b/lib/config/config.dart index f71fa9be..4acc7fe4 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -22,8 +22,8 @@ var PACKAGES_ORDER_HISTORY = '/api/orders/items'; 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:4422/'; -var BASE_URL = 'https://uat.hmgwebservices.com/'; -// var BASE_URL = 'https://hmgwebservices.com/'; +// var BASE_URL = 'https://uat.hmgwebservices.com/'; +var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'http://10.20.200.111:1010/'; // var BASE_URL = 'https://orash.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 GENERAL_ID = 'Cs2020@2016\$2958'; var IP_ADDRESS = '10.20.10.20'; -var VERSION_ID = 15.7; +var VERSION_ID = 15.8; var SETUP_ID = '91877'; var LANGUAGE = 2; // var PATIENT_OUT_SA = 0; @@ -668,10 +668,10 @@ var GET_DENTAL_INSTRUCTIONS = 'Services/OUTPs.svc/Rest/getProcedureNotification' //PAYFORT var getPayFortProjectDetails = "Services/PayFort_Serv.svc/REST/GetPayFortProjectDetails"; var addPayFortApplePayResponse = "Services/PayFort_Serv.svc/REST/AddResponse"; -var payFortEnvironment = FortEnvironment.production; -var applePayMerchantId = "merchant.com.hmgwebservices"; -// var payFortEnvironment = FortEnvironment.test; -// var applePayMerchantId = "merchant.com.hmgwebservices.uat"; +// var payFortEnvironment = FortEnvironment.production; +// var applePayMerchantId = "merchant.com.hmgwebservices"; +var payFortEnvironment = FortEnvironment.test; +var applePayMerchantId = "merchant.com.hmgwebservices.uat"; class AppGlobal { static var context; diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 0cf2b7f4..7a1c8a18 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -12,6 +12,7 @@ import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel. import 'package:diplomaticquarterapp/pages/appUpdatePage/app_update_page.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.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/utils.dart'; import 'package:flutter/material.dart'; @@ -201,11 +202,11 @@ class BaseAppClient { body.removeWhere((key, value) => key == null || value == null); - if (AppGlobal.isNetworkDebugEnabled) { - // print("URL : $url"); - // final jsonBody = json.encode(body); - // print(jsonBody); - } + // if (AppGlobal.isNetworkDebugEnabled) { + print("URL : $url"); + final jsonBody = json.encode(body); + print(jsonBody); + // } if (await Utils.checkConnection( bypassConnectionCheck: bypassConnectionCheck)) { @@ -559,7 +560,7 @@ class BaseAppClient { Future navigateToAppUpdate(context, String text) async { Navigator.pushAndRemoveUntil( - context, + locator().navigatorKey.currentContext!, MaterialPageRoute(builder: (context) => AppUpdatePage(appUpdateText: text)), (Route route) => false, ); diff --git a/lib/main.dart b/lib/main.dart index 3137f043..a0a584a5 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -8,18 +8,14 @@ import 'package:diplomaticquarterapp/routes.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/search_provider.dart'; -import 'package:diplomaticquarterapp/splashPage.dart'; import 'package:diplomaticquarterapp/theme/theme_notifier.dart'; import 'package:diplomaticquarterapp/theme/theme_value.dart'; -import 'package:diplomaticquarterapp/uitl/LocalNotification.dart'; import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart'; import 'package:diplomaticquarterapp/uitl/navigation_service.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:fluttertoast/fluttertoast.dart'; -import 'package:logger/logger.dart'; import 'package:provider/provider.dart'; import 'config/size_config.dart'; diff --git a/lib/models/LiveCare/IncomingCallData.dart b/lib/models/LiveCare/IncomingCallData.dart index 9e7279dc..06cfd150 100644 --- a/lib/models/LiveCare/IncomingCallData.dart +++ b/lib/models/LiveCare/IncomingCallData.dart @@ -10,7 +10,7 @@ class IncomingCallData { String? title; String? projectID; String? notificationType; - String? background; + String? background; // 0 for Zoom, 1 for OpenTok String? doctorname; String? clinicname; String? speciality; diff --git a/lib/pages/BookAppointment/components/LaserClinic.dart b/lib/pages/BookAppointment/components/LaserClinic.dart index e3be8e68..17c63b09 100644 --- a/lib/pages/BookAppointment/components/LaserClinic.dart +++ b/lib/pages/BookAppointment/components/LaserClinic.dart @@ -205,7 +205,7 @@ class _LaserClinicState extends State with SingleTickerProviderStat callDoctorsSearchAPI() { int languageID = projectViewModel.isArabic ? 1 : 2; - GifLoaderDialogUtils.showMyDialog(context); + GifLoaderDialogUtils.showMyDialog(context, barrierDismissible: false); List doctorsList = []; List arr = []; List arrDistance = []; diff --git a/lib/pages/BookAppointment/widgets/DoctorView.dart b/lib/pages/BookAppointment/widgets/DoctorView.dart index 34e7e423..18a786f1 100644 --- a/lib/pages/BookAppointment/widgets/DoctorView.dart +++ b/lib/pages/BookAppointment/widgets/DoctorView.dart @@ -231,7 +231,7 @@ class DoctorView extends StatelessWidget { } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); - AppToast.showErrorToast(message: err); + AppToast.showErrorToast(message: err, localContext: context); print(err); }); } diff --git a/lib/pages/ToDoList/ToDo.dart b/lib/pages/ToDoList/ToDo.dart index 3e47ee31..91092bb3 100644 --- a/lib/pages/ToDoList/ToDo.dart +++ b/lib/pages/ToDoList/ToDo.dart @@ -55,6 +55,7 @@ import 'package:provider/provider.dart'; class ToDo extends StatefulWidget { PatientShareResponse? patientShareResponse; var languageID; + // MyInAppBrowser? browser; bool? isShowAppBar = true; Function()? onBackClick; @@ -176,189 +177,206 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { title: TranslationBase.of(context).appointments, bodyWidget: appoList.length != 0 ? ListView.builder( - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: ScrollPhysics(), - padding: EdgeInsets.all(0.0), - itemCount: appoList.length, - itemBuilder: (context, index) { - return Container( - width: double.infinity, - margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0), - decoration: cardRadius(12), - padding: EdgeInsets.all(16), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - flex: 2, - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + padding: EdgeInsets.all(0.0), + itemCount: appoList.length, + itemBuilder: (context, index) { + return Container( + width: double.infinity, + margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0), + decoration: cardRadius(12), + padding: EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Padding( - padding: const EdgeInsets.only(top: 4.0), - child: appoList[index].clinicID == 265 - ? Container( - 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"), + Expanded( + flex: 2, + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(top: 4.0), + child: appoList[index].clinicID == 265 + ? Container( + 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( - 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(); - }, + Expanded( + child: Container( + child: InkWell( + onTap: () { + 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), + ), ), ), - ], + ), ), ], ), - ), - Expanded( - child: Container( - child: InkWell( - onTap: () { - 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), - ), - ), + 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), ), ), - ), - ], - ), - 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: [ - 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, + Row( mainAxisSize: MainAxisSize.min, children: [ - MyRichText(TranslationBase.of(context).clinic + ": ", appoList[index].clinicName!, projectViewModel.isArabic), - // MyRichText(TranslationBase.of(context).appointmentDate + ": ", - // DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) + " " + appoList[index].startTime.substring(0, 5), projectViewModel.isArabic), - - // Timezone changes - appoList[index].isLiveCareAppointment! - ? MyRichText( - TranslationBase.of(context).appointmentDate + ": ", - DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) + - " " + - DateUtil.convertStringToDate(appoList[index].appointmentDate).toString().split(" ")[1].substring(0, 5), - projectViewModel.isArabic) - : MyRichText( - TranslationBase.of(context).appointmentDate + ": ", - DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) + - " " + - appoList[index].startTime!.substring(0, 5), - projectViewModel.isArabic), - - MyRichText(TranslationBase.of(context).branch, appoList[index].projectName!, projectViewModel.isArabic), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - mainAxisSize: MainAxisSize.max, - children: [ - RatingBar( - initialRating: appoList[index].actualDoctorRate.toDouble(), - itemSize: 16.0, - glowColor: Color(0XFFD02127), - unratedColor: Color(0XFFD02127), - allowHalfRating: true, ratingWidget: RatingWidget(full:Icon(Icons.star), half: Icon(Icons.star_half), empty: Icon( Icons.star_border)), onRatingUpdate: (double value) { }, - // : Icons.star_half, - // ic: Icons.star, - // emptyIcon: Icons.star_border, itemBuilder: (BuildContext context, int index) { }, - ), - ], + 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, + children: [ + MyRichText(TranslationBase.of(context).clinic + ": ", appoList[index].clinicName!, projectViewModel.isArabic), + // MyRichText(TranslationBase.of(context).appointmentDate + ": ", + // DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) + " " + appoList[index].startTime.substring(0, 5), projectViewModel.isArabic), + + // Timezone changes + appoList[index].isLiveCareAppointment! + ? MyRichText( + TranslationBase.of(context).appointmentDate + ": ", + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) + + " " + + DateUtil.convertStringToDate(appoList[index].appointmentDate).toString().split(" ")[1].substring(0, 5), + projectViewModel.isArabic) + : MyRichText( + TranslationBase.of(context).appointmentDate + ": ", + DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(appoList[index].appointmentDate)) + + " " + + appoList[index].startTime!.substring(0, 5), + projectViewModel.isArabic), + + MyRichText(TranslationBase.of(context).branch, appoList[index].projectName!, projectViewModel.isArabic), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + mainAxisSize: MainAxisSize.max, + children: [ + 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( - 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]); - }, - child: Padding( - padding: const EdgeInsets.only(top: 0.0), - child: Text( - TranslationBase.of(context).moreDetails, - style: TextStyle( - fontSize: 10, - fontWeight: FontWeight.w600, - color: CustomColors.accentColor, - letterSpacing: -0.48, - height: 25 / 16, - decoration: TextDecoration.underline), - ), + Padding( + padding: const EdgeInsets.only(top: 12.0), + 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]); + }, + child: Padding( + padding: const EdgeInsets.only(top: 0.0), + child: Text( + TranslationBase.of(context).moreDetails, + style: TextStyle( + fontSize: 10, + fontWeight: FontWeight.w600, + color: CustomColors.accentColor, + letterSpacing: -0.48, + height: 25 / 16, + decoration: TextDecoration.underline), + ), + ), + ), + ], ), - ), - ], - ), - ); - }, - ) + ); + }, + ) : getNoDataWidget(context), ), ), @@ -371,28 +389,28 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { title: TranslationBase.of(context).anicllaryOrders, bodyWidget: ancillaryLists.length != 0 ? Container( - padding: EdgeInsets.all(12), - child: ListView.separated( - shrinkWrap: true, - physics: NeverScrollableScrollPhysics(), - reverse: true, - itemBuilder: (context, index) { - return DoctorCard( - onTap: () => ancillaryOrdersDetails(ancillaryLists[0].ancillaryOrderList![index], ancillaryLists[0].projectID), - isInOutPatient: true, - name: TranslationBase.of(context).dr.toString() + " " + (ancillaryLists[0].ancillaryOrderList![index].doctorName ?? ""), - billNo: ancillaryLists[0].ancillaryOrderList![index].orderNo.toString(), - profileUrl: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", - subName: ancillaryLists[0].projectName, - isLiveCareAppointment: false, - date: DateUtil.convertStringToDate(ancillaryLists[0].ancillaryOrderList![index].orderDate), - isSortByClinic: true, - ); - }, - itemCount: ancillaryLists[0].ancillaryOrderList!.length, - separatorBuilder: (context, index) => SizedBox(height: 14), - ), - ) + padding: EdgeInsets.all(12), + child: ListView.separated( + shrinkWrap: true, + physics: NeverScrollableScrollPhysics(), + reverse: true, + itemBuilder: (context, index) { + return DoctorCard( + onTap: () => ancillaryOrdersDetails(ancillaryLists[0].ancillaryOrderList![index], ancillaryLists[0].projectID), + isInOutPatient: true, + name: TranslationBase.of(context).dr.toString() + " " + (ancillaryLists[0].ancillaryOrderList![index].doctorName ?? ""), + billNo: ancillaryLists[0].ancillaryOrderList![index].orderNo.toString(), + profileUrl: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png", + subName: ancillaryLists[0].projectName, + isLiveCareAppointment: false, + date: DateUtil.convertStringToDate(ancillaryLists[0].ancillaryOrderList![index].orderDate), + isSortByClinic: true, + ); + }, + itemCount: ancillaryLists[0].ancillaryOrderList!.length, + separatorBuilder: (context, index) => SizedBox(height: 14), + ), + ) : getNoDataWidget(context), )), ], @@ -401,104 +419,104 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { Container( child: obGyneAppoList.length != 0 ? ListView.builder( - scrollDirection: Axis.vertical, - shrinkWrap: true, - physics: ScrollPhysics(), - padding: EdgeInsets.all(0.0), - itemCount: obGyneAppoList.length, - itemBuilder: (context, index) { - return Container( - width: double.infinity, - margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0), - decoration: cardRadius(12), - padding: EdgeInsets.all(16), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.only(top: 0.0), - child: Container( - margin: EdgeInsets.only(left: 5.0, right: 5.0), - child: SvgPicture.asset("assets/images/new/ultrasound.svg", width: 20.0, height: 20.0), + scrollDirection: Axis.vertical, + shrinkWrap: true, + physics: ScrollPhysics(), + padding: EdgeInsets.all(0.0), + itemCount: obGyneAppoList.length, + itemBuilder: (context, index) { + return Container( + width: double.infinity, + margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0), + decoration: cardRadius(12), + padding: EdgeInsets.all(16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(top: 0.0), + child: Container( + margin: EdgeInsets.only(left: 5.0, right: 5.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)), + ), + ], + ), + ], ), - ), - 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( + 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), + ), + ), ), - ], - ), - ], - ), - 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), ), ), - ), - ], - ), - 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: [ - 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, + Row( mainAxisSize: MainAxisSize.min, children: [ - 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), + 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, + children: [ + 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), ), ], @@ -552,7 +570,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { performNextAction(AppoitmentAllHistoryResultList appo) { switch (appo.nextAction) { case 0: - // getAppoQR(context, appo); + // getAppoQR(context, appo); break; case 10: confirmAppointment(appo); @@ -1075,7 +1093,12 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0), child: Opacity( 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 with SingleTickerProviderStateMixin { barrierDismissible: false, barrierLabel: '', context: context, - pageBuilder: (context, animation1, animation2) =>SizedBox()) - .then((value) { + pageBuilder: (context, animation1, animation2) => SizedBox()).then((value) { if (value != null) { navigateToPaymentMethod(context, value as PatientShareResponse, appo); projectViewModel.analytics.todoList.to_do_list_confirm_payment_details(appo); @@ -1328,13 +1350,13 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { Future navigateToPaymentMethod(context, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async { Navigator.push( - context, - FadePage( - page: PaymentMethod( - onSelectedMethod: (String metohd, [String? selectedInstallmentPlan]) { - setState(() {}); - }, - patientShare: widget.patientShareResponse!.patientShareWithTax))) + context, + FadePage( + page: PaymentMethod( + onSelectedMethod: (String metohd, [String? selectedInstallmentPlan]) { + setState(() {}); + }, + patientShare: widget.patientShareResponse!.patientShareWithTax))) .then((value) { print(value); selectedPaymentMethod = value[0] ?? ""; @@ -1414,26 +1436,26 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { service.applePayInsertRequest(applePayInsertRequest, context).then((res) async { if (res["MessageStatus"] == 1) { await context.read().initiateApplePayWithPayfort( - customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, - // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, - customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com", - orderDescription: "Appointment Payment", - orderAmount: double.parse(patientShareResponse.patientShareWithTax.toString()), - merchantReference: transID, - payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, - currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", - onFailed: (failureResult) async { - log("failureResult: ${failureResult.toString()}"); - AppToast.showErrorToast(message: failureResult.toString()); - }, - onSuccess: (successResult) async { - log("Payfort: ${successResult.responseMessage}"); - await context.read().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult); - checkPaymentStatus(appo); - }, - projectId: appo.projectID, - serviceTypeEnum: ServiceTypeEnum.appointmentPayment, - ); + customerName: projectViewModel.user.firstName! + " " + projectViewModel.user.lastName!, + // customerEmail: projectViewModel.authenticatedUserObject.user.emailAddress, + customerEmail: "CustID_${projectViewModel.user.patientID}@HMG.com", + orderDescription: "Appointment Payment", + orderAmount: double.parse(patientShareResponse.patientShareWithTax.toString()), + merchantReference: transID, + payfortProjectDetailsRespModel: payfortProjectDetailsRespModel, + currency: projectViewModel.user.outSA == 1 ? "AED" : "SAR", + onFailed: (failureResult) async { + log("failureResult: ${failureResult.toString()}"); + AppToast.showErrorToast(message: failureResult.toString()); + }, + onSuccess: (successResult) async { + log("Payfort: ${successResult.responseMessage}"); + await context.read().addPayfortApplePayResponse(projectViewModel.user.patientID!, result: successResult); + checkPaymentStatus(appo); + }, + projectId: appo.projectID, + serviceTypeEnum: ServiceTypeEnum.appointmentPayment, + ); } else { GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: "An error occurred while processing your request"); @@ -1472,7 +1494,7 @@ class _ToDoState extends State with SingleTickerProviderStateMixin { DoctorsListService service = new DoctorsListService(); service .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) { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { diff --git a/lib/pages/appUpdatePage/app_update_page.dart b/lib/pages/appUpdatePage/app_update_page.dart index c4c49628..d9ecb3df 100644 --- a/lib/pages/appUpdatePage/app_update_page.dart +++ b/lib/pages/appUpdatePage/app_update_page.dart @@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/custom_text_button.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; +import 'package:in_app_update/in_app_update.dart'; import 'package:url_launcher/url_launcher.dart'; class AppUpdatePage extends StatefulWidget { @@ -57,10 +58,10 @@ class _AppUpdatePageState extends State { minWidth: MediaQuery.of(context).size.width, height: 45.0, child: CustomTextButton( - backgroundColor: Colors.red[800]!, - disabledForegroundColor: Color(0xFFbcc2c4).withOpacity(0.38), - disabledBackgroundColor: Color(0xFFbcc2c4).withOpacity(0.12), - elevation: 0, + backgroundColor: Colors.red[800]!, + disabledForegroundColor: Color(0xFFbcc2c4).withOpacity(0.38), + disabledBackgroundColor: Color(0xFFbcc2c4).withOpacity(0.12), + elevation: 0, onPressed: () { openAppUpdateLink(); }, @@ -78,16 +79,17 @@ class _AppUpdatePageState extends State { openAppUpdateLink() { if (Platform.isAndroid) { // _launchURL("https://play.google.com/store/apps/details?id=com.ejada.hmg"); - // InAppUpdate.checkForUpdate().then((info) { - // print("checkForUpdate!!!"); - // print(info.toString()); - // if (info.immediateUpdateAllowed) { - // print("Immediate Allowed!!!"); - // InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString())); - // } - // }).catchError((e) { - // print(e.toString()); - // }); + InAppUpdate.checkForUpdate().then((info) { + print("checkForUpdate!!!"); + print(info.toString()); + if (info.immediateUpdateAllowed) { + print("Immediate Allowed!!!"); + InAppUpdate.performImmediateUpdate().then((value) {}).catchError((e) => print(e.toString())); + } + }).catchError((e) { + print(e.toString()); + _launchURL("https://play.google.com/store/apps/details?id=com.ejada.hmg"); + }); } if (Platform.isIOS) { _launchURL("https://itunes.apple.com/app/id733503978"); diff --git a/lib/pages/conference/zoom/call_screen.dart b/lib/pages/conference/zoom/call_screen.dart index 70f90415..194b9f21 100644 --- a/lib/pages/conference/zoom/call_screen.dart +++ b/lib/pages/conference/zoom/call_screen.dart @@ -333,43 +333,45 @@ class _CallScreenState extends State { ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); if (data['status'] == RecordingStatus.Start) { if (mySelf != null && !mySelf.isHost!) { - showDialog( - context: context, - builder: (BuildContext context) => AlertDialog( - content: const Text('The session is being recorded.'), - actions: [ - TextButton( - onPressed: () async { - await zoom.acceptRecordingConsent(); - // if (context.mounted) { - Navigator.pop(context); - // }; - }, - child: const Text('accept'), - ), - TextButton( - onPressed: () async { - String currentConsentType = await zoom.getRecordingConsentType(); - if (currentConsentType == ConsentType.ConsentType_Individual) { - await zoom.declineRecordingConsent(); - Navigator.pop(context); - } else { - await zoom.declineRecordingConsent(); - zoom.leaveSession(false); - // if (!context.mounted) return; - // Navigator.popAndPushNamed( - // context, - // "Join", - // arguments: JoinArguments(args.isJoin, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role), - // ); - Navigator.pop(context); - } - }, - child: const Text('decline'), - ), - ], - ), - ); + await zoom.acceptRecordingConsent(); + // isRecordingStarted.value = true; + // showDialog( + // context: context, + // builder: (BuildContext context) => AlertDialog( + // content: const Text('The session is being recorded.'), + // actions: [ + // TextButton( + // onPressed: () async { + // await zoom.acceptRecordingConsent(); + // // if (context.mounted) { + // Navigator.pop(context); + // // }; + // }, + // child: const Text('accept'), + // ), + // TextButton( + // onPressed: () async { + // String currentConsentType = await zoom.getRecordingConsentType(); + // if (currentConsentType == ConsentType.ConsentType_Individual) { + // await zoom.declineRecordingConsent(); + // Navigator.pop(context); + // } else { + // await zoom.declineRecordingConsent(); + // zoom.leaveSession(false); + // // if (!context.mounted) return; + // // Navigator.popAndPushNamed( + // // context, + // // "Join", + // // arguments: JoinArguments(args.isJoin, sessionName.value, sessionPassword.value, args.displayName, args.sessionIdleTimeoutMins, args.role), + // // ); + // Navigator.pop(context); + // } + // }, + // child: const Text('decline'), + // ), + // ], + // ), + // ); } isRecordingStarted.value = true; } else { @@ -1156,79 +1158,81 @@ class _CallScreenState extends State { void onLeaveSession(bool isEndSession) async { await zoom.leaveSession(isEndSession); Navigator.pop(context); - Navigator.pop(context); + // Navigator.pop(context); } void showLeaveOptions() async { ZoomVideoSdkUser? mySelf = await zoom.session.getMySelf(); bool isHost = await mySelf!.getIsHost(); - Widget endSession; - Widget leaveSession; - Widget cancel = TextButton( - child: const Text('Cancel'), - onPressed: () { - Navigator.pop(context); //close Dialog - }, - ); - - switch (defaultTargetPlatform) { - case TargetPlatform.android: - endSession = TextButton( - child: const Text('End Session'), - onPressed: () => onLeaveSession(true), - ); - leaveSession = TextButton( - child: const Text('Leave Session'), - onPressed: () => onLeaveSession(false), - ); - break; - default: - endSession = CupertinoActionSheetAction( - isDestructiveAction: true, - child: const Text('End Session'), - onPressed: () => onLeaveSession(true), - ); - leaveSession = CupertinoActionSheetAction( - child: const Text('Leave Session'), - onPressed: () => onLeaveSession(false), - ); - break; - } - - List options = [ - leaveSession, - cancel, - ]; - - if (Platform.isAndroid) { - if (isHost) { - options.removeAt(1); - options.insert(0, endSession); - } - showDialog( - context: context, - builder: (context) { - return AlertDialog( - content: const Text("Do you want to leave this session?"), - shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))), - actions: options, - ); - }); - } else { - options.removeAt(1); - if (isHost) { - options.insert(1, endSession); - } - showCupertinoModalPopup( - context: context, - builder: (context) => CupertinoActionSheet( - message: const Text('Are you sure that you want to leave the call?'), - actions: options, - cancelButton: cancel, - ), - ); - } + onLeaveSession(true); + + // Widget endSession; + // Widget leaveSession; + // Widget cancel = TextButton( + // child: const Text('Cancel'), + // onPressed: () { + // Navigator.pop(context); //close Dialog + // }, + // ); + + // switch (defaultTargetPlatform) { + // case TargetPlatform.android: + // endSession = TextButton( + // child: const Text('End Session'), + // onPressed: () => onLeaveSession(true), + // ); + // leaveSession = TextButton( + // child: const Text('Leave Session'), + // onPressed: () => onLeaveSession(false), + // ); + // break; + // default: + // endSession = CupertinoActionSheetAction( + // isDestructiveAction: true, + // child: const Text('End Session'), + // onPressed: () => onLeaveSession(true), + // ); + // leaveSession = CupertinoActionSheetAction( + // child: const Text('Leave Session'), + // onPressed: () => onLeaveSession(false), + // ); + // break; + // } + // + // List options = [ + // leaveSession, + // cancel, + // ]; + // + // if (Platform.isAndroid) { + // if (isHost) { + // options.removeAt(1); + // options.insert(0, endSession); + // } + // showDialog( + // context: context, + // builder: (context) { + // return AlertDialog( + // content: const Text("Do you want to leave this session?"), + // shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(2.0))), + // actions: options, + // ); + // }); + // } else { + // options.removeAt(1); + // if (isHost) { + // options.insert(1, endSession); + // } + // showCupertinoModalPopup( + // context: context, + // builder: (context) => CupertinoActionSheet( + // message: const Text('Are you sure that you want to leave the call?'), + // actions: options, + // cancelButton: cancel, + // ), + // ); + // } } final chatMessageController = TextEditingController(); @@ -1353,154 +1357,154 @@ class _CallScreenState extends State { crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Container( - height: 70, - width: 150, - margin: const EdgeInsets.only(top: 16, left: 8), - padding: const EdgeInsets.all(8), - alignment: Alignment.topLeft, - decoration: BoxDecoration( - borderRadius: const BorderRadius.all(Radius.circular(8.0)), - color: buttonBackgroundColor, - ), - child: InkWell( - onTap: () async { - showDialog( - context: context, - builder: (context) { - return Dialog( - elevation: 0.0, - insetPadding: const EdgeInsets.symmetric(horizontal: 40), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), - child: SizedBox( - height: 280, - width: 200, - child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - ListView( - shrinkWrap: true, - children: ListTile.divideTiles( - context: context, - tiles: [ - ListTile( - title: Text( - 'Session Information', - style: GoogleFonts.lato( - textStyle: const TextStyle( - fontSize: 18, - fontWeight: FontWeight.w600, - ), - ), - ), - ), - ListTile( - title: Text( - 'Session Name', - style: GoogleFonts.lato( - textStyle: const TextStyle( - fontSize: 14, - ), - ), - ), - subtitle: Text( - sessionName.value, - style: GoogleFonts.lato( - textStyle: const TextStyle( - fontSize: 12, - ), - ), - ), - ), - ListTile( - title: Text( - 'Session Password', - style: GoogleFonts.lato( - textStyle: const TextStyle( - fontSize: 14, - ), - ), - ), - subtitle: Text( - sessionPassword.value, - style: GoogleFonts.lato( - textStyle: const TextStyle( - fontSize: 12, - ), - ), - ), - ), - ListTile( - title: Text( - 'Participants', - style: GoogleFonts.lato( - textStyle: const TextStyle( - fontSize: 14, - ), - ), - ), - subtitle: Text( - '${users.value.length}', - style: GoogleFonts.lato( - textStyle: const TextStyle( - fontSize: 12, - ), - ), - ), - ), - ], - ).toList(), - ), - ], - ), - )); - }); - }, - child: Stack( - children: [ - Column( - children: [ - const Padding(padding: EdgeInsets.symmetric(vertical: 3)), - Align( - alignment: Alignment.centerLeft, - child: Text( - sessionName.value, - overflow: TextOverflow.ellipsis, - style: GoogleFonts.lato( - textStyle: const TextStyle( - fontSize: 14, - fontWeight: FontWeight.w600, - color: Colors.white, - ), - ), - ), - ), - const Padding(padding: EdgeInsets.symmetric(vertical: 5)), - Align( - alignment: Alignment.centerLeft, - child: Text( - "Participants: ${users.value.length}", - style: GoogleFonts.lato( - textStyle: const TextStyle( - fontSize: 14, - fontWeight: FontWeight.w600, - color: Colors.white, - ), - ), - ), - ) - ], - ), - // Container( - // alignment: Alignment.centerRight, - // child: Image.asset( - // "assets/icons/unlocked@2x.png", - // height: 22, - // )), - ], - ), - ), - ), + // Container( + // height: 70, + // width: 150, + // margin: const EdgeInsets.only(top: 16, left: 8), + // padding: const EdgeInsets.all(8), + // alignment: Alignment.topLeft, + // decoration: BoxDecoration( + // borderRadius: const BorderRadius.all(Radius.circular(8.0)), + // color: buttonBackgroundColor, + // ), + // child: InkWell( + // onTap: () async { + // showDialog( + // context: context, + // builder: (context) { + // return Dialog( + // elevation: 0.0, + // insetPadding: const EdgeInsets.symmetric(horizontal: 40), + // shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)), + // child: SizedBox( + // height: 280, + // width: 200, + // child: Column( + // crossAxisAlignment: CrossAxisAlignment.stretch, + // children: [ + // ListView( + // shrinkWrap: true, + // children: ListTile.divideTiles( + // context: context, + // tiles: [ + // ListTile( + // title: Text( + // 'Session Information', + // style: GoogleFonts.lato( + // textStyle: const TextStyle( + // fontSize: 18, + // fontWeight: FontWeight.w600, + // ), + // ), + // ), + // ), + // ListTile( + // title: Text( + // 'Session Name', + // style: GoogleFonts.lato( + // textStyle: const TextStyle( + // fontSize: 14, + // ), + // ), + // ), + // subtitle: Text( + // sessionName.value, + // style: GoogleFonts.lato( + // textStyle: const TextStyle( + // fontSize: 12, + // ), + // ), + // ), + // ), + // ListTile( + // title: Text( + // 'Session Password', + // style: GoogleFonts.lato( + // textStyle: const TextStyle( + // fontSize: 14, + // ), + // ), + // ), + // subtitle: Text( + // sessionPassword.value, + // style: GoogleFonts.lato( + // textStyle: const TextStyle( + // fontSize: 12, + // ), + // ), + // ), + // ), + // ListTile( + // title: Text( + // 'Participants', + // style: GoogleFonts.lato( + // textStyle: const TextStyle( + // fontSize: 14, + // ), + // ), + // ), + // subtitle: Text( + // '${users.value.length}', + // style: GoogleFonts.lato( + // textStyle: const TextStyle( + // fontSize: 12, + // ), + // ), + // ), + // ), + // ], + // ).toList(), + // ), + // ], + // ), + // )); + // }); + // }, + // child: Stack( + // children: [ + // // Column( + // // children: [ + // // const Padding(padding: EdgeInsets.symmetric(vertical: 3)), + // // Align( + // // alignment: Alignment.centerLeft, + // // child: Text( + // // sessionName.value, + // // overflow: TextOverflow.ellipsis, + // // style: GoogleFonts.lato( + // // textStyle: const TextStyle( + // // fontSize: 14, + // // fontWeight: FontWeight.w600, + // // color: Colors.white, + // // ), + // // ), + // // ), + // // ), + // // const Padding(padding: EdgeInsets.symmetric(vertical: 5)), + // // Align( + // // alignment: Alignment.centerLeft, + // // child: Text( + // // "Participants: ${users.value.length}", + // // style: GoogleFonts.lato( + // // textStyle: const TextStyle( + // // fontSize: 14, + // // fontWeight: FontWeight.w600, + // // color: Colors.white, + // // ), + // // ), + // // ), + // // ) + // // ], + // // ), + // // Container( + // // alignment: Alignment.centerRight, + // // child: Image.asset( + // // "assets/icons/unlocked@2x.png", + // // height: 22, + // // )), + // ], + // ), + // ), + // ), TextButton( onPressed: (showLeaveOptions), child: Container( diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index 8666b9c7..ebe6e67b 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -322,15 +322,20 @@ class _LandingPageState extends State with WidgetsBindingObserver { // HMGNetworkConnectivity(context).start(); _firebaseMessaging.getToken().then((String? token) { - // print("Firebase Token: " + token!); - // sharedPref.setString(PUSH_TOKEN, token!); - // if (Platform.isIOS) { - // voIPKit.getVoIPToken().then((value) { - // print('🎈 example: getVoIPToken: $value'); - // AppSharedPreferences().setString(APNS_TOKEN, value!); - // // getOneSignalVOIPToken(value); - // }); - // } + print("Firebase Token: " + token!); + sharedPref.setString(PUSH_TOKEN, token!); + if (Platform.isIOS) { + FirebaseMessaging.instance.getAPNSToken().then((value) { + print("Push APNS getToken: " + value!); + AppSharedPreferences().setString(APNS_TOKEN, value); + AppSharedPreferences().setString(ONESIGNAL_APNS_TOKEN, value); + }); + // voIPKit.getVoIPToken().then((value) { + // print('🎈 example: getVoIPToken: $value'); + // AppSharedPreferences().setString(APNS_TOKEN, value!); + // // getOneSignalVOIPToken(value); + // }); + } if (token != null) { DEVICE_TOKEN = token; if (!projectViewModel.isLoginChild) { @@ -394,11 +399,11 @@ class _LandingPageState extends State with WidgetsBindingObserver { } else { // AppGlobal.context = context; GifLoaderDialogUtils.showMyDialog(context); - authService.selectDeviceImei(DEVICE_TOKEN).then((SelectDeviceIMEIRES? value) async { + authService.selectDeviceImei(DEVICE_TOKEN).then((value) async { GifLoaderDialogUtils.hideDialog(context); var data = await sharedPref.getObject(IMEI_USER_DATA); - if (data != null) { - setUserValues(data); + if (value != null) { + setUserValues(value); Navigator.of(context).pushNamed(CONFIRM_LOGIN); } else { GifLoaderDialogUtils.hideDialog(context); @@ -733,7 +738,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { } if (Platform.isIOS) { String voipToken = await sharedPref.getString(APNS_TOKEN); - getOneSignalVOIPToken(voipToken); + // getOneSignalVOIPToken(voipToken); } // registerGeofences(); } diff --git a/lib/pages/livecare/incoming_call.dart b/lib/pages/livecare/incoming_call.dart index e8bea049..c33ef215 100644 --- a/lib/pages/livecare/incoming_call.dart +++ b/lib/pages/livecare/incoming_call.dart @@ -216,39 +216,30 @@ class _IncomingCallState extends State with SingleTickerProviderSt LandingPage.isOpenCallPage = false; player.stop(); changeCallStatusAPI(4); - Navigator.of(context).pop(); - - Navigator.pushNamed( - context, - "zoom_call_page", - arguments: CallArguments(widget.incomingCallData!.sessionId!, "123", "Patient", "40", "1", false), - ); - - // await Navigator.of(context).pushReplacement( - // MaterialPageRoute( - // // fullscreenDialog: true, - // builder: (BuildContext context) { - // // final caller = widget.incomingCallData.callerID; - // // final receiver = widget.incomingCallData.receiverID; - // // final host = widget.incomingCallData.server; - // // if(widget.incomingCallData.isWebRTC == "true"){ - // // return StartVideoCall(caller: caller, receiver: receiver, iAmCaller: false, host: host); - // // }else{ - // return OpenTokConnectCallPage( - // apiKey: OPENTOK_API_KEY, - // sessionId: widget.incomingCallData!.sessionId!, - // token: widget.incomingCallData!.token! - // ); - // // } - // - // // return VideoCallWebPage(receiverId: widget.incomingCallData.receiverID, callerId: widget.incomingCallData.callerID); // Web WebRTC VideoCall - // - // // return CallHomePage(receiverId: widget.incomingCallData.receiverID, callerId: widget.incomingCallData.callerID); // App WebRTC VideoCall - // - // }, - // ), - // ); + if (widget.incomingCallData!.background == "0") { + // Navigator.of(context).pop(); + Navigator.pushReplacementNamed( + context, + "zoom_call_page", + arguments: CallArguments(widget.incomingCallData!.sessionId!, "123", "Patient", "40", "0", false), + ); + } else { + await Navigator.of(context).pushReplacement( + MaterialPageRoute( + // fullscreenDialog: true, + builder: (BuildContext context) { + // final caller = widget.incomingCallData.callerID; + // final receiver = widget.incomingCallData.receiverID; + // final host = widget.incomingCallData.server; + // if(widget.incomingCallData.isWebRTC == "true"){ + // return StartVideoCall(caller: caller, receiver: receiver, iAmCaller: false, host: host); + // }else{ + return OpenTokConnectCallPage(apiKey: OPENTOK_API_KEY, sessionId: widget.incomingCallData!.sessionId!, token: widget.incomingCallData!.token!); + }, + ), + ); + } } catch (err) { print(err); await PlatformExceptionAlertDialog( diff --git a/lib/pages/livecare/widgets/clinic_list.dart b/lib/pages/livecare/widgets/clinic_list.dart index ee0fd356..5b431479 100644 --- a/lib/pages/livecare/widgets/clinic_list.dart +++ b/lib/pages/livecare/widgets/clinic_list.dart @@ -667,7 +667,7 @@ class _clinic_listState extends State { } }).catchError((err) { GifLoaderDialogUtils.hideDialog(context); - AppToast.showErrorToast(message: err); + AppToast.showErrorToast(message: err, localContext: context); print(err); }); } diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 73a31867..608943ac 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -788,7 +788,7 @@ class _ConfirmLogin extends State { sharedPref.remove(FAMILY_FILE), result.list.isFamily = false, userData = result.list, - sharedPref.setString(BLOOD_TYPE, result.patientBloodType), + sharedPref.setString(BLOOD_TYPE, result.patientBloodType ?? ""), //Remove o+ from here Added by Aamir authenticatedUserObject.user = result.list, projectViewModel.setPrivilege(privilegeList: res), diff --git a/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart b/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart index f497878e..8ca443be 100644 --- a/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart +++ b/lib/pages/medical/smart_watch_health_data/smart_watch_instructions.dart @@ -1,6 +1,6 @@ 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/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/locator.dart'; @@ -22,7 +22,7 @@ class SmartWatchInstructions extends StatefulWidget { } class _SmartWatchInstructionsState extends State { - CarouselController buttonCarouselController = CarouselController(); + // CarouselController buttonCarouselController = CarouselController(); bool hasAlreadySynced = false; diff --git a/lib/pages/packages_offers/ClinicOfferAndPackagesPage.dart b/lib/pages/packages_offers/ClinicOfferAndPackagesPage.dart index e77d8a45..247203ad 100644 --- a/lib/pages/packages_offers/ClinicOfferAndPackagesPage.dart +++ b/lib/pages/packages_offers/ClinicOfferAndPackagesPage.dart @@ -11,7 +11,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.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'; @@ -37,8 +37,7 @@ class _ClinicPackagesPageState extends State with AfterLayou if (viewModel!.service.customer != null) { var request = AddProductToCartRequestModel(product_id: product.id, customer_id: viewModel!.service!.customer!.id); - await viewModel!.service.addProductToCart(request, context: context).then((response) { - }).catchError((error) { + await viewModel!.service.addProductToCart(request, context: context).then((response) {}).catchError((error) { utils.Utils.showErrorToast(error); }); } @@ -73,21 +72,22 @@ class _ClinicPackagesPageState extends State with AfterLayou showNewAppBar: true, showNewAppBarTitle: true, body: Padding( - padding: const EdgeInsets.all(12), - child:grid_view.AlignedGridView.count( - crossAxisCount: 4, - itemCount: _products.length, - itemBuilder: (BuildContext context, int index) => new Container( - color: Colors.transparent, - child: PackagesItemCard( - itemContentPadding: 10, - itemModel: _products[index], - onCartClick: OFFERS_VIEW_ONLY ? onProductCartClick : (PackagesResponseModel){}, - )), - // staggeredTileBuilder: (int index) => StaggeredTile.fit(2), - mainAxisSpacing: 20, - crossAxisSpacing: 10, - )), + padding: const EdgeInsets.all(12), + // child: grid_view.AlignedGridView.count( + // crossAxisCount: 4, + // itemCount: _products.length, + // itemBuilder: (BuildContext context, int index) => new Container( + // color: Colors.transparent, + // child: PackagesItemCard( + // itemContentPadding: 10, + // itemModel: _products[index], + // onCartClick: OFFERS_VIEW_ONLY ? onProductCartClick : (PackagesResponseModel) {}, + // )), + // // staggeredTileBuilder: (int index) => StaggeredTile.fit(2), + // mainAxisSpacing: 20, + // crossAxisSpacing: 10, + // ), + ), ), ); } diff --git a/lib/pages/pharmacies/widgets/home/BannerPager.dart b/lib/pages/pharmacies/widgets/home/BannerPager.dart index bf7ca715..ae9811e0 100644 --- a/lib/pages/pharmacies/widgets/home/BannerPager.dart +++ b/lib/pages/pharmacies/widgets/home/BannerPager.dart @@ -1,5 +1,5 @@ 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/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/landing/home_page.dart'; @@ -32,47 +32,47 @@ class _BannerPagerState extends State { return Container( child: Column( children: [ - CarouselSlider( - options: CarouselOptions( - aspectRatio: 5 / 2, - enlargeCenterPage: true, - enableInfiniteScroll: false, - viewportFraction: 1.0, - initialPage: 0, - autoPlay: true, - autoPlayInterval: Duration(seconds: 3), - autoPlayAnimationDuration: Duration(milliseconds: 800), - autoPlayCurve: Curves.decelerate, - onPageChanged: (index, reason) { - setState(() { - _current = index; - }); - }, - ), - items: widget._model.getBannerImagesUrl(projectViewModel).mapIndexed( - (item, index) { - return InkWell( - onTap: () { - bannerNavigator(index); - }, - child: Container( - margin: EdgeInsets.symmetric(horizontal: 1.0), - child: ClipRRect( - borderRadius: BorderRadius.all(Radius.circular(5.0)), - child: Center( - child: index == 0 || index == 1 - ? Image.asset( - item, - fit: BoxFit.cover, - ) - : CachedNetworkImage(imageUrl: item, fit: BoxFit.fitWidth, errorWidget: (context, url, error) => SizedBox()), - ), - ), - ), - ); - }, - ).toList(), - ), + // CarouselSlider( + // options: CarouselOptions( + // aspectRatio: 5 / 2, + // enlargeCenterPage: true, + // enableInfiniteScroll: false, + // viewportFraction: 1.0, + // initialPage: 0, + // autoPlay: true, + // autoPlayInterval: Duration(seconds: 3), + // autoPlayAnimationDuration: Duration(milliseconds: 800), + // autoPlayCurve: Curves.decelerate, + // onPageChanged: (index, reason) { + // setState(() { + // _current = index; + // }); + // }, + // ), + // items: widget._model.getBannerImagesUrl(projectViewModel).mapIndexed( + // (item, index) { + // return InkWell( + // onTap: () { + // bannerNavigator(index); + // }, + // child: Container( + // margin: EdgeInsets.symmetric(horizontal: 1.0), + // child: ClipRRect( + // borderRadius: BorderRadius.all(Radius.circular(5.0)), + // child: Center( + // child: index == 0 || index == 1 + // ? Image.asset( + // item, + // fit: BoxFit.cover, + // ) + // : CachedNetworkImage(imageUrl: item, fit: BoxFit.fitWidth, errorWidget: (context, url, error) => SizedBox()), + // ), + // ), + // ), + // ); + // }, + // ).toList(), + // ), Padding( padding: const EdgeInsets.all(8.0), child: Row( diff --git a/lib/pages/pharmacies/widgets/lacum-banner-widget.dart b/lib/pages/pharmacies/widgets/lacum-banner-widget.dart index bd56698f..42ca3d07 100644 --- a/lib/pages/pharmacies/widgets/lacum-banner-widget.dart +++ b/lib/pages/pharmacies/widgets/lacum-banner-widget.dart @@ -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/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; @@ -24,231 +24,231 @@ class _LakumBannerWidgetState extends State { return Container( child: Stack( children: [ - CarouselSlider( - options: CarouselOptions( - enableInfiniteScroll: false, - enlargeCenterPage: false, - viewportFraction: 1.0, - scrollPhysics: widget.isLacumHomePage - ? ScrollPhysics() - : NeverScrollableScrollPhysics(), - initialPage: 0, - onPageChanged: (index, reason) { - setState(() { - _current = index; - }); - }, - ), - items: [ - Container( - decoration: BoxDecoration( - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(4), - border: Border.fromBorderSide(BorderSide( - color: Colors.grey, - width: 0.4, - )), - ), - margin: EdgeInsets.symmetric(horizontal: 16), - child: Stack( - children: [ - Image.asset( - "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", - fit: BoxFit.fill, - width: widget.mediaQuery.size.width * 1.0, - height: widget.mediaQuery.size.width * 1.0, - ), - Container( - margin: EdgeInsets.fromLTRB(12, 75, 12, 0), - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName, - fontSize: 13, - fontWeight: FontWeight.bold, - color: Colors.black, - ), - Texts( - "${widget.model.lacumInformation!.yahalaAccountNo}", - fontSize: 13, - fontWeight: FontWeight.normal, - color: Colors.black, - ), - ], - ), - BorderedButton( - widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountStatus == "Active" - ? TranslationBase.of(context).active - : TranslationBase.of(context).inactive, - textColor: widget.model.lacumInformation! - .accountStatus == - 1 - ? Colors.green - : Colors.red, - hasBorder: true, - borderColor: widget.model.lacumInformation! - .accountStatus == - 1 - ? Colors.green - : Colors.red, - radius: 16, - rPadding: 16, - icon: widget.model.lacumInformation! - .accountStatus == - 1 - ? Icon( - Icons.check_circle, - size: 25, - color: Colors.green, - ) - : Image.asset( - "assets/images/pharmacy_module/lakum/inactive_cross.png", - fit: BoxFit.fill, - width: 25, - height: 25, - ), - ), - ], - ), - SizedBox( - height: 5, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts(TranslationBase.of(context).identificationNumber, -// "IDENTIFICATION #", - fontSize: 13, - fontWeight: FontWeight.bold, - color: Colors.black, - ), - Texts( - widget.model.lacumInformation! - .identificationNo, - fontSize: 13, - fontWeight: FontWeight.normal, - color: Colors.black, - ), - ], - ), - Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Texts(TranslationBase.of(context).MEMBERSINCE, -// "MEMBER SINCE", - fontSize: 13, - fontWeight: FontWeight.bold, - color: Colors.black, - ), - Texts( - widget.model.formatCreatedDateToString(), - fontSize: 13, - fontWeight: FontWeight.normal, - color: Colors.black, - ), - ], - ), - ], - ), - SizedBox( - height: 5, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts(TranslationBase.of(context).lakumMobile, -// "MOBILE #", - fontSize: 13, - fontWeight: FontWeight.bold, - color: Colors.black, - ), - Texts( - widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber, - fontSize: 13, - fontWeight: FontWeight.normal, - color: Colors.black, - ), - ], - ), - Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Texts( - TranslationBase.of(context).language, - fontSize: 13, - fontWeight: FontWeight.bold, - color: Colors.black, - ), - Texts( - widget.model.lacumInformation!.prefLang == - "2" - ? TranslationBase.of(context).lanEnglish - : TranslationBase.of(context).lanArabic, - fontSize: 13, - fontWeight: FontWeight.normal, - color: Colors.black, - ), - ], - ), - ], - ), - ], - ), - ), - ], - ), - ), - widget.isLacumHomePage - ? Container( - decoration: BoxDecoration( - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(4), - border: Border.fromBorderSide(BorderSide( - color: Colors.grey, - width: 0.4, - )), - ), - margin: EdgeInsets.symmetric(horizontal: 16), - child: Stack( - children: [ - Image.asset( - "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", - fit: BoxFit.fill, - width: widget.mediaQuery.size.width * 1.0, - height: widget.mediaQuery.size.width * 1.0, - ), - Center( - child: Container( - margin: EdgeInsets.fromLTRB(5, 70, 5, 4), - child: widget.model.convertBase64ToBarCodeImage() != - null - ? Image.memory( - widget.model.convertBase64ToBarCodeImage(), - fit: BoxFit.fill, - height: 100.0, - width: 180.0 - ) - : Container(), - ), - ), - ], - ), - ) - : Container(), - ], - ), +// CarouselSlider( +// options: CarouselOptions( +// enableInfiniteScroll: false, +// enlargeCenterPage: false, +// viewportFraction: 1.0, +// scrollPhysics: widget.isLacumHomePage +// ? ScrollPhysics() +// : NeverScrollableScrollPhysics(), +// initialPage: 0, +// onPageChanged: (index, reason) { +// setState(() { +// _current = index; +// }); +// }, +// ), +// items: [ +// Container( +// decoration: BoxDecoration( +// shape: BoxShape.rectangle, +// borderRadius: BorderRadius.circular(4), +// border: Border.fromBorderSide(BorderSide( +// color: Colors.grey, +// width: 0.4, +// )), +// ), +// margin: EdgeInsets.symmetric(horizontal: 16), +// child: Stack( +// children: [ +// Image.asset( +// "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", +// fit: BoxFit.fill, +// width: widget.mediaQuery.size.width * 1.0, +// height: widget.mediaQuery.size.width * 1.0, +// ), +// Container( +// margin: EdgeInsets.fromLTRB(12, 75, 12, 0), +// child: Column( +// children: [ +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Texts( +// widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName, +// fontSize: 13, +// fontWeight: FontWeight.bold, +// color: Colors.black, +// ), +// Texts( +// "${widget.model.lacumInformation!.yahalaAccountNo}", +// fontSize: 13, +// fontWeight: FontWeight.normal, +// color: Colors.black, +// ), +// ], +// ), +// BorderedButton( +// widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountStatus == "Active" +// ? TranslationBase.of(context).active +// : TranslationBase.of(context).inactive, +// textColor: widget.model.lacumInformation! +// .accountStatus == +// 1 +// ? Colors.green +// : Colors.red, +// hasBorder: true, +// borderColor: widget.model.lacumInformation! +// .accountStatus == +// 1 +// ? Colors.green +// : Colors.red, +// radius: 16, +// rPadding: 16, +// icon: widget.model.lacumInformation! +// .accountStatus == +// 1 +// ? Icon( +// Icons.check_circle, +// size: 25, +// color: Colors.green, +// ) +// : Image.asset( +// "assets/images/pharmacy_module/lakum/inactive_cross.png", +// fit: BoxFit.fill, +// width: 25, +// height: 25, +// ), +// ), +// ], +// ), +// SizedBox( +// height: 5, +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Texts(TranslationBase.of(context).identificationNumber, +// // "IDENTIFICATION #", +// fontSize: 13, +// fontWeight: FontWeight.bold, +// color: Colors.black, +// ), +// Texts( +// widget.model.lacumInformation! +// .identificationNo, +// fontSize: 13, +// fontWeight: FontWeight.normal, +// color: Colors.black, +// ), +// ], +// ), +// Column( +// crossAxisAlignment: CrossAxisAlignment.end, +// children: [ +// Texts(TranslationBase.of(context).MEMBERSINCE, +// // "MEMBER SINCE", +// fontSize: 13, +// fontWeight: FontWeight.bold, +// color: Colors.black, +// ), +// Texts( +// widget.model.formatCreatedDateToString(), +// fontSize: 13, +// fontWeight: FontWeight.normal, +// color: Colors.black, +// ), +// ], +// ), +// ], +// ), +// SizedBox( +// height: 5, +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Texts(TranslationBase.of(context).lakumMobile, +// // "MOBILE #", +// fontSize: 13, +// fontWeight: FontWeight.bold, +// color: Colors.black, +// ), +// Texts( +// widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber, +// fontSize: 13, +// fontWeight: FontWeight.normal, +// color: Colors.black, +// ), +// ], +// ), +// Column( +// crossAxisAlignment: CrossAxisAlignment.end, +// children: [ +// Texts( +// TranslationBase.of(context).language, +// fontSize: 13, +// fontWeight: FontWeight.bold, +// color: Colors.black, +// ), +// Texts( +// widget.model.lacumInformation!.prefLang == +// "2" +// ? TranslationBase.of(context).lanEnglish +// : TranslationBase.of(context).lanArabic, +// fontSize: 13, +// fontWeight: FontWeight.normal, +// color: Colors.black, +// ), +// ], +// ), +// ], +// ), +// ], +// ), +// ), +// ], +// ), +// ), +// widget.isLacumHomePage +// ? Container( +// decoration: BoxDecoration( +// shape: BoxShape.rectangle, +// borderRadius: BorderRadius.circular(4), +// border: Border.fromBorderSide(BorderSide( +// color: Colors.grey, +// width: 0.4, +// )), +// ), +// margin: EdgeInsets.symmetric(horizontal: 16), +// child: Stack( +// children: [ +// Image.asset( +// "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", +// fit: BoxFit.fill, +// width: widget.mediaQuery.size.width * 1.0, +// height: widget.mediaQuery.size.width * 1.0, +// ), +// Center( +// child: Container( +// margin: EdgeInsets.fromLTRB(5, 70, 5, 4), +// child: widget.model.convertBase64ToBarCodeImage() != +// null +// ? Image.memory( +// widget.model.convertBase64ToBarCodeImage(), +// fit: BoxFit.fill, +// height: 100.0, +// width: 180.0 +// ) +// : Container(), +// ), +// ), +// ], +// ), +// ) +// : Container(), +// ], +// ), widget.isLacumHomePage ? Positioned( bottom: 1, diff --git a/lib/pages/pharmacies/widgets/lakum-banner-widget.dart b/lib/pages/pharmacies/widgets/lakum-banner-widget.dart index f5d0d4d5..3fc5d14b 100644 --- a/lib/pages/pharmacies/widgets/lakum-banner-widget.dart +++ b/lib/pages/pharmacies/widgets/lakum-banner-widget.dart @@ -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/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart'; @@ -24,225 +24,225 @@ class _LakumBannerWidgetState extends State { return Container( child: Stack( children: [ - CarouselSlider( - options: CarouselOptions( - enableInfiniteScroll: false, - enlargeCenterPage: false, - viewportFraction: 1.0, - scrollPhysics: widget.isLacumHomePage - ? ScrollPhysics() - : NeverScrollableScrollPhysics(), - initialPage: 0, - onPageChanged: (index, reason) { - setState(() { - _current = index; - }); - }, - ), - items: [ - Container( - decoration: BoxDecoration( - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(4), - border: Border.fromBorderSide(BorderSide( - color: Colors.grey, - width: 0.4, - )), - ), - margin: EdgeInsets.symmetric(horizontal: 16), - child: Stack( - children: [ - Image.asset( - "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", - fit: BoxFit.fill, - width: widget.mediaQuery.size.width * 1.0, - height: widget.mediaQuery.size.width * 1.0, - ), - Container( - margin: EdgeInsets.fromLTRB(12, 70, 12, 4), - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName, - fontSize: 14, - fontWeight: FontWeight.bold, - color: Colors.black, - ), - Texts( - "${widget.model.lacumInformation!.yahalaAccountNo}", - fontSize: 16, - fontWeight: FontWeight.normal, - color: Colors.black, - ), - ], - ), - BorderedButton( - widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountStatus == "Active" - ? TranslationBase.of(context).active - : TranslationBase.of(context).inactive, - textColor: widget.model.lacumInformation! - .accountStatus! == - 1 - ? Colors.green - : Colors.red, - hasBorder: true, - borderColor: widget.model.lacumInformation! - .accountStatus == - 1 - ? Colors.green - : Colors.red, - radius: 16, - rPadding: 16, - icon: widget.model.lacumInformation! - .accountStatus == - 1 - ? Icon( - Icons.check_circle, - size: 25, - color: Colors.green, - ) - : Image.asset( - "assets/images/pharmacy_module/lakum/inactive_cross.png", - fit: BoxFit.fill, - width: 25, - height: 25, - ), - ), - ], - ), - SizedBox( - height: 10, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - "IDENTIFICATION #", - fontSize: 14, - fontWeight: FontWeight.bold, - color: Colors.black, - ), - Texts( - widget.model.lacumInformation! - .identificationNo, - fontSize: 16, - fontWeight: FontWeight.normal, - color: Colors.black, - ), - ], - ), - Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Texts( - "MEMBER SINCE", - fontSize: 14, - fontWeight: FontWeight.bold, - color: Colors.black, - ), - Texts( - widget.model.formatCreatedDateToString(), - fontSize: 16, - fontWeight: FontWeight.normal, - color: Colors.black, - ), - ], - ), - ], - ), - SizedBox( - height: 10, - ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Texts( - "MOBILE #", - fontSize: 14, - fontWeight: FontWeight.bold, - color: Colors.black, - ), - Texts( - widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber, - fontSize: 16, - fontWeight: FontWeight.normal, - color: Colors.black, - ), - ], - ), - Column( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - Texts( - TranslationBase.of(context).language, - fontSize: 14, - fontWeight: FontWeight.bold, - color: Colors.black, - ), - Texts( - widget.model.lacumInformation!.prefLang == - "1" - ? TranslationBase.of(context).lanEnglish - : TranslationBase.of(context).lanArabic, - fontSize: 16, - fontWeight: FontWeight.normal, - color: Colors.black, - ), - ], - ), - ], - ), - ], - ), - ), - ], - ), - ), - widget.isLacumHomePage - ? Container( - decoration: BoxDecoration( - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(4), - border: Border.fromBorderSide(BorderSide( - color: Colors.grey, - width: 0.4, - )), - ), - margin: EdgeInsets.symmetric(horizontal: 16), - child: Stack( - children: [ - Image.asset( - "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", - fit: BoxFit.fill, - width: widget.mediaQuery.size.width * 1.0, - height: widget.mediaQuery.size.width * 1.0, - ), - Container( - margin: EdgeInsets.fromLTRB(12, 70, 12, 4), - child: widget.model.convertBase64ToBarCodeImage() != - null - ? Image.memory( - widget.model.convertBase64ToBarCodeImage()) - : Container(), - ), - ], - ), - ) - : Container(), - ], - ), + // CarouselSlider( + // options: CarouselOptions( + // enableInfiniteScroll: false, + // enlargeCenterPage: false, + // viewportFraction: 1.0, + // scrollPhysics: widget.isLacumHomePage + // ? ScrollPhysics() + // : NeverScrollableScrollPhysics(), + // initialPage: 0, + // onPageChanged: (index, reason) { + // setState(() { + // _current = index; + // }); + // }, + // ), + // items: [ + // Container( + // decoration: BoxDecoration( + // shape: BoxShape.rectangle, + // borderRadius: BorderRadius.circular(4), + // border: Border.fromBorderSide(BorderSide( + // color: Colors.grey, + // width: 0.4, + // )), + // ), + // margin: EdgeInsets.symmetric(horizontal: 16), + // child: Stack( + // children: [ + // Image.asset( + // "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", + // fit: BoxFit.fill, + // width: widget.mediaQuery.size.width * 1.0, + // height: widget.mediaQuery.size.width * 1.0, + // ), + // Container( + // margin: EdgeInsets.fromLTRB(12, 70, 12, 4), + // child: Column( + // children: [ + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Texts( + // widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.memberName, + // fontSize: 14, + // fontWeight: FontWeight.bold, + // color: Colors.black, + // ), + // Texts( + // "${widget.model.lacumInformation!.yahalaAccountNo}", + // fontSize: 16, + // fontWeight: FontWeight.normal, + // color: Colors.black, + // ), + // ], + // ), + // BorderedButton( + // widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.accountStatus == "Active" + // ? TranslationBase.of(context).active + // : TranslationBase.of(context).inactive, + // textColor: widget.model.lacumInformation! + // .accountStatus! == + // 1 + // ? Colors.green + // : Colors.red, + // hasBorder: true, + // borderColor: widget.model.lacumInformation! + // .accountStatus == + // 1 + // ? Colors.green + // : Colors.red, + // radius: 16, + // rPadding: 16, + // icon: widget.model.lacumInformation! + // .accountStatus == + // 1 + // ? Icon( + // Icons.check_circle, + // size: 25, + // color: Colors.green, + // ) + // : Image.asset( + // "assets/images/pharmacy_module/lakum/inactive_cross.png", + // fit: BoxFit.fill, + // width: 25, + // height: 25, + // ), + // ), + // ], + // ), + // SizedBox( + // height: 10, + // ), + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Texts( + // "IDENTIFICATION #", + // fontSize: 14, + // fontWeight: FontWeight.bold, + // color: Colors.black, + // ), + // Texts( + // widget.model.lacumInformation! + // .identificationNo, + // fontSize: 16, + // fontWeight: FontWeight.normal, + // color: Colors.black, + // ), + // ], + // ), + // Column( + // crossAxisAlignment: CrossAxisAlignment.end, + // children: [ + // Texts( + // "MEMBER SINCE", + // fontSize: 14, + // fontWeight: FontWeight.bold, + // color: Colors.black, + // ), + // Texts( + // widget.model.formatCreatedDateToString(), + // fontSize: 16, + // fontWeight: FontWeight.normal, + // color: Colors.black, + // ), + // ], + // ), + // ], + // ), + // SizedBox( + // height: 10, + // ), + // Row( + // mainAxisAlignment: MainAxisAlignment.spaceBetween, + // children: [ + // Column( + // crossAxisAlignment: CrossAxisAlignment.start, + // children: [ + // Texts( + // "MOBILE #", + // fontSize: 14, + // fontWeight: FontWeight.bold, + // color: Colors.black, + // ), + // Texts( + // widget.model.lacumGroupInformation!.lakumInquiryInformationObjVersion!.mobileNumber, + // fontSize: 16, + // fontWeight: FontWeight.normal, + // color: Colors.black, + // ), + // ], + // ), + // Column( + // crossAxisAlignment: CrossAxisAlignment.end, + // children: [ + // Texts( + // TranslationBase.of(context).language, + // fontSize: 14, + // fontWeight: FontWeight.bold, + // color: Colors.black, + // ), + // Texts( + // widget.model.lacumInformation!.prefLang == + // "1" + // ? TranslationBase.of(context).lanEnglish + // : TranslationBase.of(context).lanArabic, + // fontSize: 16, + // fontWeight: FontWeight.normal, + // color: Colors.black, + // ), + // ], + // ), + // ], + // ), + // ], + // ), + // ), + // ], + // ), + // ), + // widget.isLacumHomePage + // ? Container( + // decoration: BoxDecoration( + // shape: BoxShape.rectangle, + // borderRadius: BorderRadius.circular(4), + // border: Border.fromBorderSide(BorderSide( + // color: Colors.grey, + // width: 0.4, + // )), + // ), + // margin: EdgeInsets.symmetric(horizontal: 16), + // child: Stack( + // children: [ + // Image.asset( + // "assets/images/pharmacy_module/lakum/lakum_card_front_bg.png", + // fit: BoxFit.fill, + // width: widget.mediaQuery.size.width * 1.0, + // height: widget.mediaQuery.size.width * 1.0, + // ), + // Container( + // margin: EdgeInsets.fromLTRB(12, 70, 12, 4), + // child: widget.model.convertBase64ToBarCodeImage() != + // null + // ? Image.memory( + // widget.model.convertBase64ToBarCodeImage()) + // : Container(), + // ), + // ], + // ), + // ) + // : Container(), + // ], + // ), widget.isLacumHomePage ? Positioned( bottom: 1, diff --git a/lib/services/authentication/auth_provider.dart b/lib/services/authentication/auth_provider.dart index f19bb7f5..1a61ecca 100644 --- a/lib/services/authentication/auth_provider.dart +++ b/lib/services/authentication/auth_provider.dart @@ -33,48 +33,35 @@ enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED } AppSharedPreferences sharedPref = AppSharedPreferences(); AppGlobal appGlobal = AppGlobal(); -const String INSERT_DEVICE_IMEI = - 'Services/Patients.svc/REST/Patient_INSERTDeviceIMEI'; -const String SELECT_DEVICE_IMEI = - 'Services/Patients.svc/REST/Patient_SELECTDeviceIMEIbyIMEI'; -const String CHECK_PATIENT_AUTH = - 'Services/Authentication.svc/REST/CheckPatientAuthentication'; +const String INSERT_DEVICE_IMEI = 'Services/Patients.svc/REST/Patient_INSERTDeviceIMEI'; +const String SELECT_DEVICE_IMEI = '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 SEND_ACTIVATION_CODE = - 'Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationType'; +const SEND_ACTIVATION_CODE = 'Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationType'; -const SEND_ACTIVATION_CODE_REGISTER = - 'Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationTypeForRegistration'; -const CHECK_ACTIVATION_CODE = - 'Services/Authentication.svc/REST/CheckActivationCode'; -const CHECK_ACTIVATION_CODE_REGISTER = - 'Services/Authentication.svc/REST/CheckActivationCodeForRegistration'; +const SEND_ACTIVATION_CODE_REGISTER = 'Services/Authentication.svc/REST/SendActivationCodebyOTPNotificationTypeForRegistration'; +const CHECK_ACTIVATION_CODE = 'Services/Authentication.svc/REST/CheckActivationCode'; +const CHECK_ACTIVATION_CODE_REGISTER = 'Services/Authentication.svc/REST/CheckActivationCodeForRegistration'; -const FORGOT_PASSWORD = - 'Services/Authentication.svc/REST/CheckActivationCodeForSendFileNo'; -const CHECK_PATIENT_FOR_REGISTRATION = - "Services/Authentication.svc/REST/CheckPatientForRegisteration"; +const FORGOT_PASSWORD = 'Services/Authentication.svc/REST/CheckActivationCodeForSendFileNo'; +const CHECK_PATIENT_FOR_REGISTRATION = "Services/Authentication.svc/REST/CheckPatientForRegisteration"; const CHECK_USER_STATUS = "Services/NHIC.svc/REST/GetPatientInfo"; const REGISTER_USER = 'Services/Authentication.svc/REST/PatientRegistration'; -const LOGGED_IN_USER_URL = - 'Services/MobileNotifications.svc/REST/Insert_PatientMobileDeviceInfo'; +const LOGGED_IN_USER_URL = 'Services/MobileNotifications.svc/REST/Insert_PatientMobileDeviceInfo'; -const FORGOT_PATIENT_ID = - 'Services/Authentication.svc/REST/SendPatientIDSMSByMobileNumber'; +const FORGOT_PATIENT_ID = 'Services/Authentication.svc/REST/SendPatientIDSMSByMobileNumber'; const DASHBOARD = 'Services/Patients.svc/REST/PatientDashboard'; const PROFILE_SETTING = 'Services/Patients.svc/REST/GetPateintInfoForUpdate'; const SAVE_SETTING = 'Services/Patients.svc/REST/UpdatePateintInfo'; -const DEACTIVATE_ACCOUNT = - 'Services/Patients.svc/REST/PatientAppleActivation_InsertUpdate'; +const DEACTIVATE_ACCOUNT = 'Services/Patients.svc/REST/PatientAppleActivation_InsertUpdate'; class AuthProvider with ChangeNotifier { bool isLogin = false; bool isLoading = true; dynamic authenticatedUser; - AuthenticatedUserObject authenticatedUserObject = - locator(); + AuthenticatedUserObject authenticatedUserObject = locator(); var languageID; AuthProvider() { @@ -130,17 +117,14 @@ class AuthProvider with ChangeNotifier { var lastLogin = lstLogin; //await sharedPref.getInt( // LAST_LOGIN); //this.cs.sharedService.getStorage(AuthenticationService.LAST_LOGIN); //this.cs.sharedService.getSharedData(AuthenticationService.LAST_LOGIN, false); - var request = - AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); + var request = AuthenticatedUser.fromJson(await sharedPref.getObject(USER_PROFILE)); var newRequest = INSERTDeviceIMEIRequest(); var imei = await sharedPref.getString(PUSH_TOKEN); // if (!request.) { newRequest.iMEI = imei; //imei!=null ? imei : ''; - newRequest.firstName = - request.firstName ?? "" + " " + request.lastName! ?? ""; - newRequest.firstNameN = - request.firstNameN ?? "" + " " + request.lastNameN! ?? ""; + newRequest.firstName = request.firstName ?? "" + " " + request.lastName! ?? ""; + newRequest.firstNameN = request.firstNameN ?? "" + " " + request.lastNameN! ?? ""; newRequest.lastNameN = request.lastNameN ?? ""; newRequest.outSA = request.outSA == 1 ? true : false; newRequest.biometricEnabled = false; @@ -155,8 +139,7 @@ class AuthProvider with ChangeNotifier { newRequest.tokenID = await sharedPref.getString(TOKEN); // } - await new BaseAppClient().post(INSERT_DEVICE_IMEI, - onSuccess: (dynamic response, int statusCode) { + await new BaseAppClient().post(INSERT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) { localRes = response; }, onFailure: (String error, int statusCode) { throw error; @@ -168,8 +151,8 @@ class AuthProvider with ChangeNotifier { } } - Future selectDeviceImei(imei, - {int languageID = 1}) async { + Future selectDeviceImei(imei, {int languageID = 1}) async { + SelectDeviceIMEIRES? selectDeviceIMEIRES; try { // SelectDeviceIMEIRES? localRes; print(imei); @@ -177,21 +160,15 @@ class AuthProvider with ChangeNotifier { request['IMEI'] = imei; request['LanguageID'] = languageID; - await BaseAppClient().post(SELECT_DEVICE_IMEI, - onSuccess: (dynamic response, int statusCode) async { + await BaseAppClient().post(SELECT_DEVICE_IMEI, onSuccess: (dynamic response, int statusCode) async { // localRes = Map(); - print( - "Here response: ${response['Patient_SELECTDeviceIMEIbyIMEIList'][0]}"); + print("Here response: ${response['Patient_SELECTDeviceIMEIbyIMEIList'][0]}"); if (response['Patient_SELECTDeviceIMEIbyIMEIList'][0] != null) { - - sharedPref.setObject( - IMEI_USER_DATA, - SelectDeviceIMEIRES.fromJson( - response['Patient_SELECTDeviceIMEIbyIMEIList'][0])); - return SelectDeviceIMEIRES.fromJson( - response['Patient_SELECTDeviceIMEIbyIMEIList'][0]); + selectDeviceIMEIRES = SelectDeviceIMEIRES.fromJson(response['Patient_SELECTDeviceIMEIbyIMEIList'][0]); + sharedPref.setObject(IMEI_USER_DATA, selectDeviceIMEIRES); } else { print("ELSE TRIGERRED!!!!!!!!!"); + selectDeviceIMEIRES = null; } // await new BaseAppClient().post(SELECT_DEVICE_IMEI, // onSuccess: (dynamic response, int statusCode) { @@ -207,21 +184,19 @@ class AuthProvider with ChangeNotifier { print("in the error"); // return Future.error(error); } + return Future.value(selectDeviceIMEIRES); } - Future checkPatientAuthentication( - CheckPatientAuthenticationReq request) async { + Future checkPatientAuthentication(CheckPatientAuthenticationReq request) async { request.versionID = VERSION_ID; request.channel = CHANNEL; request.iPAdress = IP_ADDRESS; request.generalid = GENERAL_ID; request.languageID = (languageID == 'ar' ? 1 : 2); - request.patientOutSA = - (request.zipCode == '966' || request.zipCode == '+966') ? 0 : 1; + request.patientOutSA = (request.zipCode == '966' || request.zipCode == '+966') ? 0 : 1; try { dynamic localRes; - await new BaseAppClient().post(CHECK_PATIENT_AUTH, - onSuccess: (dynamic response, int statusCode) { + await new BaseAppClient().post(CHECK_PATIENT_AUTH, onSuccess: (dynamic response, int statusCode) { localRes = response; }, onFailure: (String error, int statusCode) { throw error; @@ -245,8 +220,7 @@ class AuthProvider with ChangeNotifier { // request.patientTypeID = request.patientType; // request.patientType = request.patientType; dynamic localRes; - await new BaseAppClient().post(GET_MOBILE_INFO, - onSuccess: (dynamic response, int statusCode) { + await new BaseAppClient().post(GET_MOBILE_INFO, onSuccess: (dynamic response, int statusCode) { localRes = response; }, onFailure: (String error, int statusCode) { throw error; @@ -266,8 +240,7 @@ class AuthProvider with ChangeNotifier { request.isDentalAllowedBackend = false; dynamic localRes; - await new BaseAppClient().post(SEND_ACTIVATION_CODE, - onSuccess: (dynamic response, int statusCode) { + await new BaseAppClient().post(SEND_ACTIVATION_CODE, onSuccess: (dynamic response, int statusCode) { localRes = response; authenticatedUser = CheckActivationCode.fromJson(localRes); }, onFailure: (String error, int statusCode) { @@ -287,8 +260,7 @@ class AuthProvider with ChangeNotifier { request.isDentalAllowedBackend = false; dynamic localRes; - await new BaseAppClient().post(SEND_ACTIVATION_CODE_REGISTER, - onSuccess: (dynamic response, int statusCode) { + await new BaseAppClient().post(SEND_ACTIVATION_CODE_REGISTER, onSuccess: (dynamic response, int statusCode) { localRes = response; authenticatedUser = CheckActivationCode.fromJson(localRes); }, onFailure: (String error, int statusCode) { @@ -311,13 +283,11 @@ class AuthProvider with ChangeNotifier { neRequest.projectOutSA = neRequest.zipCode == '966' ? false : true; neRequest.isDentalAllowedBackend = false; // neRequest.deviceToken = null; - neRequest.forRegisteration = - neRequest.isRegister != null ? neRequest.isRegister : false; + neRequest.forRegisteration = neRequest.isRegister != null ? neRequest.isRegister : false; neRequest.isRegister = false; dynamic localRes; try { - await new BaseAppClient().post(CHECK_ACTIVATION_CODE, - onSuccess: (dynamic response, int statusCode) { + await new BaseAppClient().post(CHECK_ACTIVATION_CODE, onSuccess: (dynamic response, int statusCode) { localRes = response; //CheckActivationCode.fromJson(); }, onFailure: (String error, int statusCode) { localRes = error; @@ -345,13 +315,11 @@ class AuthProvider with ChangeNotifier { neRequest.projectOutSA = neRequest.zipCode == '966' ? false : true; neRequest.isDentalAllowedBackend = false; // neRequest.deviceToken = null; - neRequest.forRegisteration = - neRequest.isRegister != null ? neRequest.isRegister : false; + neRequest.forRegisteration = neRequest.isRegister != null ? neRequest.isRegister : false; neRequest.isRegister = false; dynamic localRes; try { - await new BaseAppClient().post(CHECK_ACTIVATION_CODE_REGISTER, - onSuccess: (dynamic response, int statusCode) { + await new BaseAppClient().post(CHECK_ACTIVATION_CODE_REGISTER, onSuccess: (dynamic response, int statusCode) { localRes = response; //CheckActivationCode.fromJson(); }, onFailure: (String error, int statusCode) { localRes = error; @@ -371,8 +339,7 @@ class AuthProvider with ChangeNotifier { return authenticatedUser; } - Future checkPatientForRegisteration( - CheckPatientForRegistration request) async { + Future checkPatientForRegisteration(CheckPatientForRegistration request) async { request.versionID = VERSION_ID; request.channel = CHANNEL; request.iPAdress = IP_ADDRESS; @@ -383,8 +350,7 @@ class AuthProvider with ChangeNotifier { // request.tokenID = ''; dynamic localRes; try { - await new BaseAppClient().post(CHECK_PATIENT_FOR_REGISTRATION, - onSuccess: (dynamic response, int statusCode) { + await new BaseAppClient().post(CHECK_PATIENT_FOR_REGISTRATION, onSuccess: (dynamic response, int statusCode) { localRes = response; }, onFailure: (String error, int statusCode) { localRes = error; @@ -407,8 +373,7 @@ class AuthProvider with ChangeNotifier { // request.tokenID = ''; dynamic localRes; try { - await new BaseAppClient().post(CHECK_USER_STATUS, - onSuccess: (dynamic response, int statusCode) { + await new BaseAppClient().post(CHECK_USER_STATUS, onSuccess: (dynamic response, int statusCode) { localRes = response; }, onFailure: (String error, int statusCode) { localRes = error; @@ -434,9 +399,7 @@ class AuthProvider with ChangeNotifier { final DateFormat dateFormat = DateFormat('MM/dd/yyyy'); final DateFormat dateFormat2 = DateFormat('dd/MM/yyyy'); if (nhic != null) { - requestN.dob = nhic['IsHijri'] - ? nhic['DateOfBirth'] - : dateFormat2.format(dateFormat.parse(nhic['DateOfBirth'])); + requestN.dob = nhic['IsHijri'] ? nhic['DateOfBirth'] : dateFormat2.format(dateFormat.parse(nhic['DateOfBirth'])); requestN.isHijri = nhic['IsHijri'] ? 1 : 0; requestN.healthId = requestN.patientobject!.eHealthIDField!; } @@ -447,8 +410,7 @@ class AuthProvider with ChangeNotifier { dynamic localRes; try { - await new BaseAppClient().post(REGISTER_USER, - onSuccess: (dynamic response, int statusCode) { + await new BaseAppClient().post(REGISTER_USER, onSuccess: (dynamic response, int statusCode) { localRes = response; }, onFailure: (String error, int statusCode) { localRes = error; @@ -460,23 +422,17 @@ class AuthProvider with ChangeNotifier { } } - Future registeredAuthenticatedUser( - AuthenticatedUser user, deviceToken, lat, long) async { + Future registeredAuthenticatedUser(AuthenticatedUser user, deviceToken, lat, long) async { var request = new RegisteredAuthenticatedUserRequest(); request.deviceToken = deviceToken; - request.voipToken = - ""; //this.cs.sharedService.getSharedData(AuthenticationService.APNS_TOKEN, false); + request.voipToken = ""; //this.cs.sharedService.getSharedData(AuthenticationService.APNS_TOKEN, false); request.deviceType = Platform.isIOS ? "1" : "2"; - request.patientMobileNumber = user.mobileNumber![0] == '0' - ? user.mobileNumber - : '0' + user.mobileNumber!; + request.patientMobileNumber = user.mobileNumber![0] == '0' ? user.mobileNumber : '0' + user.mobileNumber!; request.nationalID = user.patientIdentificationNo; request.gender = user.gender; request.patientID = user.patientID; request.patientOutSA = user.outSA; - request.loginType = await sharedPref.getInt(LAST_LOGIN) != null - ? await sharedPref.getInt(LAST_LOGIN) - : 1; + request.loginType = await sharedPref.getInt(LAST_LOGIN) != null ? await sharedPref.getInt(LAST_LOGIN) : 1; request.mACAddress = '00:00:00:00:00:00'; request.latitude = lat; request.longitude = long; @@ -485,8 +441,7 @@ class AuthProvider with ChangeNotifier { request.patientType = user.patientType; dynamic localRes; try { - await new BaseAppClient().post(LOGGED_IN_USER_URL, - onSuccess: (dynamic response, int statusCode) { + await new BaseAppClient().post(LOGGED_IN_USER_URL, onSuccess: (dynamic response, int statusCode) { localRes = response; }, onFailure: (String error, int statusCode) { localRes = error; @@ -512,8 +467,7 @@ class AuthProvider with ChangeNotifier { dynamic localRes; - await new BaseAppClient().post(FORGOT_PATIENT_ID, - onSuccess: (response, statusCode) async { + await new BaseAppClient().post(FORGOT_PATIENT_ID, onSuccess: (response, statusCode) async { localRes = response; }, onFailure: (String error, int statusCode) { throw error; @@ -531,8 +485,7 @@ class AuthProvider with ChangeNotifier { dynamic localRes; try { - await new BaseAppClient().post(FORGOT_PASSWORD, - onSuccess: (dynamic response, int statusCode) { + await new BaseAppClient().post(FORGOT_PASSWORD, onSuccess: (dynamic response, int statusCode) { localRes = response; //CheckActivationCode.fromJson(); }, onFailure: (String error, int statusCode) { localRes = error; @@ -551,8 +504,7 @@ class AuthProvider with ChangeNotifier { dynamic localRes; try { - await new BaseAppClient().post(DASHBOARD, - onSuccess: (dynamic response, int statusCode) { + await new BaseAppClient().post(DASHBOARD, onSuccess: (dynamic response, int statusCode) { localRes = response; //CheckActivationCode.fromJson(); }, onFailure: (String error, int statusCode) { localRes = error; @@ -569,8 +521,7 @@ class AuthProvider with ChangeNotifier { getSettings() async { dynamic localRes; try { - await new BaseAppClient().post(PROFILE_SETTING, - onSuccess: (dynamic response, int statusCode) { + await new BaseAppClient().post(PROFILE_SETTING, onSuccess: (dynamic response, int statusCode) { localRes = response; }, onFailure: (String error, int statusCode) { localRes = error; @@ -585,8 +536,7 @@ class AuthProvider with ChangeNotifier { Future saveSettings(request) async { dynamic localRes; try { - await new BaseAppClient().post(SAVE_SETTING, - onSuccess: (dynamic response, int statusCode) { + await new BaseAppClient().post(SAVE_SETTING, onSuccess: (dynamic response, int statusCode) { localRes = response; }, onFailure: (String error, int statusCode) { localRes = error; @@ -601,8 +551,7 @@ class AuthProvider with ChangeNotifier { Future deactivateAccount(request, bool isLogin) async { dynamic localRes; try { - await new BaseAppClient().post(DEACTIVATE_ACCOUNT, - onSuccess: (dynamic response, int statusCode) { + await new BaseAppClient().post(DEACTIVATE_ACCOUNT, onSuccess: (dynamic response, int statusCode) { localRes = response; }, onFailure: (String error, int statusCode) { localRes = error; @@ -618,8 +567,7 @@ class AuthProvider with ChangeNotifier { Future activateAccount(request) async { dynamic localRes; try { - await new BaseAppClient().post(DEACTIVATE_ACCOUNT, - onSuccess: (dynamic response, int statusCode) { + await new BaseAppClient().post(DEACTIVATE_ACCOUNT, onSuccess: (dynamic response, int statusCode) { localRes = response; }, onFailure: (String error, int statusCode) { localRes = error; @@ -636,10 +584,8 @@ class AuthProvider with ChangeNotifier { await sharedPref.remove(LOGIN_TOKEN_ID); await sharedPref.remove(PHARMACY_CUSTOMER_ID); await authenticatedUserObject.getUser(); - Provider.of(AppGlobal.context, listen: false).isLogin = - false; - var model = - Provider.of(AppGlobal.context, listen: false); + Provider.of(AppGlobal.context, listen: false).isLogin = false; + var model = Provider.of(AppGlobal.context, listen: false); model.setState(0, 0, false, null); Navigator.of(AppGlobal.context).pushReplacementNamed(HOME); } diff --git a/lib/services/livecare_services/livecare_provider.dart b/lib/services/livecare_services/livecare_provider.dart index de74cac1..7610b969 100644 --- a/lib/services/livecare_services/livecare_provider.dart +++ b/lib/services/livecare_services/livecare_provider.dart @@ -214,7 +214,8 @@ class LiveCareService extends BaseService { 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) { print(value); deviceToken = value; diff --git a/lib/uitl/push-notification-handler.dart b/lib/uitl/push-notification-handler.dart index eb5f3754..843bda38 100644 --- a/lib/uitl/push-notification-handler.dart +++ b/lib/uitl/push-notification-handler.dart @@ -21,8 +21,8 @@ import 'package:firebase_messaging/firebase_messaging.dart' as fir; import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.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/call_state_type.dart'; +// import 'package:flutter_ios_voip_kit/flutter_ios_voip_kit.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:get_it/get_it.dart'; import 'package:huawei_hmsavailability/huawei_hmsavailability.dart'; @@ -180,7 +180,7 @@ class PushNotificationHandler { late HmsApiAvailability hmsApiAvailability; - final voIPKit = FlutterIOSVoIPKit.instance; + // final voIPKit = FlutterIOSVoIPKit.instance; late Timer timeOutTimer; bool isTalking = false; @@ -211,73 +211,73 @@ class PushNotificationHandler { static PushNotificationHandler getInstance() => _instance; - void _timeOut({ - int seconds = 30, - }) async { - timeOutTimer = Timer(Duration(seconds: seconds), () async { - print('🎈 example: timeOut'); - final incomingCallerName = await voIPKit.getIncomingCallerName(); - voIPKit.unansweredIncomingCall( - skipLocalNotification: false, - missedCallTitle: '📞 Missed call', - missedCallBody: 'There was a call from $incomingCallerName', - ); - }); - } + // void _timeOut({ + // int seconds = 30, + // }) async { + // timeOutTimer = Timer(Duration(seconds: seconds), () async { + // print('🎈 example: timeOut'); + // final incomingCallerName = await voIPKit.getIncomingCallerName(); + // voIPKit.unansweredIncomingCall( + // skipLocalNotification: false, + // missedCallTitle: '📞 Missed call', + // missedCallBody: 'There was a call from $incomingCallerName', + // ); + // }); + // } init(BuildContext context) async { this.context = context; if (Platform.isIOS) { - voIPKit.getVoIPToken().then((value) { - print("APNS VOIP KIT TOKEN: $value"); - AppSharedPreferences().setString(APNS_TOKEN, value!); - }); - - voIPKit.onDidUpdatePushToken = (String token) { - print('🎈 example: onDidUpdatePushToken: $token'); - }; - - voIPKit.onDidReceiveIncomingPush = ( - Map payload, - ) async { - print('🎈 example: onDidReceiveIncomingPush $payload'); - _timeOut(); - }; - - voIPKit.onDidRejectIncomingCall = ( - String uuid, - String callerId, - ) async { - try { - print('🎈 example: onDidRejectIncomingCall $uuid - $callerId'); - timeOutTimer.cancel(); - } catch (err) {} - }; - - voIPKit.onDidAcceptIncomingCall = ( - String uuid, - String callerId, - ) async { - print('🎈 example: onDidAcceptIncomingCall $uuid - $callerId'); - await voIPKit.acceptIncomingCall(callerState: CallStateType.calling); - await voIPKit.callConnected(); - await Future.delayed(Duration(seconds: 1)); - - Navigator.pushNamed( - locator().navigatorKey.currentContext!, - "zoom_call_page", - arguments: CallArguments("hoover-dam", "123", "Patient", "40", "1", false), - ); - - await voIPKit.endCall(); - - // Navigator.pushNamed(navigatorKey.currentContext!, VIDEO_CALL_SCREEN, - // arguments: VideoArgus( - // reservationId: int.parse(callerId), token: null, isVideo: true)); - - timeOutTimer.cancel(); - }; + // voIPKit.getVoIPToken().then((value) { + // print("APNS VOIP KIT TOKEN: $value"); + // AppSharedPreferences().setString(APNS_TOKEN, value!); + // }); + // + // voIPKit.onDidUpdatePushToken = (String token) { + // print('🎈 example: onDidUpdatePushToken: $token'); + // }; + // + // voIPKit.onDidReceiveIncomingPush = ( + // Map payload, + // ) async { + // print('🎈 example: onDidReceiveIncomingPush $payload'); + // _timeOut(); + // }; + // + // voIPKit.onDidRejectIncomingCall = ( + // String uuid, + // String callerId, + // ) async { + // try { + // print('🎈 example: onDidRejectIncomingCall $uuid - $callerId'); + // timeOutTimer.cancel(); + // } catch (err) {} + // }; + // + // voIPKit.onDidAcceptIncomingCall = ( + // String uuid, + // String callerId, + // ) async { + // print('🎈 example: onDidAcceptIncomingCall $uuid - $callerId'); + // await voIPKit.acceptIncomingCall(callerState: CallStateType.calling); + // await voIPKit.callConnected(); + // await Future.delayed(Duration(seconds: 1)); + // + // Navigator.pushNamed( + // locator().navigatorKey.currentContext!, + // "zoom_call_page", + // arguments: CallArguments("hoover-dam", "123", "Patient", "40", "1", false), + // ); + // + // await voIPKit.endCall(); + // + // // Navigator.pushNamed(navigatorKey.currentContext!, VIDEO_CALL_SCREEN, + // // arguments: VideoArgus( + // // reservationId: int.parse(callerId), token: null, isVideo: true)); + // + // timeOutTimer.cancel(); + // }; } if (Platform.isAndroid) { diff --git a/lib/widgets/in_app_browser/InAppBrowser.dart b/lib/widgets/in_app_browser/InAppBrowser.dart index f3adce2c..50b2ce20 100644 --- a/lib/widgets/in_app_browser/InAppBrowser.dart +++ b/lib/widgets/in_app_browser/InAppBrowser.dart @@ -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 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 diff --git a/lib/widgets/loadings/ShimmerLoading.dart b/lib/widgets/loadings/ShimmerLoading.dart index 678c24cd..5eed7922 100644 --- a/lib/widgets/loadings/ShimmerLoading.dart +++ b/lib/widgets/loadings/ShimmerLoading.dart @@ -3,7 +3,7 @@ import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:shimmer/shimmer.dart'; +// import 'package:shimmer/shimmer.dart'; class ShimmerLoadingWidget extends StatefulWidget { Future Function()? onPreProccess; @@ -46,7 +46,7 @@ class _ShimmerLoadingWidgetState extends State { case ConnectionState.active: break; 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; case ConnectionState.done: widget = super.widget.realWidget!(); diff --git a/lib/widgets/offers_packages/offers_packages.dart b/lib/widgets/offers_packages/offers_packages.dart index c55c1e79..73cac199 100644 --- a/lib/widgets/offers_packages/offers_packages.dart +++ b/lib/widgets/offers_packages/offers_packages.dart @@ -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/OffersProductsRequestModel.dart'; import 'package:diplomaticquarterapp/core/service/packages_offers/PackagesOffersServices.dart'; @@ -32,20 +32,20 @@ class _OffersAndPackagesWidgetState extends State { @override Widget build(BuildContext context) { // TODO: implement build - var option = CarouselOptions( - height: HEIGHT, - aspectRatio: 16 / 9, - viewportFraction: 1, - initialPage: 0, - enableInfiniteScroll: true, - reverse: false, - autoPlay: true, - autoPlayInterval: Duration(seconds: AUTO_SLIDE_INTERVAL), - autoPlayAnimationDuration: Duration(milliseconds: ANIMATION_DURATION), - autoPlayCurve: Curves.fastOutSlowIn, - enlargeCenterPage: true, - scrollDirection: Axis.horizontal, - ); + // var option = CarouselOptions( + // height: HEIGHT, + // aspectRatio: 16 / 9, + // viewportFraction: 1, + // initialPage: 0, + // enableInfiniteScroll: true, + // reverse: false, + // autoPlay: true, + // autoPlayInterval: Duration(seconds: AUTO_SLIDE_INTERVAL), + // autoPlayAnimationDuration: Duration(milliseconds: ANIMATION_DURATION), + // autoPlayCurve: Curves.fastOutSlowIn, + // enlargeCenterPage: true, + // scrollDirection: Axis.horizontal, + // ); // return Container( // height: HEIGHT, @@ -102,13 +102,13 @@ class _OffersAndPackagesWidgetState extends State { realWidget: () { if (widget.models.isNotEmpty) { return Container( - child: CarouselSlider.builder( - itemCount: widget.models.length, - itemBuilder: (BuildContext context, int itemIndex,int realIndex) { - var item = widget.models[itemIndex]; - return OfferPackagesItemWidget(model: item); - }, - options: option), + // child: CarouselSlider.builder( + // itemCount: widget.models.length, + // itemBuilder: (BuildContext context, int itemIndex,int realIndex) { + // var item = widget.models[itemIndex]; + // return OfferPackagesItemWidget(model: item); + // }, + // options: option), ); } else { return Container(); diff --git a/pepk.jar b/pepk.jar new file mode 100644 index 00000000..5ffdd4c8 Binary files /dev/null and b/pepk.jar differ diff --git a/pubspec.yaml b/pubspec.yaml index 1c48b1f5..126f3c6d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: diplomaticquarterapp description: A new Flutter application. -version: 4.5.73+1 +version: 4.5.054+4050054 environment: sdk: ">=3.0.0 <3.13.0" @@ -51,7 +51,7 @@ dependencies: pull_to_refresh: ^2.0.0 # Native - local_auth: ^2.2.0 + local_auth: ^2.1.7 localstorage: ^4.0.0+1 maps_launcher: ^2.0.1 url_launcher: ^6.0.15 @@ -143,18 +143,18 @@ dependencies: #geofencing: any speech_to_text: ^6.1.1 - #in_app_update: ^4.2.2 + in_app_update: ^4.2.2 in_app_review: ^2.0.3 badges: ^3.1.2 flutter_app_icon_badge: ^2.0.0 - dropdown_search: 5.0.6 +# dropdown_search: 5.0.6 youtube_player_flutter: ^8.1.2 - shimmer: ^3.0.0 +# shimmer: ^3.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_location: ^6.11.0+301 share_plus: ^6.3.4 @@ -163,7 +163,7 @@ dependencies: equatable: ^2.0.3 wave: ^0.2.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 open_filex: ^4.3.2 path_provider: ^2.0.8