|
|
|
|
@ -339,19 +339,18 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(isCallFinished) {
|
|
|
|
|
// Navigator.push(context, MaterialPageRoute(
|
|
|
|
|
// builder: (BuildContext context) => EndCallScreen(patient:patient)));
|
|
|
|
|
var asd = "";
|
|
|
|
|
Navigator.push(context, MaterialPageRoute(
|
|
|
|
|
builder: (BuildContext context) => EndCallScreen(patient:patient)));
|
|
|
|
|
} else {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
// await model.startCall( isReCall : false, vCID: patient.vcId);
|
|
|
|
|
await model.startCall( isReCall : false, vCID: patient.vcId);
|
|
|
|
|
|
|
|
|
|
if(model.state == ViewState.ErrorLocal) {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
Helpers.showErrorToast(model.error);
|
|
|
|
|
} else {
|
|
|
|
|
await model.getDoctorProfile();
|
|
|
|
|
// patient.appointmentNo = model.startCallRes.appointmentNo;
|
|
|
|
|
patient.appointmentNo = model.startCallRes.appointmentNo;
|
|
|
|
|
patient.episodeNo = 0;
|
|
|
|
|
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
@ -360,53 +359,6 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// await VideoChannel.openVideoCallScreen(
|
|
|
|
|
// kToken: "T1==cGFydG5lcl9pZD00NzI0Nzk1NCZzaWc9NGIyZDljOTY3YjFiNWU1YzUzNzFmMjIyNjJmNmEzY2Y5NzZjOTdlYzpzZXNzaW9uX2lkPTFfTVg0ME56STBOemsxTkg1LU1UWXlNekEyTlRRMU9EVXhObjVrVFRoMFlVdFJXaXRYTWpadFZGZHFhSGxZVGpOdE1UVi1mZyZjcmVhdGVfdGltZT0xNjIzMDY1NDk1Jm5vbmNlPTAuMjM2Mjk0NTIwMTkyOTA4OTcmcm9sZT1wdWJsaXNoZXImZXhwaXJlX3RpbWU9MTYyNTY1NzQ5NCZpbml0aWFsX2xheW91dF9jbGFzc19saXN0PQ==",//model.startCallRes.openTokenID,
|
|
|
|
|
// kSessionId:"1_MX40NzI0Nzk1NH5-MTYyMzA2NTQ1ODUxNn5kTTh0YUtRWitXMjZtVFdqaHlYTjNtMTV-fg",// model.startCallRes.openSessionID,
|
|
|
|
|
// kApiKey: '47247954',//46209962
|
|
|
|
|
// vcId: patient.vcId,
|
|
|
|
|
// patientName: patient.fullName ?? (patient.firstName != null ? "${patient.firstName} ${patient.lastName}" : "-"),
|
|
|
|
|
// tokenID: await model.getToken(),
|
|
|
|
|
// generalId: GENERAL_ID,
|
|
|
|
|
// doctorId: model.doctorProfile.doctorID,
|
|
|
|
|
// onFailure: (String error) {
|
|
|
|
|
// DrAppToastMsg.showErrorToast(error);
|
|
|
|
|
// },onCallConnected: callConnected,
|
|
|
|
|
// onCallEnd: () {
|
|
|
|
|
// var asd="";
|
|
|
|
|
// WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
|
// GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
// model.endCall(patient.vcId, false,).then((value) {
|
|
|
|
|
// GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
// if (model.state == ViewState.ErrorLocal) {
|
|
|
|
|
// DrAppToastMsg.showErrorToast(model.error);
|
|
|
|
|
// }
|
|
|
|
|
// setState(() {
|
|
|
|
|
// isCallFinished = true;
|
|
|
|
|
// });
|
|
|
|
|
// });
|
|
|
|
|
// });
|
|
|
|
|
// Navigator.push(context, MaterialPageRoute(
|
|
|
|
|
// builder: (BuildContext context) =>
|
|
|
|
|
// EndCallScreen(patient:patient)));
|
|
|
|
|
// },
|
|
|
|
|
// onCallNotRespond: (SessionStatusModel sessionStatusModel) {
|
|
|
|
|
// var asd="";
|
|
|
|
|
// // WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
|
|
|
// // GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
// // model.endCall(patient.vcId, sessionStatusModel.sessionStatus == 3,).then((value) {
|
|
|
|
|
// // GifLoaderDialogUtils.hideDialog(context);
|
|
|
|
|
// // if (model.state == ViewState.ErrorLocal) {
|
|
|
|
|
// // DrAppToastMsg.showErrorToast(model.error);
|
|
|
|
|
// // }
|
|
|
|
|
// // setState(() {
|
|
|
|
|
// // isCallFinished = true;
|
|
|
|
|
// // });
|
|
|
|
|
// // });
|
|
|
|
|
// //
|
|
|
|
|
// // });
|
|
|
|
|
// });
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|