Ambulance request fixes

development_v2.5
haroon amjad 3 years ago
parent 106334c9cf
commit e03412214e

@ -39,5 +39,11 @@ end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |build_configuration|
build_configuration.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64 i386'
if build_configuration.build_settings['WRAPPER_EXTENSION'] == 'bundle'
build_configuration.build_settings['DEVELOPMENT_TEAM'] = '3A359E86ZF'
end
end
end
end
end

@ -182,7 +182,7 @@ const Map localizedValues = {
'passQRAppoAttend': {'en': 'Pass the QR code through the attendance devices available in the Hospital.', 'ar': 'تمرير الكود من خلال اجهزة تسجيل الحضور المتوفرة في الفرع.'},
'sitWaitingQR': {'en': 'Sit in the waiting rooms until called by the nurse.', 'ar': 'الجلوس في غرف الانتظار لحين منادتك من قبل الممرضة.'},
'attendRegisterCode': {'en': 'Attendance registration code', 'ar': 'رمز تسجيل الحضور'},
'scanQRHospital': {'en': 'Scan above QR Code to Check-In on the Machine in Hospital', 'ar': 'مسح فوق رمز الاستجابة السريعة للتحقق في الجهاز في المستشفى'},
'scanQRHospital': {'en': 'Approach the Online Check-In board in the hospital & scan via NFC to Check-In', 'ar': 'اقترب من لوحة تسجيل الوصول عبر الإنترنت في المستشفى وافحصها عبر NFC لتسجيل الوصول'},
"sendEmail": {"en": "Send Email", "ar": "ارسال نسخة"},
"success": {"en": "Done successfully", "ar": "تم تنفذ الطلب بنجاح"},
"EmailSentSuccessfully": {"en": "Email Sent Successfully", "ar": "تم إرسال البريد الإلكتروني بنجاح"},
@ -313,7 +313,7 @@ const Map localizedValues = {
},
"appointments": {"en": "Appointments", "ar": "مواعيد"},
"all2": {"en": "All", "ar": "الكل"},
"checkinOption": {"en": "Check-In Options", "ar": "تحقق في الخيارات"},
"checkinOption": {"en": "Check-In", "ar": "لتسجيل الحضور"},
"readBarcode": {"en": "Read Barcode", "ar": "قراءة الكود"},
"showMyPark": {"en": "Show My Park", "ar": "عرض الموقف"},
"clearMyData": {"en": "Clear My Data", "ar": "امسح البيانات"},
@ -1387,7 +1387,7 @@ const Map localizedValues = {
"en":
"The online check-in is for non-life threatening situation. Call the red crescent (number) or go to the nearest emergency department if there are: \n\nsigns of stroke or heart attack \nhistory of seizure or syncope \nthere is limb or life threatening injury \npicture of severe injuries",
"ar":
"تسجيل الذهاب الى الطوارئ عبر الإنترنت هو فقط للحالات التي لا تهدد الحياة يجب الاتصل بالهلال الأحمر (رقم) أو الذهاب إلى أقرب قسم طوارئ إذا كان هناك علامات السكتة الدماغية أو النوبة القلبية او هناك نوبة تشنج او حالة فقدان الوعي او وجود إصابة تهدد أحد الأطراف او تهدد الحياة او وجود إصابات خطيرة"
"تسجيل الذهاب الى الطوارئ عبر الإنترنت هو فقط للحالات التي لا تهدد الحياة يجب الاتصال بالهلال الأحمر (رقم) أو الذهاب إلى أقرب قسم طوارئ إذا كان هناك علامات السكتة الدماغية أو النوبة القلبية او هناك نوبة تشنج او حالة فقدان الوعي او وجود إصابة تهدد أحد الأطراف او تهدد الحياة او وجود إصابات خطيرة"
},
"MRN": {"en": "MRN", "ar": "رقم الملف الطبي"},
"appointment-date": {"en": "Appointment Date", "ar": "تاريخ الموعد"},

@ -481,7 +481,7 @@ class _AnicllaryOrdersState extends State<AnicllaryOrdersDetails> with SingleTic
));
}
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo, AnciallryOrdersViewModel model, [String selectedInstallmentPlan]) {
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo, AnciallryOrdersViewModel model, [String selectedInstallmentPlan]) {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
transID = Utils.getAdvancePaymentTransID(widget.projectID, projectViewModel.authenticatedUserObject.user.patientID);

@ -191,7 +191,7 @@ class ConfirmPaymentPage extends StatelessWidget {
return 'assets/images/new-design/mada.png';
}
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) {
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo) {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
browser.openPaymentBrowser(amount, "Advance Payment", Utils.getAdvancePaymentTransID(authenticatedUser.projectID, authenticatedUser.patientID), appo.projectID.toString(),

@ -23,6 +23,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
import 'QRCode.dart';
@ -569,7 +570,7 @@ class _BookSuccessState extends State<BookSuccess> {
});
}
openPayment(List<String> paymentMethod, AuthenticatedUser authenticatedUser, double amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async {
openPayment(List<String> paymentMethod, AuthenticatedUser authenticatedUser, num amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async {
widget.browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context);
selectedPaymentMethod = paymentMethod[0];
selectedInstallments = paymentMethod[1];
@ -586,7 +587,7 @@ class _BookSuccessState extends State<BookSuccess> {
authenticatedUser,
widget.browser,
widget.patientShareResponse.isLiveCareAppointment,
"2",
widget.patientShareResponse.serviceID.toString(),
"",
widget.patientShareResponse.appointmentDate,
widget.patientShareResponse.appointmentNo,

@ -3,7 +3,6 @@ import 'dart:typed_data';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
@ -22,6 +21,7 @@ import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_nfc_kit/flutter_nfc_kit.dart';
import 'package:flutter_svg/flutter_svg.dart';
class QRCode extends StatefulWidget {
PatientShareResponse patientShareResponse;
@ -52,6 +52,20 @@ class _QRCodeState extends State<QRCode> {
_supportsNFC = (value == NFCAvailability.available);
});
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
Future.delayed(const Duration(milliseconds: 500), () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment);
});
}, onCancel: () {
// Navigator.of(context).pop();
locator<GAnalytics>().todoList.to_do_list_nfc_cancel(widget.appointment);
});
});
});
super.initState();
}
@ -75,47 +89,47 @@ class _QRCodeState extends State<QRCode> {
child: Row(
children: [
Expanded(
flex: 1,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
child: Container(
margin: EdgeInsets.only(top: 30.0),
alignment: Alignment.center,
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
border: Border.all(color: Colors.black),
borderRadius: BorderRadius.circular(10),
),
child: Image.asset("assets/images/nfc/ic_nfc.png"),
),
onTap: () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment);
});
}, onCancel: (){
Navigator.of(context).pop();
locator<GAnalytics>().todoList.to_do_list_nfc_cancel(widget.appointment);
});
},
),
],
flex: 1,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
child: Container(
margin: EdgeInsets.only(top: 30.0),
alignment: Alignment.center,
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
border: Border.all(color: Colors.black),
borderRadius: BorderRadius.circular(10),
),
child: SvgPicture.asset("assets/images/nfc/contactless.svg"),
),
onTap: () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
locator<GAnalytics>().todoList.to_do_list_nfc(widget.appointment);
});
}, onCancel: () {
// Navigator.of(context).pop();
locator<GAnalytics>().todoList.to_do_list_nfc_cancel(widget.appointment);
});
},
),
Expanded(
flex: 1,
child: Container(
margin: EdgeInsets.only(top: 30.0),
alignment: Alignment.center,
child: Image.memory(
_bytes,
),
],
),
),
// Expanded(
// flex: 1,
// child: Container(
// margin: EdgeInsets.only(top: 30.0),
// alignment: Alignment.center,
// child: Image.memory(
// _bytes,
// ),
// ),
// ),
],
),
),
@ -126,22 +140,16 @@ class _QRCodeState extends State<QRCode> {
thickness: 0.8,
),
),
Container(
child: Row(
children: <Widget>[
Container(
margin: EdgeInsets.only(top: 10.0, left: 40.0, bottom: 10.0),
child: Image.asset("assets/images/new-design/device_icon.png", width: MediaQuery.of(context).size.width / 3.4, height: MediaQuery.of(context).size.width / 3.4),
),
Expanded(
child: Container(
width: double.infinity,
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(TranslationBase.of(context).scanQRHospital, style: TextStyle(color: Colors.red[700], fontSize: 18.0, fontWeight: FontWeight.bold)),
),
Row(
children: <Widget>[
Expanded(
child: Container(
width: double.infinity,
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(TranslationBase.of(context).scanQRHospital, style: TextStyle(color: Colors.red[700], fontSize: 18.0, fontWeight: FontWeight.bold)),
),
],
),
),
],
),
Container(
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0),

@ -214,7 +214,7 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
openPayment(widget.selectedPaymentMethod, authenticatedUser, double.parse(widget.patientShareResponse.patientShareWithTax.toString()), widget.patientShareResponse, appo);
}
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async {
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) async {
widget.browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context);
widget.browser.openPaymentBrowser(

@ -81,7 +81,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (widget.patientER_RC.transportationDetails.direction == 1)
if (widget.patientER_RC.transportationDetails.direction == 0)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -346,7 +346,7 @@ class _PickupLocationState extends State<PickupLocation> {
),
],
),
if (widget.patientER_RC.transportationDetails.direction == 0)
if (widget.patientER_RC.transportationDetails.direction == 1)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -501,12 +501,12 @@ class _PickupLocationState extends State<PickupLocation> {
else
setState(() {
widget.patientER_RC.transportationDetails.pickupSpot = _isInsideHome ? 1 : 0;
if (widget.patientER_RC.transportationDetails.direction == 0) { // From Hospital
if (widget.patientER_RC.transportationDetails.direction == 0) { // To Hospital
widget.patientER_RC.transportationDetails.dropoffLatitude = _result.lat.toStringAsFixed(6);
widget.patientER_RC.transportationDetails.dropoffLongitude = _result.long.toStringAsFixed(6);
widget.patientER_RC.transportationDetails.pickupLatitude = _selectedHospital.latitude;
widget.patientER_RC.transportationDetails.pickupLongitude = _selectedHospital.longitude;
} else { // To Hospital
} else { // From Hospital
widget.patientER_RC.transportationDetails.pickupLatitude = _selectedHospital.latitude;
widget.patientER_RC.transportationDetails.pickupLongitude = _selectedHospital.longitude;
widget.patientER_RC.transportationDetails.dropoffLatitude = _result.lat.toStringAsFixed(6);
@ -518,20 +518,22 @@ class _PickupLocationState extends State<PickupLocation> {
// widget.patientER.longitude =
// widget.patientER.pickupLocationLongitude;
widget.patientER_RC.transportationDetails.dropoffLocationName = widget.patientER.direction == 0 ? _result.formattedAddress : _selectedHospital.name;
widget.patientER_RC.transportationDetails.dropoffLocationName = widget.patientER_RC.transportationDetails.direction == 1 ? _result.formattedAddress : _selectedHospital.name;
// widget.patientER_RC.crea =
// widget.amRequestViewModel.user.patientID;
widget.patientER_RC.patientOutSA = widget.amRequestViewModel.user.outSA == 0 ? true : false;
widget.patientER_RC.patientOutSa = widget.amRequestViewModel.user.outSA;
// widget.patientER_RC.patientOutSA = widget.amRequestViewModel.user.outSA == 0 ? false : true;
// widget.patientER_RC.patientOutSa = widget.amRequestViewModel.user.outSA;
widget.patientER_RC.patientIdentificationID = widget.amRequestViewModel.user.patientIdentificationNo;
widget.patientER_RC.transportationDetails.pickupDateTime = DateUtil.convertDateToStringLocation(DateTime.now());
widget.patientER_RC.transportationDetails.pickupLocationName = widget.patientER.direction == 0 ? _selectedHospital.name : _result.formattedAddress;
widget.patientER_RC.transportationDetails.pickupLocationName = widget.patientER_RC.transportationDetails.direction == 1 ? _selectedHospital.name : _result.formattedAddress;
widget.patientER_RC.projectID = widget.amRequestViewModel.user.projectID;
widget.patientER_RC.patientID = widget.amRequestViewModel.user.patientID;
widget.patientER_RC.transportationDetails.requesterIsOutSA = false;
// widget.patientER.lineItemNo = 0;
widget.patientER_RC.transportationDetails.requesterMobileNo = widget.amRequestViewModel.user.mobileNumber;
widget.patientER_RC.transportationDetails.requesterFileNo = widget.amRequestViewModel.user.patientID;
if (_haveAppointment == HaveAppointment.YES) {
widget.patientER_RC.transportationDetails.appointmentNo = myAppointment.appointmentNo.toString();

@ -336,7 +336,7 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
// widget.changeCurrentTab(1);
// widget.patientER_RC.transportationDetails.id = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
widget.patientER_RC.transportationDetails.direction = _direction == Direction.ToHospital ? 1 : 0;
widget.patientER_RC.transportationDetails.direction = _direction == Direction.ToHospital ? 0 : 1;
widget.patientER_RC.transportationDetails.tripType = _way == Way.TwoWays ? 0 : 1;
widget.patientER_RC.transportationDetails.ambulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
widget.patientER_RC.transportationDetails.transportationType = _erTransportationMethod.iD.toString();

@ -164,7 +164,7 @@ class _EdPaymentInformationPageState extends State<EdPaymentInformationPage> {
);
}
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) {
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo) {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
transID = Utils.getAdvancePaymentTransID(widget.selectedHospital.iD, projectViewModel.user.patientID);
browser.openPaymentBrowser(amount, "ER Online Check-In", transID, appo.projectID.toString(), authenticatedUser.emailAddress, paymentMethod, authenticatedUser.patientType,

@ -53,13 +53,14 @@ class _ErOptionsState extends State<ErOptions> {
children: [
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: AmbulanceReq()));
if (projectViewModel.havePrivilege(63)) Navigator.push(context, FadePage(page: AmbulanceReq()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).ambulancerequest,
imagePath: 'assets/images/new-design/AM.PNG',
subTitle: TranslationBase.of(context).requestA,
isPngImage: true,
isEnable: projectViewModel.havePrivilege(63),
),
),
InkWell(

@ -51,6 +51,7 @@ class OrderLogPage extends StatelessWidget {
child: amRequestViewModel.patientAmbulanceRequestOrdersList.length > 0
? ListView.builder(
padding: EdgeInsets.all(21),
reverse: true,
itemCount: amRequestViewModel.patientAmbulanceRequestOrdersList.length,
itemBuilder: (context, index) {
AmbulanceRequestOrdersModel order = amRequestViewModel.patientAmbulanceRequestOrdersList[index];

@ -30,19 +30,19 @@ class BookedButtonsAllowCheckIn {
{
"title": TranslationBase.of(AppGlobal.context).add,
"subtitle": TranslationBase.of(AppGlobal.context).reminder,
"icon": "assets/images/new-design/reminder_icon.png",
"icon": "reminder_icon.png",
"caller": "addReminder",
},
{
"title": TranslationBase.of(AppGlobal.context).hospital,
"subtitle": TranslationBase.of(AppGlobal.context).location,
"icon": "assets/images/new-design/location_icon.png",
"icon": "location_icon.png",
"caller": "navigateToProject",
},
{
"title": TranslationBase.of(AppGlobal.context).online,
"subtitle": TranslationBase.of(AppGlobal.context).payment,
"icon": "assets/images/new-design/check-in.png",
"icon": "check-in.png",
"caller": "goToTodoList",
}
];

@ -24,7 +24,7 @@ class ConfirmedButtonsAllowCheckIn {
{
"title": TranslationBase.of(AppGlobal.context).add,
"subtitle": TranslationBase.of(AppGlobal.context).reminder,
"icon": "assets/images/new-design/reminder_icon.png",
"icon": "reminder_icon.svg",
"caller": "addReminder",
},
{

@ -64,9 +64,6 @@ class _AppointmentActionsState extends State<AppointmentActions> {
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
ToDoCountProviderModel model = Provider.of<ToDoCountProviderModel>(context);
var size = MediaQuery.of(context).size;
final double itemHeight = projectViewModel.isArabic ? ((size.height - kToolbarHeight - 24) * 0.5) / 2 : ((size.height - kToolbarHeight - 24) * 0.45) / 2;
final double itemWidth = size.width / 2;
return GridView.builder(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, crossAxisSpacing: 13, mainAxisSpacing: 9),

@ -866,7 +866,7 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
projectViewModel.analytics.todoList.to_do_list_pay_now(appo);
}
openPayment(List<String> paymentMethod, AuthenticatedUser authenticatedUser, double amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) {
openPayment(List<String> paymentMethod, AuthenticatedUser authenticatedUser, num amount, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appo) {
widget.browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart, context: context);
widget.browser.openPaymentBrowser(

@ -672,6 +672,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
getOneSignalVOIPToken(String voipToken) {
LiveCareService service = new LiveCareService();
service.getOneSignalVOIPToken(voipToken, context).then((res) {
print("OneSignalID: $res");
AppSharedPreferences().setString(ONESIGNAL_APNS_TOKEN, res['id']);
}).catchError((err) {
print(err);

@ -24,7 +24,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:pay/pay.dart';
// import 'package:pay/pay.dart';
import 'package:provider/provider.dart';
import 'new_text_Field.dart';
@ -52,13 +52,13 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
String tamaraPaymentStatus;
String tamaraOrderID;
Pay _payClient;
// Pay _payClient;
@override
void initState() {
_payClient = Pay.withAssets([
'applepay.json',
]);
// _payClient = Pay.withAssets([
// 'applepay.json',
// ]);
super.initState();
}
@ -236,29 +236,29 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
);
}
startApplePay() {
ApplePayResponse applePayResponse;
var _paymentItems = [
PaymentItem(
label: 'Total',
amount: widget.advanceModel.amount,
status: PaymentItemStatus.final_price,
)
];
_payClient.userCanPay(PayProvider.apple_pay).then((value) async {
print(value);
final result = await _payClient.showPaymentSelector(
provider: PayProvider.apple_pay,
paymentItems: _paymentItems,
);
print(result);
applePayResponse = ApplePayResponse.fromJson(result);
callPayfortApplePayAPI(applePayResponse);
}).catchError((err) {
print(err);
});
}
// startApplePay() {
// ApplePayResponse applePayResponse;
// var _paymentItems = [
// PaymentItem(
// label: 'Total',
// amount: widget.advanceModel.amount,
// status: PaymentItemStatus.final_price,
// )
// ];
//
// _payClient.userCanPay(PayProvider.apple_pay).then((value) async {
// print(value);
// final result = await _payClient.showPaymentSelector(
// provider: PayProvider.apple_pay,
// paymentItems: _paymentItems,
// );
// print(result);
// applePayResponse = ApplePayResponse.fromJson(result);
// callPayfortApplePayAPI(applePayResponse);
// }).catchError((err) {
// print(err);
// });
// }
callPayfortApplePayAPI(ApplePayResponse applePayResponse) async {
DoctorsListService service = new DoctorsListService();
@ -347,7 +347,7 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
return 'assets/images/new-design/mada.png';
}
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) {
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, num amount, AppoitmentAllHistoryResultList appo) {
browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
transID = Utils.getAdvancePaymentTransID(widget.advanceModel.hospitalsModel.iD, int.parse(widget.advanceModel.fileNumber));

@ -3,30 +3,27 @@ import 'dart:async';
import 'package:diplomaticquarterapp/pages/conference/conference_button_bar.dart';
import 'package:diplomaticquarterapp/pages/conference/draggable_publisher.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:flutter_ios_voip_kit/flutter_ios_voip_kit.dart';
import 'OpenTokPlatformBridge.dart';
class OpenTokConnectCallPage extends StatefulWidget{
class OpenTokConnectCallPage extends StatefulWidget {
final String sessionId;
final String token;
final String apiKey;
OpenTokConnectCallPage({@required this.sessionId, @required this.token, @required this.apiKey});
@override
State<StatefulWidget> createState() => OpenTokState();
}
class OpenTokState extends State<OpenTokConnectCallPage>{
class OpenTokState extends State<OpenTokConnectCallPage> {
OpenTokPlatformBridge openTokPlatform;
OpenTokSDKState sdkState = OpenTokSDKState.LOGGED_OUT;
@ -37,17 +34,15 @@ class OpenTokState extends State<OpenTokConnectCallPage>{
var audioMute = false;
var videoMute = false;
final voIPKit = FlutterIOSVoIPKit.instance;
initOpenTok(){
initOpenTok() {
openTokPlatform = OpenTokPlatformBridge.init(
apiKey: widget.apiKey,
sessionID: widget.sessionId,
token: widget.token,
onStateChange: (state) {
setState(() => sdkState = state);
}
);
});
}
@override
@ -63,30 +58,33 @@ class OpenTokState extends State<OpenTokConnectCallPage>{
appBar: AppBar(
backgroundColor: Colors.transparent,
actions: [
TextButton(onPressed: (){
initOpenTok();
}, child: Icon(Icons.connect_without_contact_outlined, color: Colors.green,))
TextButton(
onPressed: () {
initOpenTok();
},
child: Icon(
Icons.connect_without_contact_outlined,
color: Colors.green,
))
],
),
body: Stack(
fit: StackFit.expand,
children: [
if(sdkState == OpenTokSDKState.LOGGED_IN)
...platformVideoViews(),
if(sdkState == OpenTokSDKState.LOGGED_OUT)
Center(child: Text("Logged Out"),),
if(sdkState == OpenTokSDKState.ERROR)
Center(child: Text("Error opening session"),),
if(sdkState == OpenTokSDKState.WAIT)
Center(child: CircularProgressIndicator(),),
if(sdkState == OpenTokSDKState.ON_CALL)
Container(),
if (sdkState == OpenTokSDKState.LOGGED_IN) ...platformVideoViews(),
if (sdkState == OpenTokSDKState.LOGGED_OUT)
Center(
child: Text("Logged Out"),
),
if (sdkState == OpenTokSDKState.ERROR)
Center(
child: Text("Error opening session"),
),
if (sdkState == OpenTokSDKState.WAIT)
Center(
child: CircularProgressIndicator(),
),
if (sdkState == OpenTokSDKState.ON_CALL) Container(),
ConferenceButtonBar(
audioEnabled: _audioButton.stream,
videoEnabled: _videoButton.stream,
@ -106,20 +104,17 @@ class OpenTokState extends State<OpenTokConnectCallPage>{
}
bool remoteVideoOnFull = true;
List<Widget> platformVideoViews(){
return [
SizedBox(
width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height,
child: remoteVideoOnFull ? remotePlatformVideoView() : localPlatformVideoView()
),
List<Widget> platformVideoViews() {
return [
SizedBox(width: MediaQuery.of(context).size.width, height: MediaQuery.of(context).size.height, child: remoteVideoOnFull ? remotePlatformVideoView() : localPlatformVideoView()),
DraggablePublisher(
onButtonBarHeight: ((double)async*{}(50)),
onButtonBarVisible: ((bool)async*{}(true)),
onButtonBarHeight: ((double) async* {}(50)),
onButtonBarVisible: ((bool) async* {}(true)),
availableScreenSize: MediaQuery.of(context).size,
child: InkWell(
child: (remoteVideoOnFull ? localPlatformVideoView() : remotePlatformVideoView()),
onTap: (){
onTap: () {
print('');
},
),
@ -127,93 +122,87 @@ class OpenTokState extends State<OpenTokConnectCallPage>{
];
}
Widget localPlatformVideoView(){
Widget localPlatformVideoView() {
return PlatformViewLink(
viewType: 'local-video-container', // custom platform-view-type
surfaceFactory:
(BuildContext context, PlatformViewController controller) {
return AndroidViewSurface(
controller: controller,
gestureRecognizers: const <Factory<OneSequenceGestureRecognizer>>{},
hitTestBehavior: PlatformViewHitTestBehavior.opaque,
);
},
onCreatePlatformView: (PlatformViewCreationParams params) {
return PlatformViewsService.initSurfaceAndroidView(
id: params.id,
viewType: 'local-video-container',
// custom platform-view-type,
layoutDirection: TextDirection.ltr,
creationParams: {},
creationParamsCodec: StandardMessageCodec(),
)
..addOnPlatformViewCreatedListener(params.onPlatformViewCreated)
..create();
},
);
viewType: 'local-video-container', // custom platform-view-type
surfaceFactory: (BuildContext context, PlatformViewController controller) {
return AndroidViewSurface(
controller: controller,
gestureRecognizers: const <Factory<OneSequenceGestureRecognizer>>{},
hitTestBehavior: PlatformViewHitTestBehavior.opaque,
);
},
onCreatePlatformView: (PlatformViewCreationParams params) {
return PlatformViewsService.initSurfaceAndroidView(
id: params.id,
viewType: 'local-video-container',
// custom platform-view-type,
layoutDirection: TextDirection.ltr,
creationParams: {},
creationParamsCodec: StandardMessageCodec(),
)
..addOnPlatformViewCreatedListener(params.onPlatformViewCreated)
..create();
},
);
}
Widget remotePlatformVideoView(){
Widget remotePlatformVideoView() {
return PlatformViewLink(
viewType: 'remote-video-container', // custom platform-view-type
surfaceFactory:
(BuildContext context, PlatformViewController controller) {
return AndroidViewSurface(
controller: controller,
gestureRecognizers: const <Factory<OneSequenceGestureRecognizer>>{},
hitTestBehavior: PlatformViewHitTestBehavior.opaque,
);
},
onCreatePlatformView: (PlatformViewCreationParams params) {
return PlatformViewsService.initSurfaceAndroidView(
id: params.id,
viewType: 'remote-video-container',
// custom platform-view-type,
layoutDirection: TextDirection.ltr,
creationParams: {},
creationParamsCodec: StandardMessageCodec(),
)
..addOnPlatformViewCreatedListener(params.onPlatformViewCreated)
..create();
},
);
viewType: 'remote-video-container', // custom platform-view-type
surfaceFactory: (BuildContext context, PlatformViewController controller) {
return AndroidViewSurface(
controller: controller,
gestureRecognizers: const <Factory<OneSequenceGestureRecognizer>>{},
hitTestBehavior: PlatformViewHitTestBehavior.opaque,
);
},
onCreatePlatformView: (PlatformViewCreationParams params) {
return PlatformViewsService.initSurfaceAndroidView(
id: params.id,
viewType: 'remote-video-container',
// custom platform-view-type,
layoutDirection: TextDirection.ltr,
creationParams: {},
creationParamsCodec: StandardMessageCodec(),
)
..addOnPlatformViewCreatedListener(params.onPlatformViewCreated)
..create();
},
);
}
_onAudioEnable() async{
_onAudioEnable() async {
await openTokPlatform.toggleAudio();
_audioButton.add(!audioMute);
}
_onVideoEnabled() async{
_onVideoEnabled() async {
await openTokPlatform.toggleVideo();
_videoButton.add(!videoMute);
}
_onSwitchCamera() async{
_onSwitchCamera() async {
await openTokPlatform.swapCamera();
}
Future<void> _onHangup() async {
print('onHangup');
await openTokPlatform.hangupCall();
voIPKit.endCall();
endCallAPI();
Navigator.of(context).pop();
}
void endCallAPI() {
LiveCareService service = new LiveCareService();
service.endCallAPI(widget.sessionId, 2, context).then((res) {
}).catchError((err) {
service.endCallAPI(widget.sessionId, 2, context).then((res) {}).catchError((err) {
print(err);
});
}
void _onShowBar() {
setState(() {
});
setState(() {});
_onButtonBarVisibleStreamController.add(true);
}
@ -227,5 +216,4 @@ class OpenTokState extends State<OpenTokConnectCallPage>{
});
_onButtonBarVisibleStreamController.add(false);
}
}
}

@ -36,13 +36,13 @@ 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 PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
// static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
// static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
// 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=';

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_nfc_kit/flutter_nfc_kit.dart';
import 'package:flutter_svg/flutter_svg.dart';
void showNfcReader(BuildContext context, {Function onNcfScan, VoidCallback onCancel}) {
showModalBottomSheet(
@ -40,7 +41,7 @@ class _NfcLayoutState extends State<NfcLayout> {
}
void readNFC() async {
FlutterNfcKit.poll(timeout: Duration(seconds: 10), androidPlatformSound: false, iosMultipleTagMessage: "Multiple tags found!").then((value) async {
FlutterNfcKit.poll(timeout: Duration(seconds: 10), androidPlatformSound: true, androidCheckNDEF: false, iosMultipleTagMessage: "Multiple tags found!").then((value) async {
setState(() {
_reading = true;
mainWidget = doneNfc();
@ -79,8 +80,8 @@ class _NfcLayoutState extends State<NfcLayout> {
SizedBox(
height: 30,
),
Image.asset(
"assets/images/nfc/ic_nfc.png",
SvgPicture.asset(
"assets/images/nfc/contactless.svg",
height: MediaQuery.of(context).size.width / 3,
),
SizedBox(

@ -11,7 +11,6 @@ import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
// import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart';
import 'package:geocoding/geocoding.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
@ -161,8 +160,8 @@ class _PickupLocationFromMapState extends State<PickupLocationFromMap> {
TranslationBase.of(context).next,
() {
LocationDetails locationDetails = new LocationDetails();
locationDetails.lat = latitude;
locationDetails.long = longitude;
locationDetails.lat = selectedPlace.geometry.location.lat;
locationDetails.long = selectedPlace.geometry.location.lng;
locationDetails.formattedAddress = selectedPlace.formattedAddress;
widget.onPick(locationDetails);
Navigator.of(context).pop();

@ -1,7 +1,7 @@
name: diplomaticquarterapp
description: A new Flutter application.
version: 4.4.998+4040998
version: 4.4.999+4040999
environment:
sdk: ">=2.7.0 <3.0.0"
@ -15,7 +15,8 @@ dependencies:
sdk: flutter
intl: ^0.17.0
# web view
webview_flutter: ^2.3.1
# webview_flutter: ^2.3.1
# http client
http: ^0.13.4
connectivity: ^3.0.6
@ -43,9 +44,6 @@ dependencies:
# Flutter Html View
flutter_html: ^2.2.1
#Apple Pay
pay: ^1.0.8
# Pagnation
pull_to_refresh: ^2.0.0
@ -70,7 +68,7 @@ dependencies:
cupertino_icons: ^1.0.0
# Image Attachments
image_picker: ^0.8.4+4
image_picker: ^0.8.5+3
#GIF image
flutter_gifimage: ^1.0.1
@ -91,7 +89,7 @@ dependencies:
google_maps_flutter: ^2.1.1
# Huawei
huawei_map: ^6.0.1+304
huawei_map: 6.0.1+304
huawei_push: ^5.3.0+304
# Qr code Scanner TODO fix it
@ -115,7 +113,7 @@ dependencies:
manage_calendar_events: ^2.0.1
#InAppBrowser
flutter_inappwebview: ^5.3.2
# flutter_inappwebview: ^5.3.2
#Circular progress bar for reverse timer
circular_countdown_timer: ^0.2.0
@ -146,7 +144,7 @@ dependencies:
jiffy: ^4.1.0
#Flutter WebRTC
flutter_webrtc: ^0.8.0
flutter_webrtc: ^0.9.7
screen_brightness: ^0.1.2
@ -210,6 +208,9 @@ dependency_overrides:
permission_handler : ^6.0.1+1
flutter_svg: ^1.0.0
firebase_messaging_platform_interface: 3.1.6
flutter_inappwebview:
git:
url: https://github.com/CodeEagle/flutter_inappwebview
dev_dependencies:

Loading…
Cancel
Save