merge-requests/599/merge
haroon amjad 4 years ago
parent 9057a96d7f
commit 1faf27959a

@ -350,6 +350,9 @@ var INSERT_LIVECARE_SCHEDULE_APPOINTMENT =
var GET_PATIENT_SHARE_LIVECARE =
"Services/Doctors.svc/REST/GetCheckinScreenAppointmentDetailsByAppointmentNOForLiveCare";
var SET_ONLINE_CHECKIN_FOR_APPOINTMENT =
"Services/Patients.svc/REST/SetOnlineCheckInForAppointment";
var GET_LIVECARE_CLINIC_TIMING =
'Services/ER_VirtualCall.svc/REST/PatientER_GetClinicsServiceTimingsSchedule';

@ -1812,5 +1812,6 @@ const Map localizedValues = {
"bluetoothPermission": { "en": "Dr. Al Habib app needs to access Bluetooth permission to connect blood pressure & blood sugar devices with the app to analyze the data", "ar": "يحتاج تطبيق دكتور الحبيب إلى الوصول إلى البلوتوث لربط أجهزة ضغط الدم وسكر الدم بالتطبيق لتحليل البيانات وتحميلها على ملفك الطبي حتى يتمكن الطبيب من الاطلاع عليها." },
"privacyPolicy": {"en": "Privacy Policy", "ar": "سياسة الخصوصية"},
"termsConditions": {"en": "Terms & Conditions", "ar": "الأحكام والشروط"},
"liveCarePermissions": {"en": "LiveCare required Camera & Microphone permissions, Please allow these to proceed.", "ar": "يتطلب لايف كير أذونات الكاميرا والميكروفون ، يرجى السماح لها بالمتابعة."},
"prescriptionDeliveryError": {"en": "This clinic does not support refill & delivery.", "ar": "هذه العيادة لا تدعم إعادة التعبئة والتسليم."},
"liveCarePermissions": {"en": "LiveCare required Camera & Microphone permissions, Please allow these to proceed.", "ar": "هذه العيادة لا تدعم خدمة إعادة التعبئة والتسليم."},
};

