Merge branch 'development_v3.3' into PatientApp_VIDA_Plus_3.3
# Conflicts: # lib/config/config.dart # lib/core/model/labs/request_send_lab_report_email.dart # lib/core/service/medical/ask_doctor_services.dart # lib/core/service/medical/labs_service.dart # lib/core/viewModels/medical/labs_view_model.dart # lib/pages/conference/web_rtc/call_home_page_.dart # lib/pages/medical/labs/laboratory_result_page.dart # lib/pages/medical/patient_sick_leave_page.dart # lib/pages/webRTC/call_page.dart # lib/pages/webRTC/signaling.dart # lib/services/appointment_services/GetDoctorsList.dart # lib/uitl/LocalNotification.dart # lib/uitl/SignalRUtil.dart # lib/uitl/utils.dart # lib/widgets/others/floating_button_search.dartPatientApp_VIDA_Plus_3.3
commit
4e962bda07
@ -0,0 +1,6 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgJ5XRSnefd1apSG/z
|
||||
YJTQ55ffLMlPgKlGM9edg88mUZagCgYIKoZIzj0DAQehRANCAATSA2MbS+J0cQsc
|
||||
uBU0xaoxOUgGvnHCQSEK4t22i8eeKPPhH6RHJhK1ugPvj+Eyadf7j6pn3QRonEJu
|
||||
mIL+qvqC
|
||||
-----END PRIVATE KEY-----
|
@ -0,0 +1,228 @@
|
||||
class AdmissionMedicalReport {
|
||||
int rowID;
|
||||
String setupID;
|
||||
int projectID;
|
||||
int admissionNo;
|
||||
String admissionDate;
|
||||
int admissionRequestNo;
|
||||
int admissionType;
|
||||
int patientType;
|
||||
int patientID;
|
||||
int clinicID;
|
||||
int doctorID;
|
||||
int admittingClinicID;
|
||||
int admittingDoctorID;
|
||||
int categoryID;
|
||||
String roomID;
|
||||
String bedID;
|
||||
String dischargeDate;
|
||||
int approvalNo;
|
||||
dynamic relativeID;
|
||||
String registrationDate;
|
||||
String firstName;
|
||||
String middleName;
|
||||
String lastName;
|
||||
String firstNameN;
|
||||
String middleNameN;
|
||||
String lastNameN;
|
||||
int patientCategory;
|
||||
int gender;
|
||||
String dateofBirth;
|
||||
String dateofBirthN;
|
||||
String nationalityID;
|
||||
String firstVisit;
|
||||
String lastVisit;
|
||||
int noOfVisit;
|
||||
String mobileNumber;
|
||||
String patientIdentificationNo;
|
||||
int sTATUS;
|
||||
int admissionStatus;
|
||||
int buildingID;
|
||||
String buildingDescription;
|
||||
String buildingDescriptionN;
|
||||
int floorID;
|
||||
int bedGender;
|
||||
int tariffType;
|
||||
dynamic cRSVerificationStatus;
|
||||
String nursingStationID;
|
||||
String description;
|
||||
String clinicName;
|
||||
String doctorNameObj;
|
||||
int patientDataVerified;
|
||||
String projectName;
|
||||
dynamic projectNameN;
|
||||
String statusDescription;
|
||||
String statusDescriptionN;
|
||||
|
||||
AdmissionMedicalReport(
|
||||
{this.rowID,
|
||||
this.setupID,
|
||||
this.projectID,
|
||||
this.admissionNo,
|
||||
this.admissionDate,
|
||||
this.admissionRequestNo,
|
||||
this.admissionType,
|
||||
this.patientType,
|
||||
this.patientID,
|
||||
this.clinicID,
|
||||
this.doctorID,
|
||||
this.admittingClinicID,
|
||||
this.admittingDoctorID,
|
||||
this.categoryID,
|
||||
this.roomID,
|
||||
this.bedID,
|
||||
this.dischargeDate,
|
||||
this.approvalNo,
|
||||
this.relativeID,
|
||||
this.registrationDate,
|
||||
this.firstName,
|
||||
this.middleName,
|
||||
this.lastName,
|
||||
this.firstNameN,
|
||||
this.middleNameN,
|
||||
this.lastNameN,
|
||||
this.patientCategory,
|
||||
this.gender,
|
||||
this.dateofBirth,
|
||||
this.dateofBirthN,
|
||||
this.nationalityID,
|
||||
this.firstVisit,
|
||||
this.lastVisit,
|
||||
this.noOfVisit,
|
||||
this.mobileNumber,
|
||||
this.patientIdentificationNo,
|
||||
this.sTATUS,
|
||||
this.admissionStatus,
|
||||
this.buildingID,
|
||||
this.buildingDescription,
|
||||
this.buildingDescriptionN,
|
||||
this.floorID,
|
||||
this.bedGender,
|
||||
this.tariffType,
|
||||
this.cRSVerificationStatus,
|
||||
this.nursingStationID,
|
||||
this.description,
|
||||
this.clinicName,
|
||||
this.doctorNameObj,
|
||||
this.patientDataVerified,
|
||||
this.projectName,
|
||||
this.projectNameN,
|
||||
this.statusDescription,
|
||||
this.statusDescriptionN});
|
||||
|
||||
AdmissionMedicalReport.fromJson(Map<String, dynamic> json) {
|
||||
rowID = json['RowID'];
|
||||
setupID = json['SetupID'];
|
||||
projectID = json['ProjectID'];
|
||||
admissionNo = json['AdmissionNo'];
|
||||
admissionDate = json['AdmissionDate'];
|
||||
admissionRequestNo = json['AdmissionRequestNo'];
|
||||
admissionType = json['AdmissionType'];
|
||||
patientType = json['PatientType'];
|
||||
patientID = json['PatientID'];
|
||||
clinicID = json['ClinicID'];
|
||||
doctorID = json['DoctorID'];
|
||||
admittingClinicID = json['AdmittingClinicID'];
|
||||
admittingDoctorID = json['AdmittingDoctorID'];
|
||||
categoryID = json['CategoryID'];
|
||||
roomID = json['RoomID'];
|
||||
bedID = json['BedID'];
|
||||
dischargeDate = json['DischargeDate'];
|
||||
approvalNo = json['ApprovalNo'];
|
||||
relativeID = json['RelativeID'];
|
||||
registrationDate = json['RegistrationDate'];
|
||||
firstName = json['FirstName'];
|
||||
middleName = json['MiddleName'];
|
||||
lastName = json['LastName'];
|
||||
firstNameN = json['FirstNameN'];
|
||||
middleNameN = json['MiddleNameN'];
|
||||
lastNameN = json['LastNameN'];
|
||||
patientCategory = json['PatientCategory'];
|
||||
gender = json['Gender'];
|
||||
dateofBirth = json['DateofBirth'];
|
||||
dateofBirthN = json['DateofBirthN'];
|
||||
nationalityID = json['NationalityID'];
|
||||
firstVisit = json['FirstVisit'];
|
||||
lastVisit = json['LastVisit'];
|
||||
noOfVisit = json['NoOfVisit'];
|
||||
mobileNumber = json['MobileNumber'];
|
||||
patientIdentificationNo = json['PatientIdentificationNo'];
|
||||
sTATUS = json['STATUS'];
|
||||
admissionStatus = json['AdmissionStatus'];
|
||||
buildingID = json['BuildingID'];
|
||||
buildingDescription = json['BuildingDescription'];
|
||||
buildingDescriptionN = json['BuildingDescriptionN'];
|
||||
floorID = json['FloorID'];
|
||||
bedGender = json['BedGender'];
|
||||
tariffType = json['TariffType'];
|
||||
cRSVerificationStatus = json['CRSVerificationStatus'];
|
||||
nursingStationID = json['NursingStationID'];
|
||||
description = json['Description'];
|
||||
clinicName = json['ClinicName'];
|
||||
doctorNameObj = json['DoctorNameObj'];
|
||||
patientDataVerified = json['PatientDataVerified'];
|
||||
projectName = json['ProjectName'];
|
||||
projectNameN = json['ProjectNameN'];
|
||||
statusDescription = json['StatusDescription'];
|
||||
statusDescriptionN = json['StatusDescriptionN'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['RowID'] = this.rowID;
|
||||
data['SetupID'] = this.setupID;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['AdmissionNo'] = this.admissionNo;
|
||||
data['AdmissionDate'] = this.admissionDate;
|
||||
data['AdmissionRequestNo'] = this.admissionRequestNo;
|
||||
data['AdmissionType'] = this.admissionType;
|
||||
data['PatientType'] = this.patientType;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['ClinicID'] = this.clinicID;
|
||||
data['DoctorID'] = this.doctorID;
|
||||
data['AdmittingClinicID'] = this.admittingClinicID;
|
||||
data['AdmittingDoctorID'] = this.admittingDoctorID;
|
||||
data['CategoryID'] = this.categoryID;
|
||||
data['RoomID'] = this.roomID;
|
||||
data['BedID'] = this.bedID;
|
||||
data['DischargeDate'] = this.dischargeDate;
|
||||
data['ApprovalNo'] = this.approvalNo;
|
||||
data['RelativeID'] = this.relativeID;
|
||||
data['RegistrationDate'] = this.registrationDate;
|
||||
data['FirstName'] = this.firstName;
|
||||
data['MiddleName'] = this.middleName;
|
||||
data['LastName'] = this.lastName;
|
||||
data['FirstNameN'] = this.firstNameN;
|
||||
data['MiddleNameN'] = this.middleNameN;
|
||||
data['LastNameN'] = this.lastNameN;
|
||||
data['PatientCategory'] = this.patientCategory;
|
||||
data['Gender'] = this.gender;
|
||||
data['DateofBirth'] = this.dateofBirth;
|
||||
data['DateofBirthN'] = this.dateofBirthN;
|
||||
data['NationalityID'] = this.nationalityID;
|
||||
data['FirstVisit'] = this.firstVisit;
|
||||
data['LastVisit'] = this.lastVisit;
|
||||
data['NoOfVisit'] = this.noOfVisit;
|
||||
data['MobileNumber'] = this.mobileNumber;
|
||||
data['PatientIdentificationNo'] = this.patientIdentificationNo;
|
||||
data['STATUS'] = this.sTATUS;
|
||||
data['AdmissionStatus'] = this.admissionStatus;
|
||||
data['BuildingID'] = this.buildingID;
|
||||
data['BuildingDescription'] = this.buildingDescription;
|
||||
data['BuildingDescriptionN'] = this.buildingDescriptionN;
|
||||
data['FloorID'] = this.floorID;
|
||||
data['BedGender'] = this.bedGender;
|
||||
data['TariffType'] = this.tariffType;
|
||||
data['CRSVerificationStatus'] = this.cRSVerificationStatus;
|
||||
data['NursingStationID'] = this.nursingStationID;
|
||||
data['Description'] = this.description;
|
||||
data['ClinicName'] = this.clinicName;
|
||||
data['DoctorNameObj'] = this.doctorNameObj;
|
||||
data['PatientDataVerified'] = this.patientDataVerified;
|
||||
data['ProjectName'] = this.projectName;
|
||||
data['ProjectNameN'] = this.projectNameN;
|
||||
data['StatusDescription'] = this.statusDescription;
|
||||
data['StatusDescriptionN'] = this.statusDescriptionN;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
class AdmissionStatusForSickLeave {
|
||||
String setupID;
|
||||
int projectID;
|
||||
int patientID;
|
||||
int patientType;
|
||||
int requestNo;
|
||||
String requestDate;
|
||||
int sickLeaveDays;
|
||||
int appointmentNo;
|
||||
int admissionNo;
|
||||
String reportDate;
|
||||
String placeOfWork;
|
||||
int status;
|
||||
dynamic dischargeDate;
|
||||
|
||||
AdmissionStatusForSickLeave(
|
||||
{this.setupID,
|
||||
this.projectID,
|
||||
this.patientID,
|
||||
this.patientType,
|
||||
this.requestNo,
|
||||
this.requestDate,
|
||||
this.sickLeaveDays,
|
||||
this.appointmentNo,
|
||||
this.admissionNo,
|
||||
this.reportDate,
|
||||
this.placeOfWork,
|
||||
this.status,
|
||||
this.dischargeDate});
|
||||
|
||||
AdmissionStatusForSickLeave.fromJson(Map<String, dynamic> json) {
|
||||
setupID = json['SetupID'];
|
||||
projectID = json['ProjectID'];
|
||||
patientID = json['PatientID'];
|
||||
patientType = json['PatientType'];
|
||||
requestNo = json['RequestNo'];
|
||||
requestDate = json['RequestDate'];
|
||||
sickLeaveDays = json['SickLeaveDays'];
|
||||
appointmentNo = json['AppointmentNo'];
|
||||
admissionNo = json['AdmissionNo'];
|
||||
reportDate = json['ReportDate'];
|
||||
placeOfWork = json['PlaceOfWork'];
|
||||
status = json['Status'];
|
||||
dischargeDate = json['DischargeDate'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['SetupID'] = this.setupID;
|
||||
data['ProjectID'] = this.projectID;
|
||||
data['PatientID'] = this.patientID;
|
||||
data['PatientType'] = this.patientType;
|
||||
data['RequestNo'] = this.requestNo;
|
||||
data['RequestDate'] = this.requestDate;
|
||||
data['SickLeaveDays'] = this.sickLeaveDays;
|
||||
data['AppointmentNo'] = this.appointmentNo;
|
||||
data['AdmissionNo'] = this.admissionNo;
|
||||
data['ReportDate'] = this.reportDate;
|
||||
data['PlaceOfWork'] = this.placeOfWork;
|
||||
data['Status'] = this.status;
|
||||
data['DischargeDate'] = this.dischargeDate;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -1,6 +1,19 @@
|
||||
import 'dart:convert';
|
||||
import 'package:crypto/crypto.dart';
|
||||
|
||||
extension CapExtension on String {
|
||||
String get toCamelCase => "${this[0].toUpperCase()}${this.substring(1)}";
|
||||
|
||||
String get inCaps => '${this[0].toUpperCase()}${this.substring(1)}';
|
||||
|
||||
String get allInCaps => this.toUpperCase();
|
||||
String get capitalizeFirstofEach => this.trim().length > 0 ? this.trim().toLowerCase().split(" ").map((str) => str.inCaps).join(" ") : "";
|
||||
|
||||
String get capitalizeFirstofEach => this.trim().length > 0 ? this.trim().toLowerCase().split(" ").map((str) => str.isNotEmpty ? str.inCaps : str).join(" ") : "";
|
||||
}
|
||||
|
||||
extension HashSha on String {
|
||||
String get toSha256 {
|
||||
var bytes = utf8.encode(this);
|
||||
return sha256.convert(bytes).toString();
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,132 @@
|
||||
import 'package:diplomaticquarterapp/core/model/reports/admission_for_medical_report.dart';
|
||||
import 'package:diplomaticquarterapp/core/viewModels/medical/reports_view_model.dart';
|
||||
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
|
||||
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
|
||||
import 'package:diplomaticquarterapp/pages/medical/reports/report_list_widget.dart';
|
||||
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/dialogs/ConfirmWithMessageDialog.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class InPatientMedicalReports extends StatefulWidget {
|
||||
final AdmissionMedicalReport admissionMedicalReport;
|
||||
|
||||
InPatientMedicalReports({@required this.admissionMedicalReport});
|
||||
|
||||
@override
|
||||
State<InPatientMedicalReports> createState() => _InPatientMedicalReportsState();
|
||||
}
|
||||
|
||||
class _InPatientMedicalReportsState extends State<InPatientMedicalReports> {
|
||||
int _currentPage = 0;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BaseView<ReportsViewModel>(
|
||||
onModelReady: (model) {
|
||||
model.getInPatientReports();
|
||||
},
|
||||
builder: (_, model, widget) => AppScaffold(
|
||||
isShowAppBar: true,
|
||||
appBarTitle: TranslationBase.of(context).newMedReport,
|
||||
title: TranslationBase.of(context).medReport,
|
||||
showNewAppBar: true,
|
||||
showNewAppBarTitle: true,
|
||||
backgroundColor: Color(0xffF7F7F7),
|
||||
body: Container(
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.all(21),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
myRadioButton(TranslationBase.of(context).requested, 0),
|
||||
myRadioButton(TranslationBase.of(context).ready, 1),
|
||||
myRadioButton(TranslationBase.of(context).cancelled, 2),
|
||||
],
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: IndexedStack(
|
||||
index: _currentPage,
|
||||
children: [
|
||||
ReportListWidget(reportList: model.reportsInPatientOrderRequestList, emailAddress: model.user.emailAddress),
|
||||
ReportListWidget(reportList: model.reportsInPatientOrderReadyList, emailAddress: model.user.emailAddress),
|
||||
ReportListWidget(reportList: model.reportsInPatientOrderCanceledList, emailAddress: model.user.emailAddress),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
|
||||
child: DefaultButton(
|
||||
TranslationBase.of(context).requestMedicalReport.toLowerCase().capitalizeFirstofEach,
|
||||
() {
|
||||
confirmBox(model);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void confirmBox(ReportsViewModel reportsViewModel) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (cxt) => ConfirmWithMessageDialog(
|
||||
message: TranslationBase.of(context).confirmMsgReport,
|
||||
onTap: () => reportsViewModel.insertRequestForInPatientMedicalReport(widget.admissionMedicalReport.clinicID, widget.admissionMedicalReport.doctorID, widget.admissionMedicalReport.setupID,
|
||||
widget.admissionMedicalReport.admissionNo, widget.admissionMedicalReport.projectID, TranslationBase.of(context).successSendReport),
|
||||
),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
Widget myRadioButton(String _label, int _value) {
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
_currentPage = _value;
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 22,
|
||||
height: 22,
|
||||
child: Radio(
|
||||
value: _value,
|
||||
activeColor: _value == _currentPage ? Color(0xffD02127) : Color(0xffE8E8E8),
|
||||
groupValue: _currentPage,
|
||||
onChanged: (index) {
|
||||
setState(() {
|
||||
_currentPage = index;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
SizedBox(width: 10),
|
||||
Text(
|
||||
_label,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xff575757),
|
||||
letterSpacing: -0.56,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
@ -1,164 +1,164 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart';
|
||||
import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart';
|
||||
import 'package:diplomaticquarterapp/pages/webRTC/signaling.dart';
|
||||
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_webrtc/flutter_webrtc.dart';
|
||||
|
||||
class CallPage extends StatefulWidget {
|
||||
@override
|
||||
_CallPageState createState() => _CallPageState();
|
||||
}
|
||||
|
||||
class _CallPageState extends State<CallPage> {
|
||||
// Signaling signaling = Signaling();
|
||||
RTCVideoRenderer _localRenderer = RTCVideoRenderer();
|
||||
RTCVideoRenderer _remoteRenderer = RTCVideoRenderer();
|
||||
String roomId;
|
||||
TextEditingController textEditingController = TextEditingController(text: '');
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
_localRenderer.initialize();
|
||||
_remoteRenderer.initialize();
|
||||
|
||||
// signaling.onRemoteStream = ((stream) {
|
||||
// _remoteRenderer.srcObject = stream;
|
||||
// setState(() {});
|
||||
// });
|
||||
|
||||
fcmConfigure();
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_localRenderer.dispose();
|
||||
_remoteRenderer.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
FirebaseMessaging.instance.getToken().then((value) {
|
||||
print('FCM_TOKEN: $value');
|
||||
});
|
||||
|
||||
return AppScaffold(
|
||||
isShowAppBar: true,
|
||||
showNewAppBar: true,
|
||||
showNewAppBarTitle: true,
|
||||
isShowDecPage: false,
|
||||
appBarTitle: "WebRTC Calling",
|
||||
body: Column(
|
||||
children: [
|
||||
SizedBox(height: 8),
|
||||
Wrap(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 8,
|
||||
),
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
dummyCall();
|
||||
},
|
||||
child: Text("Call"),
|
||||
),
|
||||
SizedBox(
|
||||
width: 8,
|
||||
),
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
// signaling.hangUp(_localRenderer);
|
||||
},
|
||||
child: Text("Hangup"),
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(0.0),
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned(top: 0.0, right: 0.0, left: 0.0, bottom: 0.0, child: RTCVideoView(_remoteRenderer)),
|
||||
Positioned(
|
||||
top: 20.0,
|
||||
right: 100.0,
|
||||
left: 20.0,
|
||||
bottom: 300.0,
|
||||
child: RTCVideoView(_localRenderer, mirror: true),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text("Join the following Room: "),
|
||||
Flexible(
|
||||
child: TextFormField(
|
||||
controller: textEditingController,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 8)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
dummyCall() async {
|
||||
final json = {
|
||||
"callerID": "9920",
|
||||
"receiverID": "2001273",
|
||||
"msgID": "123",
|
||||
"notfID": "123",
|
||||
"notification_foreground": "true",
|
||||
"count": "1",
|
||||
"message": "Doctor is calling ",
|
||||
"AppointmentNo": "123",
|
||||
"title": "Rayyan Hospital",
|
||||
"ProjectID": "123",
|
||||
"NotificationType": "10",
|
||||
"background": "1",
|
||||
"doctorname": "Dr Sulaiman Al Habib",
|
||||
"clinicname": "ENT Clinic",
|
||||
"speciality": "Speciality",
|
||||
"appointmentdate": "Sun, 15th Dec, 2019",
|
||||
"appointmenttime": "09:00",
|
||||
"type": "video",
|
||||
"session_id":
|
||||
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6InR3aWxpby1mcGE7dj0xIn0.eyJqdGkiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0LTE1OTg3NzQ1MDYiLCJpc3MiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0Iiwic3ViIjoiQUNhYWQ1YTNmOGM2NGZhNjczNTY3NTYxNTc0N2YyNmMyYiIsImV4cCI6MTU5ODc3ODEwNiwiZ3JhbnRzIjp7ImlkZW50aXR5IjoiSGFyb29uMSIsInZpZGVvIjp7InJvb20iOiJTbWFsbERhaWx5U3RhbmR1cCJ9fX0.7XUS5uMQQJfkrBZu9EjQ6STL6R7iXkso6BtO1HmrQKk",
|
||||
"identity": "Haroon1",
|
||||
"name": "SmallDailyStandup",
|
||||
"videoUrl": "video",
|
||||
"picture": "video",
|
||||
"is_call": "true"
|
||||
};
|
||||
|
||||
IncomingCallData incomingCallData = IncomingCallData.fromJson(json);
|
||||
final result = await Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: incomingCallData)));
|
||||
}
|
||||
|
||||
fcmConfigure() {
|
||||
FirebaseMessaging.onMessage.listen((RemoteMessage message) async {
|
||||
print(message.toString());
|
||||
|
||||
IncomingCallData incomingCallData;
|
||||
if (Platform.isAndroid)
|
||||
incomingCallData = IncomingCallData.fromJson(message.data['data']);
|
||||
else if (Platform.isIOS) incomingCallData = IncomingCallData.fromJson(message.data);
|
||||
if (incomingCallData != null) final result = await Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: incomingCallData)));
|
||||
});
|
||||
}
|
||||
}
|
||||
// import 'dart:io';
|
||||
//
|
||||
// import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart';
|
||||
// import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart';
|
||||
// import 'package:diplomaticquarterapp/pages/webRTC/signaling.dart';
|
||||
// import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||
// import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:flutter_webrtc/flutter_webrtc.dart';
|
||||
//
|
||||
// class CallPage extends StatefulWidget {
|
||||
// @override
|
||||
// _CallPageState createState() => _CallPageState();
|
||||
// }
|
||||
//
|
||||
// class _CallPageState extends State<CallPage> {
|
||||
// Signaling signaling = Signaling();
|
||||
// RTCVideoRenderer _localRenderer = RTCVideoRenderer();
|
||||
// RTCVideoRenderer _remoteRenderer = RTCVideoRenderer();
|
||||
// String roomId;
|
||||
// TextEditingController textEditingController = TextEditingController(text: '');
|
||||
//
|
||||
// @override
|
||||
// void initState() {
|
||||
// _localRenderer.initialize();
|
||||
// _remoteRenderer.initialize();
|
||||
//
|
||||
// // signaling.onRemoteStream = ((stream) {
|
||||
// // _remoteRenderer.srcObject = stream;
|
||||
// // setState(() {});
|
||||
// // });
|
||||
//
|
||||
// fcmConfigure();
|
||||
//
|
||||
// super.initState();
|
||||
// }
|
||||
//
|
||||
// @override
|
||||
// void dispose() {
|
||||
// _localRenderer.dispose();
|
||||
// _remoteRenderer.dispose();
|
||||
// super.dispose();
|
||||
// }
|
||||
//
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// FirebaseMessaging.instance.getToken().then((value) {
|
||||
// print('FCM_TOKEN: $value');
|
||||
// });
|
||||
//
|
||||
// return AppScaffold(
|
||||
// isShowAppBar: true,
|
||||
// showNewAppBar: true,
|
||||
// showNewAppBarTitle: true,
|
||||
// isShowDecPage: false,
|
||||
// appBarTitle: "WebRTC Calling",
|
||||
// body: Column(
|
||||
// children: [
|
||||
// SizedBox(height: 8),
|
||||
// Wrap(
|
||||
// children: [
|
||||
// SizedBox(
|
||||
// width: 8,
|
||||
// ),
|
||||
// ElevatedButton(
|
||||
// onPressed: () {
|
||||
// dummyCall();
|
||||
// },
|
||||
// child: Text("Call"),
|
||||
// ),
|
||||
// SizedBox(
|
||||
// width: 8,
|
||||
// ),
|
||||
// ElevatedButton(
|
||||
// onPressed: () {
|
||||
// signaling.hangUp(_localRenderer);
|
||||
// },
|
||||
// child: Text("Hangup"),
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// SizedBox(height: 8),
|
||||
// Expanded(
|
||||
// child: Padding(
|
||||
// padding: const EdgeInsets.all(0.0),
|
||||
// child: Stack(
|
||||
// children: [
|
||||
// Positioned(top: 0.0, right: 0.0, left: 0.0, bottom: 0.0, child: RTCVideoView(_remoteRenderer)),
|
||||
// Positioned(
|
||||
// top: 20.0,
|
||||
// right: 100.0,
|
||||
// left: 20.0,
|
||||
// bottom: 300.0,
|
||||
// child: RTCVideoView(_localRenderer, mirror: true),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.all(8.0),
|
||||
// child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
// children: [
|
||||
// Text("Join the following Room: "),
|
||||
// Flexible(
|
||||
// child: TextFormField(
|
||||
// controller: textEditingController,
|
||||
// ),
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(height: 8)
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// dummyCall() async {
|
||||
// final json = {
|
||||
// "callerID": "9920",
|
||||
// "receiverID": "2001273",
|
||||
// "msgID": "123",
|
||||
// "notfID": "123",
|
||||
// "notification_foreground": "true",
|
||||
// "count": "1",
|
||||
// "message": "Doctor is calling ",
|
||||
// "AppointmentNo": "123",
|
||||
// "title": "Rayyan Hospital",
|
||||
// "ProjectID": "123",
|
||||
// "NotificationType": "10",
|
||||
// "background": "1",
|
||||
// "doctorname": "Dr Sulaiman Al Habib",
|
||||
// "clinicname": "ENT Clinic",
|
||||
// "speciality": "Speciality",
|
||||
// "appointmentdate": "Sun, 15th Dec, 2019",
|
||||
// "appointmenttime": "09:00",
|
||||
// "type": "video",
|
||||
// "session_id":
|
||||
// "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6InR3aWxpby1mcGE7dj0xIn0.eyJqdGkiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0LTE1OTg3NzQ1MDYiLCJpc3MiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0Iiwic3ViIjoiQUNhYWQ1YTNmOGM2NGZhNjczNTY3NTYxNTc0N2YyNmMyYiIsImV4cCI6MTU5ODc3ODEwNiwiZ3JhbnRzIjp7ImlkZW50aXR5IjoiSGFyb29uMSIsInZpZGVvIjp7InJvb20iOiJTbWFsbERhaWx5U3RhbmR1cCJ9fX0.7XUS5uMQQJfkrBZu9EjQ6STL6R7iXkso6BtO1HmrQKk",
|
||||
// "identity": "Haroon1",
|
||||
// "name": "SmallDailyStandup",
|
||||
// "videoUrl": "video",
|
||||
// "picture": "video",
|
||||
// "is_call": "true"
|
||||
// };
|
||||
//
|
||||
// IncomingCallData incomingCallData = IncomingCallData.fromJson(json);
|
||||
// final result = await Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: incomingCallData)));
|
||||
// }
|
||||
//
|
||||
// fcmConfigure() {
|
||||
// FirebaseMessaging.onMessage.listen((RemoteMessage message) async {
|
||||
// print(message.toString());
|
||||
//
|
||||
// IncomingCallData incomingCallData;
|
||||
// if (Platform.isAndroid)
|
||||
// incomingCallData = IncomingCallData.fromJson(message.data['data']);
|
||||
// else if (Platform.isIOS) incomingCallData = IncomingCallData.fromJson(message.data);
|
||||
// if (incomingCallData != null) final result = await Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: incomingCallData)));
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
Loading…
Reference in New Issue