@ -132,7 +132,7 @@ class BaseAppClient {
// body['IdentificationNo'] = 2076117163;
// body['MobileNo'] = "966503109207";
// body['PatientID'] = 3569409; //3844083
// body['PatientID'] = 50121262; //3844083
// body['TokenID'] = "@dm!n";
// Patient ID: 3027574

@ -1,7 +1,6 @@
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
@ -52,12 +51,18 @@ class _IdealBodyState extends State<IdealBody> {
List<PopupMenuItem> _heightPopupList = List();
List<PopupMenuItem> _weightPopupList = List();
void calculateIdealWeight() {
heightInches = int.parse(_heightController.text) * .39370078740157477;
heightFeet = heightInches / 12;
idealWeight = (50 + 2.3 * (heightInches - 60));
var height = int.parse(_heightController.text);
var weight = double.parse(_weightController.text);
var inchesVal = ((height) * .39370078740157477);
var meters = height / 100;
var feetVal = (inchesVal / 12).floor().round();
inchesVal = (inchesVal % 12).roundToDouble();
var kgValue = (weight * 2.2).floor();
var heightFeet = feetVal;
var heightInches = inchesVal;
weight = kgValue.floorToDouble();
var idealWeight = (((((heightFeet * 12) + heightInches) - 60) * 6) + 106);
if (dropdownValue == TranslationBase.of(context).smallFinger) {
idealWeight = idealWeight - 10;
} else if (dropdownValue == TranslationBase.of(context).mediumFinger) {
@ -65,18 +70,22 @@ class _IdealBodyState extends State<IdealBody> {
} else if (dropdownValue == TranslationBase.of(context).largeFinger) {
idealWeight = idealWeight + 10;
}
maxIdealWeight = (((idealWeight) * 1.1).round() * 100) / 100;
overWeightBy = weight - maxIdealWeight.roundToDouble();
minRange = ((idealWeight / 1.1) * 10).round() / 10;
maxRange = maxIdealWeight;
idealWeight = idealWeight;
var maxIdealWeight = (((idealWeight).floorToDouble() * 1.1) * 100).round() / 100;
var overWeightBy = ((weight - double.parse(maxIdealWeight.toString())) * 100).round() / 100;
var difference = (((overWeightBy / 2.2) * 100) / 100).round(); //+ Loc.healthCalPage.IBWKg; Loc.healthCalPage.IBWRange
var minRange = ((idealWeight / 2.2) * 10).round() / 10;
var maxRange = ((maxIdealWeight / 2.2) * 100).round() / 100; //+ //Loc.healthCalPage.IBWKg;
idealWeight = weight / idealWeight;
idealWeight = (idealWeight * 100).round() / 100;
this.overWeightBy = overWeightBy;
this.minRange = minRange;
this.maxRange = maxIdealWeight;
this.idealWeight = idealWeight;
}
@override
Widget build(BuildContext context) {
if(dropdownValue==null)
dropdownValue=TranslationBase.of(context).mediumFinger;
if (dropdownValue == null) dropdownValue = TranslationBase.of(context).mediumFinger;
_weightPopupList = <PopupMenuItem>[PopupMenuItem(child: Text(TranslationBase.of(context).kg), value: true), PopupMenuItem(child: Text(TranslationBase.of(context).lb), value: false)];
_heightPopupList = <PopupMenuItem>[PopupMenuItem(child: Text(TranslationBase.of(context).cm), value: true), PopupMenuItem(child: Text(TranslationBase.of(context).ft), value: false)];
@ -200,7 +209,8 @@ class _IdealBodyState extends State<IdealBody> {
child: DropdownButtonHideUnderline(
child: DropdownButton<String>(
value: dropdownValue,
icon: Icon(Icons.arrow_downward), key: clinicDropdownKey,
icon: Icon(Icons.arrow_downward),
key: clinicDropdownKey,
iconSize: 0,
elevation: 16,
isExpanded: true,
@ -500,5 +510,3 @@ class CommonDropDownView extends StatelessWidget {
);
}
}

@ -5,7 +5,6 @@ import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -33,7 +32,6 @@ class IdealBodyResult extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: const EdgeInsets.all(20.0),
child: Column(
@ -60,7 +58,7 @@ class IdealBodyResult extends StatelessWidget {
Padding(
padding: EdgeInsets.only(top: 8.0, left: 4.0),
child: Text(
" "+TranslationBase.of(context).kg+" ",
" " + TranslationBase.of(context).kg + " ",
style: TextStyle(color: Colors.red),
),
),
@ -74,13 +72,13 @@ class IdealBodyResult extends StatelessWidget {
Row(
children: [
Texts(
mixRange.toStringAsFixed(1),
(mixRange / 2.2).toStringAsFixed(1),
fontSize: 30.0,
),
Padding(
padding: EdgeInsets.only(top: 8.0, left: 4.0),
child: Text(
" "+TranslationBase.of(context).kg+" ",
" " + TranslationBase.of(context).kg + " ",
style: TextStyle(color: Colors.red),
),
),
@ -93,7 +91,7 @@ class IdealBodyResult extends StatelessWidget {
? Column(
children: [
Texts(
TranslationBase.of(context).currentWeightPerfect,
TranslationBase.of(context).currentWeightPerfect,
fontSize: 20.0,
),
],
@ -108,7 +106,6 @@ class IdealBodyResult extends StatelessWidget {
)
: overWeightBy >= 18
? Container(
child: Column(
children: [
Texts(
@ -117,13 +114,21 @@ class IdealBodyResult extends StatelessWidget {
SizedBox(
height: 12.0,
),
Text(
overWeightBy.toStringAsFixed(1),
style: TextStyle(
fontSize: 17,
fontWeight: FontWeight.bold,
letterSpacing: -1.34,
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Texts(
(overWeightBy / 2.2).toStringAsFixed(1),
fontSize: 30.0,
),
Padding(
padding: EdgeInsets.only(top: 8.0, left: 4.0),
child: Text(
" " + TranslationBase.of(context).kg + " ",
style: TextStyle(color: Colors.red),
),
),
],
),
SizedBox(
height: 12.0,
@ -139,7 +144,7 @@ class IdealBodyResult extends StatelessWidget {
Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
TranslationBase.of(context).underWeight,
TranslationBase.of(context).underWeight,
fontSize: 18.0,
),
),
@ -157,7 +162,6 @@ class IdealBodyResult extends StatelessWidget {
],
)
: Container(
child: Column(
children: [
Text(

@ -47,6 +47,17 @@ class _BookSuccessState extends State<BookSuccess> {
ProjectViewModel projectViewModel;
@override
initState() {
WidgetsBinding.instance.addPostFrameCallback((_) async {
if (widget.patientShareResponse.isLiveCareAppointment &&
(widget.patientShareResponse.patientShareWithTax.toString() == "0" || widget.patientShareResponse.patientShareWithTax.toString() == "0.0")) {
setOnlineCheckInForAppointment();
}
});
super.initState();
}
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of<ProjectViewModel>(context);
@ -403,6 +414,24 @@ class _BookSuccessState extends State<BookSuccess> {
return Container();
}
setOnlineCheckInForAppointment() {
DoctorsListService service = new DoctorsListService();
service.setOnlineCheckInForAppointment(widget.patientShareResponse.appointmentNo.toString(), widget.patientShareResponse.projectID, context).then((res) {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.clinicID = widget.docObject.clinicID;
appo.projectID = widget.docObject.projectID;
appo.appointmentNo = widget.patientShareResponse.appointmentNo;
appo.serviceID = widget.patientShareResponse.serviceID;
appo.isLiveCareAppointment = widget.patientShareResponse.isLiveCareAppointment;
appo.doctorID = widget.patientShareResponse.doctorID;
insertLiveCareVIDARequest(appo, isMoveHome: false);
}).catchError((err) {
// GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
confirmAppointment(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
@ -425,14 +454,13 @@ class _BookSuccessState extends State<BookSuccess> {
});
}
insertLiveCareVIDARequest(AppoitmentAllHistoryResultList appo) {
insertLiveCareVIDARequest(AppoitmentAllHistoryResultList appo, {bool isMoveHome = true}) {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service.insertVIDARequest(appo.appointmentNo, appo.clinicID, appo.projectID, appo.serviceID, appo.doctorID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
navigateToHome(context);
if (isMoveHome) navigateToHome(context);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}

@ -22,7 +22,7 @@ Future<Map<Permission, PermissionStatus>> requestPermissions() async {
showReminderDialog(BuildContext context, DateTime dateTime, String doctorName, String eventId, String appoDateFormatted, String appoTimeFormatted,
{Function onSuccess, String title, String description, Function(int) onMultiDateSuccess}) async {
if (Platform.isAndroid) {
if (await PermissionService.isCameraEnabled()) {
if (await PermissionService.isCalendarPermissionEnabled()) {
_showReminderDialog(context, dateTime, doctorName, eventId, appoDateFormatted, appoTimeFormatted,
onSuccess: onSuccess, title: title, description: description, onMultiDateSuccess: onMultiDateSuccess);
} else {

@ -1,3 +1,6 @@
import 'dart:collection';
import 'package:device_calendar/device_calendar.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
@ -11,6 +14,7 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/SchedulePage.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -94,23 +98,30 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
children: <Widget>[
DoctorHeader(
headerModel: HeaderModel(
widget.appo.doctorTitle + " " + widget.appo.doctorNameObj,
widget.appo.doctorID,
widget.appo.doctorImageURL,
widget.appo.doctorSpeciality,
"",
widget.appo.projectName,
DateUtil.convertStringToDate(widget.appo.appointmentDate),
widget.appo.startTime.substring(0, 5),
null,
widget.appo.doctorRate,
widget.appo.actualDoctorRate,
widget.appo.noOfPatientsRate,
"",
decimalDoctorRate: widget.appo.decimalDoctorRate.toString()
//model.user.emailAddress,
),
isNeedToShowButton: (widget.appo.clinicID == 17 || widget.appo.clinicID == 47 || widget.appo.clinicID == 23 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) ? false : true,
widget.appo.doctorTitle + " " + widget.appo.doctorNameObj,
widget.appo.doctorID,
widget.appo.doctorImageURL,
widget.appo.doctorSpeciality,
"",
widget.appo.projectName,
DateUtil.convertStringToDate(widget.appo.appointmentDate),
widget.appo.startTime.substring(0, 5),
null,
widget.appo.doctorRate,
widget.appo.actualDoctorRate,
widget.appo.noOfPatientsRate,
"",
decimalDoctorRate: widget.appo.decimalDoctorRate.toString()
//model.user.emailAddress,
),
isNeedToShowButton: (widget.appo.clinicID == 17 ||
widget.appo.clinicID == 47 ||
widget.appo.clinicID == 23 ||
widget.appo.clinicID == 265 ||
widget.appo.isExecludeDoctor ||
widget.appo.isLiveCareAppointment)
? false
: true,
buttonTitle: TranslationBase.of(context).schedule,
buttonIcon: 'assets/images/new/Boo_ Appointment.svg',
showConfirmMessageDialog: false,
@ -139,7 +150,12 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
onTap: (index) {
setState(() {
if (index == 1) {
if (widget.appo.clinicID == 17 || widget.appo.clinicID == 47 || widget.appo.clinicID == 23 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) {
if (widget.appo.clinicID == 17 ||
widget.appo.clinicID == 47 ||
widget.appo.clinicID == 23 ||
widget.appo.clinicID == 265 ||
widget.appo.isExecludeDoctor ||
widget.appo.isLiveCareAppointment) {
_tabController.index = _tabController.previousIndex;
AppointmentDetails.showFooterButton = false;
} else {
@ -150,7 +166,12 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
},
tabs: [
Tab(child: Text(TranslationBase.of(context).appoActions, style: TextStyle(color: Colors.black))),
widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.clinicID == 47 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment
widget.appo.clinicID == 17 ||
widget.appo.clinicID == 23 ||
widget.appo.clinicID == 47 ||
widget.appo.clinicID == 265 ||
widget.appo.isExecludeDoctor ||
widget.appo.isLiveCareAppointment
? Tab(
child: Text(TranslationBase.of(context).availableAppo, style: TextStyle(color: Colors.grey)),
)
@ -563,15 +584,31 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
});
}
checkIfHasReminder() async {
CalendarUtils calendarUtils = await CalendarUtils.getInstance();
DateTime startEventsDate = DateUtil.convertStringToDate(widget.appo.appointmentDate);
DateTime endEventsDate = DateUtil.convertStringToDate(widget.appo.appointmentDate);
RetrieveEventsParams params = new RetrieveEventsParams(startDate: startEventsDate, endDate: endEventsDate);
await calendarUtils.retrieveEvents(calendarUtils.calendars[0].id, params).then((value) {
Result<UnmodifiableListView<Event>> events = value;
events.data.forEach((element) {
if (element.title.contains(widget.appo.doctorNameObj)) calendarUtils.deleteEvent(calendarUtils.calendars[0], element);
});
});
}
cancelAppointment() {
ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.cancelAppointment(widget.appo, context).then((res) {
projectViewModel.analytics.appointment.appointment_details_cancel(appointment: widget.appo);
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
checkIfHasReminder();
getToDoCount();
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
Navigator.of(context).pop();

@ -113,7 +113,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
// utf8.encode("asD123@saereaccess_code=BsM6He4FMBaZ86W64kjZdevice_id=" + deviceID + "language=enmerchant_identifier=ipxnRXXqservice_command=SDK_TOKENasD123@saere"))
// .toString();
// print("signature: $output");
// PayfortPlugin.performPaymentRequest('ipxnRXXq', '099529edbf88418e92a0cb915eba0f3b', 'ahmed', 'en', 'haroon6138@mail.com', '10000', 'PURCHASE', 'SAR', '0' // 0 for test mode and 1 for production
// PayfortPlugin.performPaymentRequest('ipxnRXXq', '92f1dffb1abd43c8b60fe55bfeb10c73', 'haroon', 'en', 'haroon6138@mail.com', '100000', 'PURCHASE', 'SAR', '0' // 0 for test mode and 1 for production
// )
// .then((value) => {
// // value object contains payfort response, such card number, transaction reference, ...

@ -287,10 +287,16 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
if (_selected == 0) {
AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms);
} else {
askVideoCallPermission().then((value) {
askVideoCallPermission().then((value) async {
if (value) {
projectViewModel.analytics.liveCare.livecare_immediate_consultation_TnC(clinic: widget.clinicName);
Navigator.pop(context, true);
if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) {
await drawOverAppsMessageDialog(context).then((value) {
return false;
});
} else {
projectViewModel.analytics.liveCare.livecare_immediate_consultation_TnC(clinic: widget.clinicName);
Navigator.pop(context, true);
}
} else {
openPermissionsDialog();
}
@ -313,11 +319,6 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
if (!(await Permission.camera.request().isGranted) || !(await Permission.microphone.request().isGranted)) {
return false;
}
if (Platform.isAndroid && !(await PlatformBridge.shared().isDrawOverAppsPermissionAllowed())) {
await drawOverAppsMessageDialog(context).then((value) {
return false;
});
}
return true;
}

@ -122,7 +122,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
}
},
child: Container(
padding: EdgeInsets.only(left: 20, right: 20, bottom: 15, top: 28),
padding: EdgeInsets.only(left: 20, right: 20, bottom: 3, top: 28),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,

@ -7,6 +7,7 @@ import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_inp.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescription_details_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
@ -384,21 +385,23 @@ class PrescriptionItemsPage extends StatelessWidget {
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).resendOrder,
model.isMedDeliveryAllowed == false
? null
: () => {
Navigator.push(
context,
FadePage(
page: PrescriptionDeliveryAddressPage(
prescriptions: prescriptions,
prescriptionReportList: model.prescriptionReportList,
prescriptionReportEnhList: model.prescriptionReportEnhList,
),
),
)
},
color: Color(0xff359846),
() {
if (model.isMedDeliveryAllowed == false) {
AppToast.showErrorToast(message: TranslationBase.of(context).prescriptionDeliveryError);
} else {
Navigator.push(
context,
FadePage(
page: PrescriptionDeliveryAddressPage(
prescriptions: prescriptions,
prescriptionReportList: model.prescriptionReportList,
prescriptionReportEnhList: model.prescriptionReportEnhList,
),
),
);
}
},
color: model.isMedDeliveryAllowed == false ? Color(0xff575757) : Color(0xff359846),
disabledColor: Color(0xff575757),
),
),

@ -473,6 +473,28 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> setOnlineCheckInForAppointment(String appoID, int projectID, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
request = {
"ProjectID": projectID,
"AppointmentNo": appoID
};
dynamic localRes;
await baseAppClient.post(SET_ONLINE_CHECKIN_FOR_APPOINTMENT, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> getLiveCareAppointmentPatientShare(String appoID, int clinicID, int projectID, BuildContext context) async {
Map<String, dynamic> request;

@ -181,21 +181,12 @@ class PushNotificationHandler {
print('🎈 example: onDidRejectIncomingCall $uuid, $callerId');
voIPKit.endCall();
timeOutTimer?.cancel();
// setState(() {
// isTalking = false;
// });
};
voIPKit.onDidAcceptIncomingCall = (
String uuid,
String callerId,
) {
// print('🎈 example: isTalking $isTalking');
// if (isTalking) {
// return;
// }
print('🎈 example: onDidAcceptIncomingCall $uuid, $callerId');
String sessionID = callerId.split("*")[0];
@ -258,14 +249,12 @@ class PushNotificationHandler {
FirebaseMessaging.instance.getInitialMessage().then((RemoteMessage message) async {
print("Firebase getInitialMessage!!!");
// Utils.showPermissionConsentDialog(context, "getInitialMessage", (){});
subscribeFCMTopic();
if (Platform.isIOS)
await Future.delayed(Duration(milliseconds: 3000)).then((value) {
if (message != null) newMessage(message);
});
else
// if(message != null)
newMessage(message);
else if (message != null) newMessage(message);
});
FirebaseMessaging.onMessage.listen((RemoteMessage message) async {
@ -300,6 +289,13 @@ class PushNotificationHandler {
}
}
subscribeFCMTopic() async {
print("subscribeFCMTopic!!!");
await FirebaseMessaging.instance.unsubscribeFromTopic('all_hmg_patients').then((value) async {
await FirebaseMessaging.instance.subscribeToTopic('all_hmg_patients');
});
}
newMessage(RemoteMessage remoteMessage) async {
print("Remote Message: " + remoteMessage.data.toString());
if (remoteMessage.data['is_call'] == 'true' || remoteMessage.data['is_call'] == true) {

@ -2848,6 +2848,7 @@ class TranslationBase {
String get privacyPolicy => localizedValues["privacyPolicy"][locale.languageCode];
String get termsConditions => localizedValues["termsConditions"][locale.languageCode];
String get liveCarePermissions => localizedValues["liveCarePermissions"][locale.languageCode];
String get prescriptionDeliveryError => localizedValues["prescriptionDeliveryError"][locale.languageCode];
}

@ -148,6 +148,7 @@ class MyInAppBrowser extends InAppBrowser {
this.browser = browser;
await getPatientData();
if (paymentMethod == "ApplePay") {
getDeviceToken();
MyChromeSafariBrowser safariBrowser = new MyChromeSafariBrowser(new MyInAppBrowser(), onExitCallback: browser.onExit, onLoadStartCallback: this.browser.onLoadStart, appo: this.appo);
if (context != null) GifLoaderDialogUtils.showMyDialog(context);
@ -161,7 +162,7 @@ class MyInAppBrowser extends InAppBrowser {
applePayInsertRequest.customerEmail = emailId;
applePayInsertRequest.customerID = authenticatedUser.patientID;
applePayInsertRequest.customerName = authenticatedUser.firstName;
applePayInsertRequest.deviceToken = deviceToken;
applePayInsertRequest.deviceToken = await sharedPref.getString(PUSH_TOKEN);
applePayInsertRequest.doctorID = (doctorID != null && doctorID != "") ? doctorID : 0;
applePayInsertRequest.projectID = projId;
applePayInsertRequest.serviceID = servID;

@ -1,7 +1,7 @@
name: diplomaticquarterapp
description: A new Flutter application.
version: 4.4.92+404092
version: 4.4.94+404094
environment:
sdk: ">=2.7.0 <3.0.0"
@ -202,6 +202,8 @@ dependencies:
sms_otp_auto_verify: ^2.1.0
flutter_ios_voip_kit: ^0.0.5
payfort_plugin: ^0.3.1
dependency_overrides:
provider : ^5.0.0
permission_handler : ^6.0.1+1

Loading…
Cancel
Save