Merge branch 'development_v3.3' into Dev_3.3_InPatient_CR

# Conflicts:
#	lib/config/config.dart
#	lib/config/localized_values.dart
#	lib/uitl/translations_delegate_base.dart
Dev_3.3_InPatient_CR
haroon amjad 3 years ago
commit f624c70cee

@ -19,7 +19,7 @@ var PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
var PACKAGES_ORDERS = '/api/orders';
var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:3334/';
// var BASE_URL = 'http://10.50.100.198:2018/';
var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
@ -88,6 +88,7 @@ var COVID_PASSPORT_UPDATE = 'Services/Patients.svc/REST/Covid19_Certificate_Pass
var GET_PATIENT_PASSPORT_NUMBER = 'Services/Patients.svc/REST/Covid19_Certificate_GetPassport';
var UPDATE_WORKPLACE_NAME = 'Services/Patients.svc/REST/ActivateSickLeave_FromVida';
var GET_SICKLEAVE_STATUS_ADMISSION_NO = 'Services/ChatBot_Service.svc/REST/GetSickLeaveStatusByAdmissionNo';
///
var GET_PATIENT_ORDERS = 'Services/Patients.svc/REST/GetPatientRadOrders';
@ -182,6 +183,7 @@ var SAVE_BLOOD_AGREEMENT = 'Services/PatientVarification.svc/REST/AddUserAgreeme
var REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo';
var INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport';
var SEND_MEDICAL_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendMedicalReportEmail';
var GET_INPATIENT_ADMISSIONS = 'Services/inps.svc/REST/getAdmissionForMedicalReport';
///Rate
// var IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated';
@ -323,7 +325,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 = 10.5;
var VERSION_ID = 10.7;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0;
@ -400,6 +402,8 @@ var ADD_ACTIVE_PRESCRIPTIONS_REPORT_BY_PATIENT_ID = 'Services/Patients.svc/Rest/
var GET_CALL_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult';
var GET_CALL_REQUEST_TYPE_LOV = 'Services/Doctors.svc/REST/GetCallRequestType_LOV';
var GET_QUESTION_TYPES = 'Services/OUTPs.svc/REST/getQuestionsTypes';
var UPDATE_DIABETIC_RESULT = 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult';
var SEND_AVERAGE_BLOOD_SUGAR_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodSugarReport';
@ -414,7 +418,10 @@ var UPDATE_WEIGHT_PRESSURE_RESULT = 'Services/Patients.svc/REST/Patient_UpdateWe
var DEACTIVATE_WEIGHT_PRESSURE_RESULT = 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus';
var GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse';
var UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus';
var INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo';
var INSERT_APPOINTMENT_QUESTION = 'Services/OUTPs.svc/REST/insertAppointmentQuestion';
var RATE_DOCTOR_RESPONSE = 'Services/OUTPs.svc/REST/insertAppointmentQuestionRating';
var GET_PATIENT_ALLERGIES = 'Services/Patients.svc/REST/GetPatientAllergies';
@ -591,7 +598,10 @@ var CANCEL_PHARMA_LIVECARE_REQUEST = 'https://vcallapi.hmg.com/api/PharmaLiveCar
var INSERT_FREE_SLOTS_LOGS = 'Services/Doctors.svc/Rest/InsertDoctorFreeSlotsLogs';
var GET_NATIONALITY ='Services/Lists.svc/REST/GetNationality';
var GET_NATIONALITY = 'Services/Lists.svc/REST/GetNationality';
var PAYFORT_TEST_URL = 'https://sbpaymentservices.payfort.com/FortAPI/paymentApi';
var PAYFORT_PROD_URL = 'https://paymentservices.payfort.com/FortAPI/paymentApi';
// Check If InPatient API
var CHECK_IF_INPATIENT = 'Services/Patients.svc/REST/GetInPatientAdmissionInfo';

@ -326,8 +326,8 @@ const Map localizedValues = {
"nearester": {"en": "Nearest ER", "ar": "أقرب طوارى"},
"locationa": {"en": "Location", "ar": "الموقع"},
"call_now": {"en": "Call now", "ar": "اتصل الان"},
"ambulancerequest": {"en": "Ambulance", "ar": "طلب نقل "},
"requestA": {"en": "Request", "ar": "اسعاف"},
"ambulancerequest": {"en": "Ambulance", "ar": "خدمات النقل "},
"requestA": {"en": "Request", "ar": "الاسعافي"},
"NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"},
"NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"},
"noArrivedAppointments": {"en": "No Arrived Appointments", "ar": "لم يتم حضورها"},
@ -926,7 +926,7 @@ const Map localizedValues = {
"ar": "تعرض هذه الخدمة أقرب فرع من بين جميع فروع مجموعة الحبيب الطبية بناءً على موقعك الحالي."
},
"er": {"en": "ER", "ar": "الطوارىء"},
"transportation-Service": {"en": "Ambulance Request", "ar": "طلب نقل اسعاف"},
"transportation-Service": {"en": "Ambulance Request", "ar": "خدمات النقل الاسعافي"},
"info-ambulance": {
"en": "Through this service, you can request evacuation by ambulance, whether from home or to home, in addition to a set of other services",
"ar": "عن طريق هذه الخدمة يمكنك طلب اخلاء بواسطة سيارة اسعاف سواء من المزل او الى المنزل بالاضافة الى مجموعة من الخدمات الاخرى"
@ -1844,51 +1844,39 @@ const Map localizedValues = {
"privacyPolicy": {"en": "Privacy Policy", "ar": "سياسة الخصوصية"},
"termsConditions": {"en": "Terms & Conditions", "ar": "الأحكام والشروط"},
"prescriptionDeliveryError": {"en": "This clinic does not support refill & delivery.", "ar": "هذه العيادة لا تدعم إعادة التعبئة والتسليم."},
"liveCarePermissions": {
"en": "LiveCare requires Camera, Microphone & Location permissions to enable virtual consultation between patient & doctor, Please allow these to proceed.",
"ar": "يتطلب لايف كير أذونات الكاميرا والميكروفون والموقع، يرجى السماح لها بالمتابعة."
},
"lakumUnhold": {"en": "The account has already been activated", "ar": "لقد تم تفعيل الحساب من قبل"},
"lakumDiscontinue": {"en": "The account is closed", "ar": "الحساب مغلق"},
"lakumSuccess": {"en": "The account has been activated successfully", "ar": "تم تفعيل الحساب بنجاح"},
"deleteAccount": {"en": "Deactivate Account", "ar": "ايقاف الحساب مؤقتاً"},
"deactivateAccount": {"en": "Are you sure you want to deactivate your account?", "ar": "هل أنت متأكد أنك تريد ايقاف الحساب مؤقتاً حسابك؟"},
"accountDeactivated": {"en": "Your account has been deactivated successfully", "ar": "تم ايقاف الحساب مؤقتاً بنجاح."},
"accountDeactivatedMsg": {"en": "Your account has been deactivated. Would you like to reactivate it?", "ar": "حسابك معطل. هل ترغب في إعادة تنشيطه مرة أخرى؟"},
"updateInsuranceManually": {"en": "Update Insurance Manually", "ar": "تحديث التأمين يدويا"},
"or": {"en": "Update Insurance Manually", "ar": "تحديث التأمين يدويا"},
"enterInsuranceDetails": {"en": "Please enter your insurance card details below:", "ar": "الرجاء إدخال تفاصيل بطاقة التأمين الخاصة بك أدناه:"},
"cardHolderName": {"en": "Card Holder Name", "ar": "إسم صاحب البطاقة"},
"membershipNo": {"en": "Membership No.", "ar": "رقم العضوية"},
"policyNo": {"en": "Policy No.", "ar": "رقم وثيقة التأمين"},
"paymentOnly": {"en": "Payment", "ar": "معلقة"},
"pendingOnly": {"en": "Pending", "ar": "مدفوعات"},
"insuranceClassName": {"en": "Insurance Class", "ar": "فئة التأمين"},
"insuranceRequestSubmit": {"en": "Your insurance update request has been submitted successfully.", "ar": "تم تقديم طلب تحديث التأمين الخاص بك بنجاح."},
"NFCNotSupported": {"en": "Your device does not support NFC. Please visit reception to Check-In", "ar": "جهازك لا يدعم NFC. يرجى زيارة مكتب الاستقبال لتسجيل الوصول"},
"liveCarePermissions": {"en": "LiveCare requires Camera, Microphone & Location permissions to enable virtual consultation between patient & doctor, Please allow these to proceed.", "ar": "يتطلب لايف كير أذونات الكاميرا والميكروفون والموقع، يرجى السماح لها بالمتابعة."},
"lakumUnhold": { "en": "The account has already been activated", "ar": "لقد تم تفعيل الحساب من قبل" },
"lakumDiscontinue": { "en": "The account is closed", "ar": "الحساب مغلق" },
"lakumSuccess": { "en": "The account has been activated successfully", "ar": "تم تفعيل الحساب بنجاح" },
"deleteAccount": { "en": "Deactivate Account", "ar": "ايقاف الحساب مؤقتاً" },
"deactivateAccount": { "en": "Are you sure you want to deactivate your account?", "ar": "هل أنت متأكد أنك تريد ايقاف الحساب مؤقتاً حسابك؟" },
"accountDeactivated": { "en": "Your account has been deactivated successfully", "ar": "تم ايقاف الحساب مؤقتاً بنجاح." },
"accountDeactivatedMsg": { "en": "Your account has been deactivated. Would you like to reactivate it?", "ar": "حسابك معطل. هل ترغب في إعادة تنشيطه مرة أخرى؟" },
"updateInsuranceManually": { "en": "Update Insurance Manually", "ar": "تحديث التأمين يدويا" },
"or": { "en": "Update Insurance Manually", "ar": "تحديث التأمين يدويا" },
"enterInsuranceDetails": { "en": "Please enter your insurance card details below:", "ar": "الرجاء إدخال تفاصيل بطاقة التأمين الخاصة بك أدناه:" },
"cardHolderName": { "en": "Card Holder Name", "ar": "إسم صاحب البطاقة" },
"membershipNo": { "en": "Membership No.", "ar": "رقم العضوية" },
"policyNo": { "en": "Policy No.", "ar": "رقم وثيقة التأمين" },
"paymentOnly": { "en": "Payment", "ar": "معلقة" },
"pendingOnly": { "en": "Pending", "ar": "مدفوعات" },
"insuranceClassName": { "en": "Insurance Class", "ar": "فئة التأمين" },
"insuranceRequestSubmit": { "en": "Your insurance update request has been submitted successfully.", "ar": "تم تقديم طلب تحديث التأمين الخاص بك بنجاح." },
"NFCNotSupported": { "en": "Your device does not support NFC. Please visit reception to Check-In", "ar": "جهازك لا يدعم NFC. يرجى زيارة مكتب الاستقبال لتسجيل الوصول" },
"enter-workplace-name": {"en": "Please enter your workplace name:", "ar": "رجاء إدخال مكان العمل:"},
"workplaceName": {"en": "Workplace name:", "ar": "مكان العمل:"},
"callLiveCareSupport": {"en": "Call LiveCare Support", "ar": "اتصل بدعم اللايف كير"},
"needApproval": {
"en": "Your sick leave is under process in medical administration, you will be notified once approved.",
"ar": "جازتك المرضية تحت الإجراء في الإدارة الطبية ، سوف يتم إشعارك فور الموافقه عليها."
},
"needApproval": {"en": "Your sick leave is under process in medical administration, you will be notified once approved.", "ar": "جازتك المرضية تحت الإجراء في الإدارة الطبية ، سوف يتم إشعارك فور الموافقه عليها."},
"pendingActivation": {"en": "Pending Activation", "ar": "في انتظار التنشيط"},
"awaitingApproval": {"en": "Awaiting Approval", "ar": "انتظر القبول"},
"liveCareSupportContact": {"en": "LiveCare Support Contact: ", "ar": "اتصل لايف كير: "},
"pharmaLiveCare": {"en": "Pharma LiveCare", "ar": "لايف كير الصيدلية"},
"pharmaLiveCare1": {"en": "What is Pharma LiveCare?", "ar": "ما هولايف كير الصيدلية؟"},
"pharmaLiveCareDesc1": {
"en": "Pharma LiveCare allows you to get consultation from your doctor virtually being in HMG Pharmacy booth.",
"ar": "تتيح لك خدمة لايف كير الصيدلية الحصول على استشارة من طبيبك المتواجد فعليًا في كشك صيدلية د.سليمان الحبيب."
},
"pharmaLiveCareDesc1": {"en": "Pharma LiveCare allows you to get consultation from your doctor virtually being in HMG Pharmacy booth.", "ar": "تتيح لك خدمة لايف كير الصيدلية الحصول على استشارة من طبيبك المتواجد فعليًا في كشك صيدلية د.سليمان الحبيب."},
"wherePharmaLiveCare": {"en": "Where can i find Pharma LiveCare?", "ar": "أين يمكنني أن أجد لايف كير الصيدلية؟"},
"pharmaLiveCareDesc2": {"en": "You can find the booth in HMG Pharmacies.", "ar": "يمكنك العثور على الكشك في صيدليات مستشفى د.سليمان الحبيب."},
"howPharmaLiveCare": {"en": "How can i use Pharma LiveCare?", "ar": "كيف يمكنني استخدام لايف كير الصيدلية؟"},
"pharmaLiveCareDesc3": {
"en": "Following the below steps you can easily benefit from the virtual consultation service:",
"ar": "باتباع الخطوات التالية يمكنك الاستفادة بسهولة من خدمة الاستشارة الافتراضية:"
},
"pharmaLiveCareDesc3": {"en": "Following the below steps you can easily benefit from the virtual consultation service:", "ar": "باتباع الخطوات التالية يمكنك الاستفادة بسهولة من خدمة الاستشارة الافتراضية:"},
"pharmaLiveCareScanQR": {"en": "Scan QR Code", "ar": "مسح رمز الاستجابة السريعة"},
"pharmaLiveCareScanQR1": {"en": "Scan the QR Code in the booth to make the connection", "ar": "امسح رمز الاستجابة السريعة في المقصورة لإجراء الاتصال"},
"pharmaLiveCareMakePayment": {"en": "Make Payment Online", "ar": "قم بالدفع عبر الإنترنت"},
@ -1896,6 +1884,12 @@ const Map localizedValues = {
"pharmaLiveCareJoinConsultation": {"en": "Join the virtual consultation from booth", "ar": "انضم إلى الاستشارة الافتراضية من الكبينة"},
"pharmaLiveCareJoinConsultation1": {"en": "Wait for the doctor in the pharma booth to join you", "ar": "انتظر حتى ينضم إليك الطبيب في كبينة لايف كير الصيدلية"},
"emergencyServicesSubtitle": {"en": "Always at your service", "ar": "في خدمتكم دائما"},
"rateDoctorResponse": {"en": "Rate Doctor Response", "ar": "تقييم استجابة الطبيب"},
"comments": {"en": "Comments", "ar": "تعليقات"},
"rateDoctorResponseHeading": {"en": "Please rate the doctor response:", "ar": "يرجى تقييم استجابة الطبيب:"},
"updateInsuranceManuallyDialog": {"en": "Would you like to update your insurance manually?", "ar": "هل ترغب في تحديث التأمين الخاص بك يدويًا؟"},
"viewReport": {"en": "View Report", "ar": "عرض التقرير"},
"sickLeaveAdmittedPatient": {"en": "You cannot activate this sick leave since you're an admitted patient.", "ar": "لا يمكنك تفعيل هذه الإجازة المرضية لأنك مريض مقبل."},
"InPatient": {"en": "InPatient", "ar": "خدمات"},
"InPatientServices": {"en": "Services", "ar": "تنويم"},
"InPatientServicesHeader": {"en": "InPatient Services", "ar": "خدمات التنويم"},

@ -24,6 +24,7 @@ class RequestSendLabReportEmail {
String projectID;
String invoiceNo;
String orderDate;
String orderNo;
RequestSendLabReportEmail(
{this.versionID,
@ -50,7 +51,8 @@ class RequestSendLabReportEmail {
this.doctorName,
this.projectID,
this.invoiceNo,
this.orderDate});
this.orderDate,
this.orderNo});
RequestSendLabReportEmail.fromJson(Map<String, dynamic> json) {
versionID = json['VersionID'];
@ -78,6 +80,7 @@ class RequestSendLabReportEmail {
projectID = json['ProjectID'];
invoiceNo = json['InvoiceNo'];
orderDate = json['OrderDate'];
orderNo = json['OrderNo'];
}
Map<String, dynamic> toJson() {
@ -107,6 +110,7 @@ class RequestSendLabReportEmail {
data['ProjectID'] = this.projectID;
data['InvoiceNo'] = this.invoiceNo;
data['OrderDate'] = this.orderDate;
data['OrderNo'] = this.orderNo;
return data;
}
}

@ -15,24 +15,26 @@ class RequestReports {
String tokenID;
int patientTypeID;
int patientType;
int projectID;
RequestReports(
{this.isReport,
this.encounterType,
this.requestType,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType});
this.encounterType,
this.requestType,
this.versionID,
this.channel,
this.languageID,
this.iPAdress,
this.generalid,
this.patientOutSA,
this.sessionID,
this.isDentalAllowedBackend,
this.deviceTypeID,
this.patientID,
this.tokenID,
this.patientTypeID,
this.patientType,
this.projectID});
RequestReports.fromJson(Map<String, dynamic> json) {
isReport = json['IsReport'];
@ -51,6 +53,7 @@ class RequestReports {
tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID'];
patientType = json['PatientType'];
projectID = json['ProjectID'];
}
Map<String, dynamic> toJson() {
@ -71,6 +74,7 @@ class RequestReports {
data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType;
data['ProjectID'] = this.projectID;
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,3 +1,5 @@
import 'dart:io';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/ask_doctor/AskDoctorReqTypes.dart';
import 'package:diplomaticquarterapp/core/model/ask_doctor/DoctorResponse.dart';
@ -18,9 +20,8 @@ class AskDoctorService extends BaseService {
dynamic localRes;
await baseAppClient.post(GET_CALL_INFO_HOURS_RESULT,
onSuccess: (dynamic response, int statusCode) {
localRes = response;
await baseAppClient.post(GET_CALL_INFO_HOURS_RESULT, onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
@ -29,11 +30,10 @@ class AskDoctorService extends BaseService {
}
Future getCallRequestTypeLOV() async {
hasError =false;
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_CALL_REQUEST_TYPE_LOV,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(GET_CALL_REQUEST_TYPE_LOV, onSuccess: (dynamic response, int statusCode) {
askDoctorReqTypes.clear();
response['ListReqTypes'].forEach((reqType) {
askDoctorReqTypes.add(AskDoctorReqTypes.fromJson(reqType));
@ -44,16 +44,28 @@ class AskDoctorService extends BaseService {
}, body: body);
}
Future getQuestionTypes() async {
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_QUESTION_TYPES, onSuccess: (dynamic response, int statusCode) {
askDoctorReqTypes.clear();
response['QuestionsTypes'].forEach((reqType) {
askDoctorReqTypes.add(AskDoctorReqTypes.fromJson(reqType));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future getDoctorResponse() async {
hasError =false;
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
body['from'] =
"${DateTime.now().year}-${DateTime.now().month}-${DateTime.now().day} 00:00:00";
body['from'] =
"${DateTime.now().year}-${DateTime.now().month}-${DateTime.now().day} ${DateTime.now().hour}:${DateTime.now().minute}:00";
await baseAppClient.post(GET_DOCTOR_RESPONSE,
onSuccess: (dynamic response, int statusCode) {
body['from'] = "${DateTime.now().year}-${DateTime.now().month}-${DateTime.now().day} 00:00:00";
body['from'] = "${DateTime.now().year}-${DateTime.now().month}-${DateTime.now().day} ${DateTime.now().hour}:${DateTime.now().minute}:00";
await baseAppClient.post(GET_DOCTOR_RESPONSE, onSuccess: (dynamic response, int statusCode) {
doctorResponseList.clear();
response['List_DoctorResponse'].forEach((reqType) {
doctorResponseList.add(DoctorResponse.fromJson(reqType));
@ -65,12 +77,11 @@ class AskDoctorService extends BaseService {
}
Future updateReadStatus({int transactionNo}) async {
hasError =false;
hasError = false;
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
body['TransactionNo'] = transactionNo;
await baseAppClient.post(UPDATE_READ_STATUS,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(UPDATE_READ_STATUS, onSuccess: (dynamic response, int statusCode) {
//TODO fix it
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -78,31 +89,63 @@ class AskDoctorService extends BaseService {
}, body: body);
}
Future sendRequestLOV({DoctorList doctorList,String requestType,String remark}) async {
hasError =false;
Future sendRequestLOV({DoctorList doctorList, String requestType, String remark}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['ProjectID'] = doctorList.projectID;
body['SetupID'] = doctorList.setupID;
body['DoctorID'] = doctorList.doctorID;
body['PatientMobileNumber'] = user.mobileNumber;
body['IsMessageSent'] = false;
body['RequestDate'] = DateUtil.yearMonthDay(DateTime.now());
body['RequestTime'] = DateUtil.time(DateTime.now());
body['RequestDate'] = DateUtil.convertDateToString(DateTime.now());
body['RequestTime'] = DateUtil.convertDateToString(DateTime.now());
body['Remarks'] = remark;
body['Status'] = 2;// 4 for testing only.."cancelled status insert" else should be changed to 1 in live version
body['Status'] = 2; // 4 for testing only.."cancelled status insert" else should be changed to 1 in live version
body['CreatedBy'] = 102;
body['CreatedOn'] = DateUtil.yearMonthDay(DateTime.now());
body['CreatedOn'] = DateUtil.convertDateToString(DateTime.now());
body['EditedBy'] = 102;
body['EditedOn'] = DateUtil.yearMonthDay(DateTime.now());
body['EditedOn'] = DateUtil.convertDateToString(DateTime.now());
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(INSERT_CALL_INFO,
onSuccess: (dynamic response, int statusCode) {
body['AppointmentNo'] = doctorList.appointmentNo;
body['ClinicID'] = doctorList.clinicID;
body['QuestionType'] = num.parse(requestType);
body['RequestType'] = num.parse(requestType);
body['RequestTypeID'] = num.parse(requestType);
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
await baseAppClient.post(INSERT_CALL_INFO, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future rateDoctorResponse({int transactionNo, int questionType, int rate, String notes, String mobileNo, String idNo, String patientName, int projectID, String language}) async {
hasError = false;
dynamic localRes;
Map<String, dynamic> body = Map();
body['MobileNo'] = mobileNo;
body['IdentificationNo'] = idNo;
body['PatientName'] = patientName;
body['IsUserLoggedIn'] = true;
body['ProjectID'] = projectID;
body['UILanguage'] = language;
body['BrowserInfo'] = Platform.localHostname;
body['COCTypeName'] = 3;
body['FormTypeID'] = 3;
body['DeviceInfo'] = Platform.localHostname;
body['Resolution'] = "400x847";
body['AppVersion'] = VERSION_ID;
body['ForDemo'] = false;
body['isVidaPlus'] = false;
body['TransactionNo'] = transactionNo;
body['QuestionType'] = questionType;
body['Rate'] = rate;
body['Notes'] = notes;
await baseAppClient.post(RATE_DOCTOR_RESPONSE, onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
return Future.value(localRes);
}
}

@ -153,6 +153,24 @@ class LabsService extends BaseService {
return Future.value(localRes);
}
Future getSickLeaveStatusByAdmissionNo(int projectID, int admissionNo) async {
hasError = false;
Map<String, dynamic> body = Map();
body['AdmissionNo'] = admissionNo;
body['ProjectID'] = projectID;
dynamic localRes;
await baseAppClient.post(GET_SICKLEAVE_STATUS_ADMISSION_NO, onSuccess: (dynamic response, int statusCode) {
localRes = response;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
return Future.value(localRes);
}
Future getPatientLabOrdersResults({PatientLabOrders patientLabOrder, String procedure}) async {
hasError = false;
Map<String, dynamic> body = Map();
@ -189,6 +207,7 @@ class LabsService extends BaseService {
_requestSendLabReportEmail.patientMobileNumber = userObj.mobileNumber;
_requestSendLabReportEmail.projectName = patientLabOrder.projectName;
_requestSendLabReportEmail.setupID = patientLabOrder.setupID;
_requestSendLabReportEmail.orderNo = patientLabOrder.orderNo;
await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true;

@ -8,17 +8,11 @@ class ReportsService extends BaseService {
List<Reports> reportsList = List();
List<AppointmentHistory> appointHistoryList = List();
String userAgreementContent = "";
RequestReports _requestReports = RequestReports(
isReport: true,
encounterType: 1,
requestType: 1,
patientOutSA: 0,
);
RequestReports _requestReports = RequestReports(isReport: true, encounterType: 1, requestType: 1, patientOutSA: 0, projectID: 0);
Future getReports() async {
hasError = false;
await baseAppClient.post(REPORTS,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(REPORTS, onSuccess: (dynamic response, int statusCode) {
reportsList.clear();
response['GetPatientMedicalStatus'].forEach((reports) {
reportsList.add(Reports.fromJson(reports));
@ -29,12 +23,25 @@ class ReportsService extends BaseService {
}, body: _requestReports.toJson());
}
Future getInpatientAdmissionsList() async {
hasError = false;
await baseAppClient.post(GET_INPATIENT_ADMISSIONS, onSuccess: (dynamic response, int statusCode) {
reportsList.clear();
print(response['AdmissionsForMedicalReport']);
response['AdmissionsForMedicalReport'].forEach((reports) {
// reportsList.add(Reports.fromJson(reports));
});
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: _requestReports.toJson());
}
Future getPatentAppointmentHistory() async {
hasError = false;
Map<String, dynamic> body = new Map<String, dynamic>();
body['IsForMedicalReport'] = true;
await baseAppClient.post(GET_PATIENT_AppointmentHistory,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(GET_PATIENT_AppointmentHistory, onSuccess: (dynamic response, int statusCode) {
appointHistoryList = [];
response['AppoimentAllHistoryResultList'].forEach((appoint) {
appointHistoryList.add(AppointmentHistory.fromJson(appoint));
@ -47,8 +54,7 @@ class ReportsService extends BaseService {
Future getUserTermsAndConditions() async {
hasError = false;
await baseAppClient.post(GET_USER_TERMS,
onSuccess: (dynamic response, int statusCode) {
await baseAppClient.post(GET_USER_TERMS, onSuccess: (dynamic response, int statusCode) {
userAgreementContent = response['UserAgreementContent'];
}, onFailure: (String error, int statusCode) {
hasError = true;
@ -60,9 +66,7 @@ class ReportsService extends BaseService {
Map<String, dynamic> body = Map<String, dynamic>();
body['RSummaryReport'] = isSummary;
hasError = false;
await baseAppClient.post(UPDATE_HEALTH_TERMS,
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
await baseAppClient.post(UPDATE_HEALTH_TERMS, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
@ -73,16 +77,13 @@ class ReportsService extends BaseService {
body['EmailAddress'] = email;
body['isDentalAllowedBackend'] = false;
hasError = false;
await baseAppClient.post(UPDATE_PATENT_EMAIL,
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
await baseAppClient.post(UPDATE_PATENT_EMAIL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future insertRequestForMedicalReport(
AppointmentHistory appointmentHistory) async {
Future insertRequestForMedicalReport(AppointmentHistory appointmentHistory) async {
Map<String, dynamic> body = new Map<String, dynamic>();
body['ClinicID'] = appointmentHistory.clinicID;
body['DoctorID'] = appointmentHistory.doctorID;
@ -98,23 +99,13 @@ class ReportsService extends BaseService {
body['Status'] = 1;
body['CreatedBy'] = 102;
hasError = false;
await baseAppClient.post(INSERT_REQUEST_FOR_MEDICAL_REPORT,
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
await baseAppClient.post(INSERT_REQUEST_FOR_MEDICAL_REPORT, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future sendEmailForMedicalReport(
String projectName,
String clinicName,
String doctorName,
String requestDate,
String invoiceNo,
int projectID,
String stamp,
String setupID) async {
Future sendEmailForMedicalReport(String projectName, String clinicName, String doctorName, String requestDate, String invoiceNo, int projectID, String stamp, String setupID) async {
Map<String, dynamic> body = new Map<String, dynamic>();
body['SetupID'] = setupID;
body['PrintDate'] = requestDate;
@ -135,11 +126,9 @@ class ReportsService extends BaseService {
dynamic response;
hasError = false;
await baseAppClient.post(SEND_MEDICAL_REPORT_EMAIL,
onSuccess: (dynamic res, int statusCode) {
response = res;
},
onFailure: (String error, int statusCode) {
await baseAppClient.post(SEND_MEDICAL_REPORT_EMAIL, onSuccess: (dynamic res, int statusCode) {
response = res;
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);

@ -54,6 +54,17 @@ class AskDoctorViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
Future getQuestionTypes() async {
setState(ViewState.Busy);
await _askDoctorService.getQuestionTypes();
if (_askDoctorService.hasError) {
error = _askDoctorService.error;
setState(ViewState.ErrorLocal);
AppToast.showErrorToast(message: error);
} else
setState(ViewState.Idle);
}
Future getCallInfoHoursResult({int projectId, int doctorId}) async {
setState(ViewState.Busy);
await _askDoctorService.getCallInfoHoursResult(projectId: projectId, doctorId: doctorId);

@ -33,6 +33,7 @@ class ReportsViewModel extends BaseViewModel {
setState(ViewState.Error);
} else {
_filterList();
await _reportsService.getInpatientAdmissionsList();
setState(ViewState.Idle);
}
}

@ -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();
}
}

@ -1,5 +1,6 @@
class DoctorList {
num clinicID;
dynamic appointmentNo;
String clinicName;
String doctorTitle;
num iD;
@ -45,6 +46,7 @@ class DoctorList {
DoctorList(
{this.clinicID,
this.appointmentNo,
this.clinicName,
this.doctorTitle,
this.iD,
@ -90,6 +92,7 @@ class DoctorList {
DoctorList.fromJson(Map<String, dynamic> json) {
clinicID = json['ClinicID'];
appointmentNo = json['AppointmentNo'];
clinicName = json['ClinicName'];
doctorTitle = json['DoctorTitle'];
iD = json['ID'];
@ -138,6 +141,7 @@ class DoctorList {
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ClinicID'] = this.clinicID;
data['AppointmentNo'] = this.appointmentNo;
data['ClinicName'] = this.clinicName;
data['DoctorTitle'] = this.doctorTitle;
data['ID'] = this.iD;

@ -446,11 +446,10 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
this.familyFileProvider.deativateActivateMemberFile(request).then((value) => refreshFamily(context));
}
refreshFamily(context) {
setState(() {
sharedPref.remove(FAMILY_FILE);
checkUserData();
});
refreshFamily(context) async {
await sharedPref.remove(FAMILY_FILE);
await checkUserData();
}
switchUser(user, context) {
@ -525,17 +524,23 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
Map<String, dynamic> request = {};
request["ID"] = ID;
request["Status"] = status;
this.familyFileProvider.acceptRejectFamily(request).then((value) => {GifLoaderDialogUtils.hideDialog(context), refreshFamily(context)});
this.familyFileProvider.acceptRejectFamily(request).then((value) async{
await refreshFamily(context);
GifLoaderDialogUtils.hideDialog(context);
});
}
checkUserData() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
var data2 = AuthenticatedUser.fromJson(await this.sharedPref.getObject(MAIN_USER));
// var data2 = AuthenticatedUser.fromJson(await this.sharedPref.getObject(MAIN_USER));
await getFamilyFiles();
setState(() {
this.user = data;
});
setState(() {
});
}
}
@ -552,16 +557,20 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
GifLoaderDialogUtils.showMyDialog(context);
try {
if (familySharedRecords == null) {
familySharedRecords = await familyFileProvider.getSharedRecordByStatus();
}
sentRecordsList =[];
familySharedRecords.getAllSharedRecordsByStatusList.forEach((element) {
if (element.status == 3) {
familySharedRecordsList.add(element);
}
sentRecordsList.add(element);
});
approvedRecordsList =[];
pendingRecordsList =[];
GetAllSharedRecordsByStatusResponse pendingAndApprovedRecords = await getUserViewRequest();
pendingAndApprovedRecords.getAllSharedRecordsByStatusList.forEach((element) {
print(element.toJson());
if (element.status == 2) {
@ -571,6 +580,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
}
});
} catch (ex) {
familySharedRecords = GetAllSharedRecordsByStatusResponse(getAllSharedRecordsByStatusList: []);
}
GifLoaderDialogUtils.hideDialog(context);

@ -1,204 +1,204 @@
import 'dart:async';
import 'dart:convert';
import 'package:diplomaticquarterapp/pages/conference/web_rtc/widgets/cam_view_widget.dart';
import 'package:diplomaticquarterapp/pages/conference/widgets/noise_box.dart';
import 'package:diplomaticquarterapp/pages/webRTC/signaling.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_webrtc/flutter_webrtc.dart';
import '../conference_button_bar.dart';
class CallHomePage extends StatefulWidget {
final String receiverId;
final String callerId;
const CallHomePage({Key key, this.receiverId, this.callerId}) : super(key: key);
@override
_CallHomePageState createState() => _CallHomePageState();
}
class _CallHomePageState extends State<CallHomePage> {
bool showNoise = true;
RTCVideoRenderer _localRenderer = RTCVideoRenderer();
RTCVideoRenderer _remoteRenderer = RTCVideoRenderer();
final StreamController<bool> _audioButton = StreamController<bool>.broadcast();
final StreamController<bool> _videoButton = StreamController<bool>.broadcast();
final StreamController<bool> _onButtonBarVisibleStreamController = StreamController<bool>.broadcast();
final StreamController<double> _onButtonBarHeightStreamController = StreamController<double>.broadcast();
//Stream to enable video
MediaStream localMediaStream;
MediaStream remoteMediaStream;
Signaling signaling = Signaling();
@override
void initState() {
// TODO: implement initState
super.initState();
startCall();
}
startCall() async{
await _localRenderer.initialize();
await _remoteRenderer.initialize();
await signaling.init();
final connected = await receivedCall();
}
Future<bool> receivedCall() async {
//Stream local media
localMediaStream = await navigator.mediaDevices.getUserMedia({'video': true, 'audio': true});
_localRenderer.srcObject = localMediaStream;
final connected = await signaling.acceptCall(widget.callerId, widget.receiverId, localMediaStream: localMediaStream,
onRemoteMediaStream: (remoteMediaStream){
// print(remoteMediaStream.toString());
// print(json.encode(remoteMediaStream.getTracks().asMap()));
this.remoteMediaStream = remoteMediaStream;
_remoteRenderer.srcObject = remoteMediaStream;
_remoteRenderer.addListener(() {
print('_remoteRenderer');
print(_remoteRenderer);
setState(() {});
});
},
onRemoteTrack: (track){
_remoteRenderer.srcObject.addTrack(track.track);
// setState(() {
// });
print(track.streams.first.getVideoTracks());
print(track.streams.first.getAudioTracks());
print(json.encode(track.streams.asMap()));
}
);
if(connected){
signaling.signalR.listen(
onAcceptCall: (arg0){
print(arg0.toString());
},
onCandidate: (candidateJson){
signaling.addCandidate(candidateJson);
},
onDeclineCall: (arg0,arg1){
// _onHangup();
},
onHangupCall: (arg0){
// _onHangup();
},
onOffer: (offerSdp, callerUser) async{
print('${offerSdp.toString()} | ${callerUser.toString()}');
await signaling.answerOffer(offerSdp);
}
);
}
return connected;
}
@override
void dispose() {
// TODO: implement dispose
super.dispose();
signaling.dispose();
_localRenderer?.dispose();
_remoteRenderer?.dispose();
_audioButton?.close();
_videoButton?.close();
localMediaStream?.dispose();
remoteMediaStream?.dispose();
_disposeStreamsAndSubscriptions();
}
Future<void> _disposeStreamsAndSubscriptions() async {
if (_onButtonBarVisibleStreamController != null) await _onButtonBarVisibleStreamController.close();
if (_onButtonBarHeightStreamController != null) await _onButtonBarHeightStreamController.close();
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
body: buildLayout(),
);
}
LayoutBuilder buildLayout() {
return LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
return Stack(
children: [
CamViewWidget(
localRenderer: _localRenderer,
remoteRenderer: _remoteRenderer,
constraints: constraints,
onButtonBarVisibleStreamController: _onButtonBarVisibleStreamController,
onButtonBarHeightStreamController: _onButtonBarHeightStreamController,
),
ConferenceButtonBar(
audioEnabled: _audioButton.stream,
videoEnabled: _videoButton.stream,
onAudioEnabled: _onAudioEnable,
onVideoEnabled: _onVideoEnabled,
onSwitchCamera: _onSwitchCamera,
onHangup: _onHangup,
onPersonAdd: () {},
onPersonRemove: () {},
onHeight: _onHeightBar,
onShow: _onShowBar,
onHide: _onHideBar,
),
],
);
},
);
}
Function _onAudioEnable() {
final audioTrack = localMediaStream.getAudioTracks()[0];
final mute = audioTrack.muted;
Helper.setMicrophoneMute(!mute, audioTrack);
_audioButton.add(mute);
}
Function _onVideoEnabled() {
final videoTrack = localMediaStream.getVideoTracks()[0];
bool videoEnabled = videoTrack.enabled;
localMediaStream.getVideoTracks()[0].enabled = !videoEnabled;
_videoButton.add(!videoEnabled);
}
Function _onSwitchCamera() {
Helper.switchCamera(localMediaStream.getVideoTracks()[0]);
}
void _onShowBar() {
setState(() {
});
_onButtonBarVisibleStreamController.add(true);
}
void _onHeightBar(double height) {
_onButtonBarHeightStreamController.add(height);
}
void _onHideBar() {
setState(() {
SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom]);
});
_onButtonBarVisibleStreamController.add(false);
}
Future<void> _onHangup() async {
signaling.hangupCall(widget.callerId, widget.receiverId);
print('onHangup');
Navigator.of(context).pop();
}
}
// import 'dart:async';
// import 'dart:convert';
//
// import 'package:diplomaticquarterapp/pages/conference/web_rtc/widgets/cam_view_widget.dart';
// import 'package:diplomaticquarterapp/pages/conference/widgets/noise_box.dart';
// import 'package:diplomaticquarterapp/pages/webRTC/signaling.dart';
// import 'package:flutter/material.dart';
// import 'package:flutter/services.dart';
// import 'package:flutter_webrtc/flutter_webrtc.dart';
//
// import '../conference_button_bar.dart';
//
// class CallHomePage extends StatefulWidget {
// final String receiverId;
// final String callerId;
//
// const CallHomePage({Key key, this.receiverId, this.callerId}) : super(key: key);
//
// @override
// _CallHomePageState createState() => _CallHomePageState();
// }
//
// class _CallHomePageState extends State<CallHomePage> {
// bool showNoise = true;
// RTCVideoRenderer _localRenderer = RTCVideoRenderer();
// RTCVideoRenderer _remoteRenderer = RTCVideoRenderer();
//
// final StreamController<bool> _audioButton = StreamController<bool>.broadcast();
// final StreamController<bool> _videoButton = StreamController<bool>.broadcast();
// final StreamController<bool> _onButtonBarVisibleStreamController = StreamController<bool>.broadcast();
// final StreamController<double> _onButtonBarHeightStreamController = StreamController<double>.broadcast();
//
// //Stream to enable video
// MediaStream localMediaStream;
// MediaStream remoteMediaStream;
// Signaling signaling = Signaling();
//
// @override
// void initState() {
// // TODO: implement initState
// super.initState();
// startCall();
// }
//
// startCall() async{
// await _localRenderer.initialize();
// await _remoteRenderer.initialize();
// await signaling.init();
// final connected = await receivedCall();
// }
//
//
// Future<bool> receivedCall() async {
// //Stream local media
// localMediaStream = await navigator.mediaDevices.getUserMedia({'video': true, 'audio': true});
// _localRenderer.srcObject = localMediaStream;
//
// final connected = await signaling.acceptCall(widget.callerId, widget.receiverId, localMediaStream: localMediaStream,
// onRemoteMediaStream: (remoteMediaStream){
//
// // print(remoteMediaStream.toString());
// // print(json.encode(remoteMediaStream.getTracks().asMap()));
// this.remoteMediaStream = remoteMediaStream;
// _remoteRenderer.srcObject = remoteMediaStream;
// _remoteRenderer.addListener(() {
// print('_remoteRenderer');
// print(_remoteRenderer);
// setState(() {});
// });
// },
// onRemoteTrack: (track){
// _remoteRenderer.srcObject.addTrack(track.track);
// // setState(() {
// // });
//
// print(track.streams.first.getVideoTracks());
// print(track.streams.first.getAudioTracks());
// print(json.encode(track.streams.asMap()));
// }
// );
//
// if(connected){
// signaling.signalR.listen(
// onAcceptCall: (arg0){
// print(arg0.toString());
// },
// onCandidate: (candidateJson){
// signaling.addCandidate(candidateJson);
// },
// onDeclineCall: (arg0,arg1){
// // _onHangup();
// },
// onHangupCall: (arg0){
// // _onHangup();
// },
//
// onOffer: (offerSdp, callerUser) async{
// print('${offerSdp.toString()} | ${callerUser.toString()}');
// await signaling.answerOffer(offerSdp);
// }
// );
// }
// return connected;
// }
//
// @override
// void dispose() {
// // TODO: implement dispose
// super.dispose();
// signaling.dispose();
// _localRenderer?.dispose();
// _remoteRenderer?.dispose();
// _audioButton?.close();
// _videoButton?.close();
// localMediaStream?.dispose();
// remoteMediaStream?.dispose();
// _disposeStreamsAndSubscriptions();
// }
//
// Future<void> _disposeStreamsAndSubscriptions() async {
// if (_onButtonBarVisibleStreamController != null) await _onButtonBarVisibleStreamController.close();
// if (_onButtonBarHeightStreamController != null) await _onButtonBarHeightStreamController.close();
// }
//
// @override
// Widget build(BuildContext context) {
// return Scaffold(
// backgroundColor: Colors.white,
// body: buildLayout(),
// );
// }
//
// LayoutBuilder buildLayout() {
// return LayoutBuilder(
// builder: (BuildContext context, BoxConstraints constraints) {
// return Stack(
// children: [
// CamViewWidget(
// localRenderer: _localRenderer,
// remoteRenderer: _remoteRenderer,
// constraints: constraints,
// onButtonBarVisibleStreamController: _onButtonBarVisibleStreamController,
// onButtonBarHeightStreamController: _onButtonBarHeightStreamController,
// ),
// ConferenceButtonBar(
// audioEnabled: _audioButton.stream,
// videoEnabled: _videoButton.stream,
// onAudioEnabled: _onAudioEnable,
// onVideoEnabled: _onVideoEnabled,
// onSwitchCamera: _onSwitchCamera,
// onHangup: _onHangup,
// onPersonAdd: () {},
// onPersonRemove: () {},
// onHeight: _onHeightBar,
// onShow: _onShowBar,
// onHide: _onHideBar,
// ),
// ],
// );
// },
// );
// }
//
// Function _onAudioEnable() {
// final audioTrack = localMediaStream.getAudioTracks()[0];
// final mute = audioTrack.muted;
// Helper.setMicrophoneMute(!mute, audioTrack);
// _audioButton.add(mute);
// }
//
// Function _onVideoEnabled() {
// final videoTrack = localMediaStream.getVideoTracks()[0];
// bool videoEnabled = videoTrack.enabled;
// localMediaStream.getVideoTracks()[0].enabled = !videoEnabled;
// _videoButton.add(!videoEnabled);
// }
//
// Function _onSwitchCamera() {
// Helper.switchCamera(localMediaStream.getVideoTracks()[0]);
// }
//
// void _onShowBar() {
// setState(() {
// });
// _onButtonBarVisibleStreamController.add(true);
// }
//
// void _onHeightBar(double height) {
// _onButtonBarHeightStreamController.add(height);
// }
//
// void _onHideBar() {
// setState(() {
// SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom]);
// });
// _onButtonBarVisibleStreamController.add(false);
// }
//
// Future<void> _onHangup() async {
// signaling.hangupCall(widget.callerId, widget.receiverId);
// print('onHangup');
// Navigator.of(context).pop();
// }
// }

@ -159,9 +159,12 @@ class _UpdateInsuranceManuallyState extends State<UpdateInsuranceManually> {
padding: EdgeInsets.all(18),
child: DefaultButton(
TranslationBase.of(context).submit,
isFormValid() ? () {
submitManualInsuranceUpdateRequest();
} : null,
() {
if(isFormValid())
submitManualInsuranceUpdateRequest();
else
AppToast.showErrorToast(message: TranslationBase.of(context).enterInsuranceDetails);
},
disabledColor: Colors.grey,
),
),

@ -1,6 +1,6 @@
import 'package:diplomaticquarterapp/core/service/insurance_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/pages/insurance/UpdateInsuranceManually.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';
@ -9,6 +9,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../locator.dart';
import '../../widgets/dialogs/confirm_dialog.dart';
import 'insurance_card_update_details.dart';
class InsurancePage extends StatelessWidget {
@ -144,7 +145,9 @@ class InsurancePage extends StatelessWidget {
getDetails({String setupID, int projectID, String patientIdentificationID, int patientID, String name, bool isFamily, int parentID = 0, BuildContext context}) {
GifLoaderDialogUtils.showMyDialog(context);
_insuranceCardService.getPatientInsuranceDetails(setupID: setupID, projectID: projectID, patientID: patientID, patientIdentificationID: patientIdentificationID, isFamily: isFamily, parentID: parentID).then((value) {
_insuranceCardService
.getPatientInsuranceDetails(setupID: setupID, projectID: projectID, patientID: patientID, patientIdentificationID: patientIdentificationID, isFamily: isFamily, parentID: parentID)
.then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (!_insuranceCardService.hasError && _insuranceCardService.isHaveInsuranceCard) {
Navigator.push(
@ -159,8 +162,20 @@ class InsurancePage extends StatelessWidget {
model.getInsuranceUpdated();
});
} else {
AppToast.showErrorToast(message: _insuranceCardService.error);
// AppToast.showErrorToast(message: _insuranceCardService.error);
updateManually(context, _insuranceCardService.error);
}
});
}
void updateManually(BuildContext context, String errorMsg) {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: errorMsg + ". " + TranslationBase.of(context).updateInsuranceManuallyDialog,
okText: TranslationBase.of(context).yes,
cancelText: TranslationBase.of(context).no,
okFunction: () => {Navigator.pop(context), Navigator.push(context, FadePage(page: UpdateInsuranceManually()))},
cancelFunction: () => {});
dialog.showAlertDialog(context);
}
}

@ -459,18 +459,18 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
],
),
),
projectViewModel.havePrivilege(82) || bypassPrivilageCheck
? Container()
: Container(
width: double.infinity,
height: double.infinity,
clipBehavior: Clip.antiAlias,
decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor.withOpacity(0.7), darkColor: CustomColors.lightGreyColor.withOpacity(0.7)),
child: Icon(
Icons.lock_outline,
size: 40,
),
)
// projectViewModel.havePrivilege(82) || bypassPrivilageCheck
// ? Container()
// : Container(
// width: double.infinity,
// height: double.infinity,
// clipBehavior: Clip.antiAlias,
// decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor.withOpacity(0.7), darkColor: CustomColors.lightGreyColor.withOpacity(0.7)),
// child: Icon(
// Icons.lock_outline,
// size: 40,
// ),
// )
],
),
),

@ -25,7 +25,6 @@ import 'package:diplomaticquarterapp/services/livecare_services/livecare_provide
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/SignalRUtil.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -81,7 +80,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
var themeNotifier;
DateTime currentBackPressTime;
SignalRUtil signalRUtil;
// SignalRUtil signalRUtil;
ToDoCountProviderModel toDoProvider;

@ -34,7 +34,7 @@ class _IncomingCallState extends State<IncomingCall> with SingleTickerProviderSt
CameraController _controller;
Future<void> _initializeControllerFuture;
bool isCameraReady = false;
Signaling signaling = Signaling()..init();
// Signaling signaling = Signaling()..init();
@override
void initState() {

@ -240,9 +240,11 @@ class _LiveCareHistoryCardState extends State<LiveCareHistoryCard> {
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service.sendLiveCareInvoiceEmail(widget.erRequestHistoryList.appointmentNo.toString(), widget.erRequestHistoryList.projectID, authUser.emailAddress, context).then((res) {
AppToast.showSuccessToast(message: TranslationBase(context).emailSentSuccessfully);
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: TranslationBase.of(context).emailSentSuccessfully);
}).catchError((err) {
AppToast.showErrorToast(message: err);
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err.toString());
print(err);
});
}

@ -1,21 +1,39 @@
import 'package:diplomaticquarterapp/core/model/ask_doctor/DoctorResponse.dart';
import 'package:diplomaticquarterapp/core/service/medical/ask_doctor_services.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
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_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
class ViewDoctorResponsesPage extends StatelessWidget {
class ViewDoctorResponsesPage extends StatefulWidget {
final DoctorResponse doctorResponse;
const ViewDoctorResponsesPage({Key key, this.doctorResponse}) : super(key: key);
@override
State<ViewDoctorResponsesPage> createState() => _ViewDoctorResponsesPageState();
}
class _ViewDoctorResponsesPageState extends State<ViewDoctorResponsesPage> {
int rate = 1;
TextEditingController textController = new TextEditingController();
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return BaseView<AskDoctorViewModel>(
onModelReady: (model) => model.updateReadStatus(transactionNo: doctorResponse.transactionNo),
onModelReady: (model) => model.updateReadStatus(transactionNo: widget.doctorResponse.transactionNo),
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
showNewAppBar: true,
@ -44,7 +62,7 @@ class ViewDoctorResponsesPage extends StatelessWidget {
itemBuilder: (context, _index) {
return Container(
padding: const EdgeInsets.only(left: 20, right: 12, top: 12, bottom: 12),
height: 130,
height: 160,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
@ -64,7 +82,7 @@ class ViewDoctorResponsesPage extends StatelessWidget {
children: [
Container(
child: Text(
(doctorResponse.doctorName ?? ""),
(widget.doctorResponse.doctorName ?? ""),
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
@ -75,7 +93,7 @@ class ViewDoctorResponsesPage extends StatelessWidget {
),
Container(
child: Text(
(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(doctorResponse.createdOn)) ?? ""),
(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.doctorResponse.createdOn)) ?? ""),
style: TextStyle(
fontSize: 14,
color: Color(0xff2E303A),
@ -86,7 +104,7 @@ class ViewDoctorResponsesPage extends StatelessWidget {
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(
doctorResponse.transactions[_index]['InfoStatusDescription'],
widget.doctorResponse.transactions[_index]['DoctorResponse'],
style: TextStyle(
fontSize: 16,
color: Color(0xff2E303A),
@ -94,11 +112,231 @@ class ViewDoctorResponsesPage extends StatelessWidget {
),
),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: DefaultButton(
TranslationBase.of(context).rateDoctorResponse,
() {
openResponseRateDialog(context);
},
color: CustomColors.accentColor,
),
),
],
),
);
},
separatorBuilder: (context, index) => SizedBox(height: 14),
itemCount: doctorResponse.transactions.length);
itemCount: widget.doctorResponse.transactions.length);
}
void openResponseRateDialog(BuildContext context) {
showModalBottomSheet(
context: context,
enableDrag: true,
isDismissible: true,
isScrollControlled: true,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only(topLeft: Radius.circular(12), topRight: Radius.circular(12)),
),
backgroundColor: Colors.white,
builder: (context) {
return StatefulBuilder(builder: (BuildContext context, StateSetter setState) {
return Container(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
SizedBox(
height: 16.0,
),
Text(
TranslationBase.of(context).rateDoctorResponseHeading,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
letterSpacing: -0.64,
),
),
Padding(
padding: const EdgeInsets.all(24.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Container(
margin: rate == 1 ? EdgeInsets.only(left: 3.0, right: 3.0) : EdgeInsets.only(left: 0.0, right: 0.0),
decoration: rate == 1
? BoxDecoration(borderRadius: BorderRadius.circular(100), border: Border.all(width: 3, color: CustomColors.green))
: BoxDecoration(borderRadius: BorderRadius.circular(100), border: Border.all(width: 3, color: CustomColors.white)),
child: IconButton(
onPressed: () {
rate = 1;
setState(() {});
},
iconSize: 35,
icon: SvgPicture.asset('assets/images/new/appointment-rating/5.svg'),
),
),
Container(
margin: rate == 0 ? EdgeInsets.only(left: 3.0, right: 3.0) : EdgeInsets.only(left: 0.0, right: 0.0),
decoration: rate == 0
? BoxDecoration(borderRadius: BorderRadius.circular(100), border: Border.all(width: 3, color: CustomColors.green))
: BoxDecoration(borderRadius: BorderRadius.circular(100), border: Border.all(width: 3, color: CustomColors.white)),
child: IconButton(
onPressed: () {
rate = 0;
setState(() {});
},
iconSize: 35,
icon: SvgPicture.asset('assets/images/new/appointment-rating/1.svg'),
),
),
],
),
),
if (rate == 0)
Container(
padding: const EdgeInsets.all(24.0),
child: Padding(
padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
child: inputWidget(TranslationBase.of(context).comments, "", textController, isEnable: true),
),
),
SizedBox(
height: 16.0,
),
Container(
margin: EdgeInsets.fromLTRB(24.0, 0.0, 24.0, 24.0),
child: DefaultButton(
TranslationBase.of(context).submit,
() {
if (textController.text.isEmpty) {
AppToast.showErrorToast(message: "Please enter comments");
} else {
rateDoctorResponse();
}
},
color: CustomColors.accentColor,
),
),
],
),
);
});
}).then((value) {
rate = 1;
setState(() {});
});
}
void rateDoctorResponse() {
GifLoaderDialogUtils.showMyDialog(context);
AskDoctorService service = new AskDoctorService();
service
.rateDoctorResponse(
transactionNo: widget.doctorResponse.transactionNo,
questionType: widget.doctorResponse.requestType,
rate: rate,
notes: textController.text,
mobileNo: projectViewModel.user.mobileNumber,
idNo: projectViewModel.user.patientIdentificationNo,
patientName: projectViewModel.user.firstName + " " + projectViewModel.user.lastName,
projectID: widget.doctorResponse.projectID,
language: projectViewModel.isArabic ? "ar" : "en")
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: res['SuccessMsg']);
Navigator.of(context).pop();
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
});
}
Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {String prefix, bool isEnable = true, bool hasSelection = false}) {
return Container(
padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: isEnable ? Colors.white : CustomColors.grey2.withOpacity(0.4),
border: Border.all(
color: Color(0xffefefef),
width: 1,
),
),
child: InkWell(
onTap: hasSelection ? () {} : null,
child: Row(
children: [
Expanded(
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
_labelText,
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
letterSpacing: -0.44,
),
),
TextField(
enabled: isEnable,
scrollPadding: EdgeInsets.all(40.0),
keyboardType: TextInputType.text,
controller: _controller,
onChanged: (value) => {},
style: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff2B353E),
letterSpacing: -0.44,
),
decoration: InputDecoration(
isDense: true,
hintText: _hintText,
fillColor: CustomColors.accentColor,
hintStyle: TextStyle(
fontSize: isEnable ? 14 : 24,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: isEnable ? Color(0xff575757) : CustomColors.black,
letterSpacing: -0.56,
),
prefixIconConstraints: BoxConstraints(minWidth: 50),
prefixIcon: prefix == null
? null
: Text(
"+" + prefix,
style: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w500,
color: Color(0xff2E303A),
letterSpacing: -0.56,
),
),
contentPadding: EdgeInsets.zero,
border: InputBorder.none,
focusedBorder: InputBorder.none,
enabledBorder: InputBorder.none,
),
),
],
),
),
if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined),
],
),
),
);
}
}

@ -85,24 +85,20 @@ class DoctorResponse extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('${doctor.doctorName}'),
SizedBox(
height: 5,
),
Texts(
'${doctor.requestTypeDescription}'),
Texts('${doctor.requestTypeDescription}'),
],
),
),
),
Padding(
padding: const EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0),
child: Icon(projectViewModel.isArabic
? Icons.arrow_forward_ios
: Icons.arrow_back_ios),
child: Icon(projectViewModel.isArabic ? Icons.arrow_back_ios : Icons.arrow_forward_ios),
)
],
),
@ -158,24 +154,20 @@ class DoctorResponse extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('${doctor.doctorName}'),
SizedBox(
height: 5,
),
Texts(
'${doctor.requestTypeDescription}'),
Texts('${doctor.requestTypeDescription}'),
],
),
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Icon(projectViewModel.isArabic
? Icons.arrow_forward_ios
: Icons.arrow_back_ios),
child: Icon(projectViewModel.isArabic ? Icons.arrow_back_ios : Icons.arrow_forward_ios),
)
],
),

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_view_mod
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -26,7 +27,7 @@ class _RequestTypePageState extends State<RequestTypePage> {
@override
Widget build(BuildContext context) {
return BaseView<AskDoctorViewModel>(
onModelReady: (model) => model.getCallRequestTypeLOVs(),
onModelReady: (model) => model.getQuestionTypes(),
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).requestType,
@ -111,6 +112,7 @@ class _RequestTypePageState extends State<RequestTypePage> {
model.sendRequestLOV(doctorList: widget.doctorList, requestType: parameterCode.toString(), remark: question).then((value) {
if (model.state != ViewState.ErrorLocal || model.state != ViewState.Error) {
Navigator.pop(context);
AppToast.showSuccessToast(message: TranslationBase.of(context).RRTRequestSuccess);
}
})
},

@ -1,9 +1,15 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/model/sick_leave/admission_status_for_sick_leave.dart';
import 'package:diplomaticquarterapp/core/model/sick_leave/sick_leave.dart';
import 'package:diplomaticquarterapp/core/service/medical/labs_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/patient_sick_leave_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/sickleave_workplace_update_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
@ -110,20 +116,56 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
);
}
void openWorkPlaceUpdatePage(int requestNumber, String setupID, PatientSickLeaveViewMode model, int index, int projectID) {
Future<void> openWorkPlaceUpdatePage(int requestNumber, String setupID, PatientSickLeaveViewMode model, int index, int projectID) async {
if (model.sickLeaveList[index].admissionNo != 0 && model.sickLeaveList[index].admissionNo != null) {
getSickLeaveStatusByAdmissionNo(requestNumber, setupID, model, index, projectID);
} else {
openWorkPlaceUpdatePageFunc(requestNumber, setupID, model, index, projectID);
}
}
void getSickLeaveStatusByAdmissionNo(int requestNumber, String setupID, PatientSickLeaveViewMode model, int index, int projectID) {
AdmissionStatusForSickLeave admissionStatusForSickLeave;
LabsService service = new LabsService();
GifLoaderDialogUtils.showMyDialog(context);
service.getSickLeaveStatusByAdmissionNo(model.sickLeaveList[index].projectID, model.sickLeaveList[index].admissionNo).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res["List_GetSickLeaveStatusByAdmissionNo"].length != 0) {
admissionStatusForSickLeave = AdmissionStatusForSickLeave.fromJson(res["List_GetSickLeaveStatusByAdmissionNo"][0]);
if (admissionStatusForSickLeave.status != 6) {
AppToast.showErrorToast(message: TranslationBase.of(context).sickLeaveAdmittedPatient);
} else {
openWorkPlaceUpdatePageFunc(requestNumber, setupID, model, index, projectID);
}
} else {
openWorkPlaceUpdatePageFunc(requestNumber, setupID, model, index, projectID);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
void openWorkPlaceUpdatePageFunc(int requestNumber, String setupID, PatientSickLeaveViewMode model, int index, int projectID) {
Navigator.push(
context,
FadePage(
page: WorkplaceUpdatePage(
context,
FadePage(
page: WorkplaceUpdatePage(
requestNumber: requestNumber,
setupID: setupID,
projectID: projectID,
))).then((value) {
print(value);
if (value != null && value == true) {
model.getSickLeave();
showEmailDialog(model, index);
}
});
),
),
).then(
(value) {
print(value);
if (value != null && value == true) {
model.getSickLeave();
showEmailDialog(model, index);
}
},
);
}
}

@ -21,19 +21,23 @@ class HomeReportPage extends StatefulWidget {
}
class _HomeReportPageState extends State<HomeReportPage> with SingleTickerProviderStateMixin {
TabController _tabController;
TabController _tabController_new;
List<ImagesInfo> imagesInfo = List();
int _currentPage = 0;
@override
void initState() {
_tabController_new = TabController(length: 2, vsync: this);
WidgetsBinding.instance.addPostFrameCallback((_) {
getInPatientAdmissionList();
});
super.initState();
_tabController = TabController(length: 4, vsync: this);
}
@override
void dispose() {
super.dispose();
_tabController.dispose();
_tabController_new.dispose();
}
@override
@ -57,74 +61,138 @@ class _HomeReportPageState extends State<HomeReportPage> with SingleTickerProvid
showNewAppBarTitle: true,
backgroundColor: Color(0xffF7F7F7),
imagesInfo: imagesInfo,
body: Column(
children: [
TabBar(
isScrollable: true,
controller: _tabController,
indicatorWeight: 3.0,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Color(0xff2B353E),
unselectedLabelColor: Color(0xff575757),
labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
labelStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
unselectedLabelStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
tabs: [
Text(
TranslationBase.of(context).requested,
style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
),
Text(
TranslationBase.of(context).ready,
style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
),
Text(
TranslationBase.of(context).completed,
style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
body: Container(
child: Column(
children: [
TabBar(
controller: _tabController_new,
indicatorWeight: 3.0,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Color(0xff2B353E),
unselectedLabelColor: Color(0xff575757),
labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
labelStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
Text(
TranslationBase.of(context).cancelled,
style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
),
],
),
if (model.user != null)
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
ReportListWidget(reportList: model.reportsOrderRequestList, emailAddress: model.user.emailAddress),
ReportListWidget(reportList: model.reportsOrderReadyList, emailAddress: model.user.emailAddress),
ReportListWidget(reportList: model.reportsOrderCompletedList, emailAddress: model.user.emailAddress),
ReportListWidget(reportList: model.reportsOrderCanceledList, emailAddress: model.user.emailAddress),
],
unselectedLabelStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
onTap: (int value) {
print(value);
setState(() {});
},
tabs: [
Text(
TranslationBase.of(context).inPatient,
style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
),
Text(
TranslationBase.of(context).outpatient,
style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
),
],
),
if (projectViewModel.havePrivilege(21))
Padding(
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).requestMedicalReport.toLowerCase().capitalizeFirstofEach,
() => Navigator.push(
context,
FadePage(
page: MedicalReports(),
),
if (model.user != null)
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController_new,
children: <Widget>[
Container(),
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.reportsOrderRequestList, emailAddress: model.user.emailAddress),
ReportListWidget(reportList: model.reportsOrderReadyList, emailAddress: model.user.emailAddress),
ReportListWidget(reportList: model.reportsOrderCanceledList, emailAddress: model.user.emailAddress),
],
),
)
],
),
)
],
),
),
)
],
if (projectViewModel.havePrivilege(21) && _tabController_new.index == 1)
Padding(
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).requestMedicalReport.toLowerCase().capitalizeFirstofEach,
() => Navigator.push(
context,
FadePage(
page: MedicalReports(),
),
).then((value) {
model.getReports();
}),
),
)
],
),
),
),
);
}
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,
),
),
],
),
);
}
void getInPatientAdmissionList() {}
}

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/model/reports/Reports.dart';
import 'package:diplomaticquarterapp/core/service/medical/reports_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -55,9 +56,24 @@ class ReportListWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (report.doctorName != null)
Text(
report.doctorName,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
report.doctorName,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(DateUtil.getDayMonthYearDateFormatted(report.requestDate),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12)),
Text(DateUtil.formatDateToTimeLang(report.requestDate, projectViewModel.isArabic),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12)),
],
),
],
),
if (report.doctorName != null) SizedBox(height: 6),
Row(
@ -93,14 +109,23 @@ class ReportListWidget extends StatelessWidget {
emptyIcon: Icons.star_border,
),
if (reportList[index].status == 2)
IconButton(
icon: Icon(Icons.email),
color: Color(0xff28323A),
constraints: BoxConstraints(),
padding: EdgeInsets.zero,
onPressed: () {
showConfirmMessage(reportList[index]);
})
Row(
children: [
Padding(
padding: const EdgeInsets.only(right: 11.0, left: 11.0),
child: Text(TranslationBase.of(context).viewReport,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, fontStyle: FontStyle.italic, color: CustomColors.accentColor, letterSpacing: -0.48, height: 18 / 12, decoration: TextDecoration.underline)),
),
IconButton(
icon: Icon(Icons.email),
color: Color(0xff28323A),
constraints: BoxConstraints(),
padding: EdgeInsets.zero,
onPressed: () {
showConfirmMessage(reportList[index]);
})
],
),
],
),
],

@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
@ -143,6 +144,9 @@ class _WorkplaceUpdatePageState extends State<WorkplaceUpdatePage> {
scrollPadding: EdgeInsets.zero,
keyboardType: TextInputType.name,
controller: _controller,
inputFormatters: [
projectViewModel.isArabic ? FilteringTextInputFormatter.allow(RegExp("[ء-ي ]")) : FilteringTextInputFormatter.allow(RegExp("[a-zA-Z ]")),
],
onChanged: (value) => {_onPassportTextChanged(value)},
style: TextStyle(
fontSize: 14,

@ -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)));
// });
// }
// }

@ -1,277 +1,277 @@
import 'dart:convert';
import 'package:diplomaticquarterapp/uitl/SignalRUtil.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_webrtc/flutter_webrtc.dart';
typedef void StreamStateCallback(MediaStream stream);
typedef void RTCIceGatheringStateCallback(RTCIceGatheringState state);
typedef void RTCPeerConnectionStateCallback(RTCPeerConnectionState state);
typedef void RTCSignalingStateCallback(RTCSignalingState state);
final Map<String, dynamic> constraints = {
'mandatory': {},
'optional': [
{'DtlsSrtpKeyAgreement': true},
]
};
Map<String, dynamic> snapsis_ice_config = {
'iceServers': [
{ "urls": 'stun:15.185.116.59:3478' },
{ "urls": "turn:15.185.116.59:3479", "username": "admin", "credential": "admin" },
],
// 'sdpSemantics': 'unified-plan'
};
Map<String, dynamic> twilio_ice_config = {
"ice_servers": [
{
"url": "stun:global.stun.twilio.com:3478?transport=udp",
"urls": "stun:global.stun.twilio.com:3478?transport=udp"
},
{
"url": "turn:global.turn.twilio.com:3478?transport=udp",
"username": "ce8042842b62c21bd20b176f80d6067fd3db81b1e9766312418ef5421d9ca2a2",
"urls": "turn:global.turn.twilio.com:3478?transport=udp",
"credential": "UzGOsiLwPZJ32cjafAebfDDpVrqeQjgpFHZEdau/8r4="
},
{
"url": "turn:global.turn.twilio.com:3478?transport=tcp",
"username": "ce8042842b62c21bd20b176f80d6067fd3db81b1e9766312418ef5421d9ca2a2",
"urls": "turn:global.turn.twilio.com:3478?transport=tcp",
"credential": "UzGOsiLwPZJ32cjafAebfDDpVrqeQjgpFHZEdau/8r4="
},
{
"url": "turn:global.turn.twilio.com:443?transport=tcp",
"username": "ce8042842b62c21bd20b176f80d6067fd3db81b1e9766312418ef5421d9ca2a2",
"urls": "turn:global.turn.twilio.com:443?transport=tcp",
"credential": "UzGOsiLwPZJ32cjafAebfDDpVrqeQjgpFHZEdau/8r4="
}
],
// 'sdpSemantics': 'unified-plan'
};
Map<String, dynamic> google_ice_config = {
'iceServers': [
{
'urls': [
'stun:stun.l.google.com:19302',
'stun:stun1.l.google.com:19302',
'stun:stun2.l.google.com:19302',
'stun:stun3.l.google.com:19302'
]
},
],
// 'sdpSemantics': 'unified-plan'
};
Map<String, dynamic> aws_ice_config = {
'iceServers': [
{'url': "stun:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3478"},
{'url': "turn:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3479", 'credential': "admin", 'username': "admin"}
],
// 'sdpSemantics': 'unified-plan'
};
class Signaling {
dispose() {
if (peerConnection != null) {
peerConnection.dispose();
peerConnection.getLocalStreams().forEach((e) => e.dispose());
peerConnection.getRemoteStreams().forEach((e) => e.dispose());
}
signalR.closeConnection();
}
init() async{
// Create Peer Connection
peerConnection = await createPeerConnection(google_ice_config, constraints);
registerPeerConnectionListeners();
}
initializeSignalR(String userName) async {
if (signalR != null) await signalR.closeConnection();
// https://vcallapi.hmg.com/webRTCHub?source=web&username=zohaib
// signalR = SignalRUtil(hubName: "https://vcallapi.hmg.com/webRTCHub?source=mobile&username=$userName");
signalR = SignalRUtil(hubName: "http://35.193.237.29/webRTCHub?source=mobile&username=$userName");
final connected = await signalR.openConnection();
if (!connected) throw 'Failed to connect SignalR';
}
Map<String, dynamic> configuration = {
// 'iceServers': [
// {
// 'urls': ['stun:stun1.l.google.com:19302', 'stun:stun2.l.google.com:19302']
// }
// ]
'iceServers': [
// {'url': "stun:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3478"},
// {'url': "turn:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3479", 'credential': "admin", 'username': "admin"}
// {'url': "stun:15.185.116.59:3478"},
// {
// "url":"turn:15.185.116.59:3479",
// "username": "admin",
// "credential":"admin"
// }
{
"url": "stun:global.stun.twilio.com:3478?transport=udp",
"urls": "stun:global.stun.twilio.com:3478?transport=udp"
},
{
"url": "turn:global.turn.twilio.com:3478?transport=udp",
"username": "f18fc347ba4aeeaa1b00f5199b1e900834b464962d434a4a89b4cdba02510047",
"urls": "turn:global.turn.twilio.com:3478?transport=udp",
"credential": "WX16BB+9nKm0f+Whf5EwpM8S/Yv+T2tlvQWLfdV7oqo="
}
]
};
SignalRUtil signalR;
RTCPeerConnection peerConnection;
MediaStream localStream;
MediaStream remoteStream;
RTCDataChannel dataChannel;
// Future<bool> call(String patientId, String mobile, {@required RTCVideoRenderer localVideo, @required RTCVideoRenderer remoteVideo}) async {
// await initializeSignalR(patientId);
//
// // final isCallPlaced = await FCM.sendCallNotifcationTo(DOCTOR_TOKEN, patientId, mobile);
// if(!isCallPlaced)
// throw 'Failed to notify target for call';
//
// return isCallPlaced;
// }
Future<bool> acceptCall(String caller, String receiver, {@required MediaStream localMediaStream, @required Function(MediaStream) onRemoteMediaStream, @required Function(RTCTrackEvent) onRemoteTrack}) async {
await initializeSignalR(receiver);
signalR.setContributors(caller: caller, receiver: receiver);
await signalR.acceptCall(receiver, caller).catchError((e) => throw 'Failed to inform signalR that i accepted a call');
peerConnection.addStream(localMediaStream);
// peerConnection?.onTrack = (track){
// onRemoteTrack(track);
// };
peerConnection?.onAddStream = (MediaStream stream) {
remoteStream = stream;
onRemoteMediaStream?.call(stream);
};
return true;
}
Future<bool> declineCall(String caller, String receiver) async {
await initializeSignalR(receiver);
signalR.setContributors(caller: caller, receiver: receiver);
await signalR.declineCall(receiver, caller).catchError((e) => throw 'Failed to inform signalR that i accepted a call');
// peerConnection.addStream(localMediaStream);
//
// peerConnection?.onAddStream = (MediaStream stream) {
// remoteStream = stream;
// onRemoteMediaStream?.call(stream);
// };
return true;
}
Future hangupCall(String caller, String receiver) async {
await signalR.hangupCall(caller, receiver);
dispose();
}
answerOffer(String sdp) async {
final offer = jsonDecode(sdp);
final caller = offer['caller'];
final receiver = offer['target'];
final offerSdp = offer['sdp'];
peerConnection.setRemoteDescription(rtcSessionDescriptionFrom(offerSdp)).then((value) {
return peerConnection.createAnswer().catchError((e){
print(e);
});
}).then((anwser) {
return peerConnection.setLocalDescription(anwser).catchError((e){
print(e);
});
}).then((value) {
return peerConnection.getLocalDescription().catchError((e){
print(e);
});
}).then((answer) {
return signalR.answerOffer(answer, caller, receiver).catchError((e){
print(e);
});
}).catchError((e) {
print(e);
});
}
Future<void> hangUp(RTCVideoRenderer localVideo) async {}
Future<String> createSdpAnswer(String toOfferSdp) async {
final offerSdp = rtcSessionDescriptionFrom(jsonDecode(toOfferSdp));
peerConnection.setRemoteDescription(offerSdp).catchError((e){
print(e);
});
final answer = await peerConnection.createAnswer().catchError((e){
print(e);
});
var answerSdp = json.encode(answer); // Send SDP via Push or any channel
return answerSdp;
}
Future<String> createSdpOffer() async {
final offer = await peerConnection.createOffer();
await peerConnection.setLocalDescription(offer).catchError((e){
print(e);
});
final map = offer.toMap();
var offerSdp = json.encode(map); // Send SDP via Push or any channel
return offerSdp;
}
addCandidate(String candidateJson) {
peerConnection.addCandidate(rtcIceCandidateFrom(candidateJson)).catchError((e){
print(e);
});
}
void registerPeerConnectionListeners() {
peerConnection.onRenegotiationNeeded = (){
print('Renegotiation Needed...');
};
peerConnection.onIceCandidate = (RTCIceCandidate candidate) {
// print(json.encode(candidate.toMap()));
signalR.addIceCandidate(json.encode(candidate.toMap())).catchError((e){
print(e);
});
};
peerConnection?.onIceGatheringState = (RTCIceGatheringState state) {
print('ICE gathering state changed: $state');
};
peerConnection?.onConnectionState = (RTCPeerConnectionState state) {
print('Connection state change: $state');
};
peerConnection?.onSignalingState = (RTCSignalingState state) {
print('Signaling state change: $state');
};
}
}
rtcSessionDescriptionFrom(Map sdp) {
return RTCSessionDescription(
sdp['sdp'],
sdp['type'],
);
}
rtcIceCandidateFrom(String json) {
final map = jsonDecode(json)['candidate'];
return RTCIceCandidate(map['candidate'], map['sdpMid'], map['sdpMLineIndex']);
}
// import 'dart:convert';
//
// import 'package:diplomaticquarterapp/uitl/SignalRUtil.dart';
// import 'package:flutter/cupertino.dart';
// import 'package:flutter_webrtc/flutter_webrtc.dart';
//
// typedef void StreamStateCallback(MediaStream stream);
// typedef void RTCIceGatheringStateCallback(RTCIceGatheringState state);
// typedef void RTCPeerConnectionStateCallback(RTCPeerConnectionState state);
// typedef void RTCSignalingStateCallback(RTCSignalingState state);
//
// final Map<String, dynamic> constraints = {
// 'mandatory': {},
// 'optional': [
// {'DtlsSrtpKeyAgreement': true},
// ]
// };
//
// Map<String, dynamic> snapsis_ice_config = {
// 'iceServers': [
// { "urls": 'stun:15.185.116.59:3478' },
// { "urls": "turn:15.185.116.59:3479", "username": "admin", "credential": "admin" },
// ],
// // 'sdpSemantics': 'unified-plan'
// };
// Map<String, dynamic> twilio_ice_config = {
// "ice_servers": [
// {
// "url": "stun:global.stun.twilio.com:3478?transport=udp",
// "urls": "stun:global.stun.twilio.com:3478?transport=udp"
// },
// {
// "url": "turn:global.turn.twilio.com:3478?transport=udp",
// "username": "ce8042842b62c21bd20b176f80d6067fd3db81b1e9766312418ef5421d9ca2a2",
// "urls": "turn:global.turn.twilio.com:3478?transport=udp",
// "credential": "UzGOsiLwPZJ32cjafAebfDDpVrqeQjgpFHZEdau/8r4="
// },
// {
// "url": "turn:global.turn.twilio.com:3478?transport=tcp",
// "username": "ce8042842b62c21bd20b176f80d6067fd3db81b1e9766312418ef5421d9ca2a2",
// "urls": "turn:global.turn.twilio.com:3478?transport=tcp",
// "credential": "UzGOsiLwPZJ32cjafAebfDDpVrqeQjgpFHZEdau/8r4="
// },
// {
// "url": "turn:global.turn.twilio.com:443?transport=tcp",
// "username": "ce8042842b62c21bd20b176f80d6067fd3db81b1e9766312418ef5421d9ca2a2",
// "urls": "turn:global.turn.twilio.com:443?transport=tcp",
// "credential": "UzGOsiLwPZJ32cjafAebfDDpVrqeQjgpFHZEdau/8r4="
// }
// ],
// // 'sdpSemantics': 'unified-plan'
// };
// Map<String, dynamic> google_ice_config = {
// 'iceServers': [
// {
// 'urls': [
// 'stun:stun.l.google.com:19302',
// 'stun:stun1.l.google.com:19302',
// 'stun:stun2.l.google.com:19302',
// 'stun:stun3.l.google.com:19302'
// ]
// },
// ],
// // 'sdpSemantics': 'unified-plan'
// };
// Map<String, dynamic> aws_ice_config = {
// 'iceServers': [
// {'url': "stun:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3478"},
// {'url': "turn:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3479", 'credential': "admin", 'username': "admin"}
// ],
// // 'sdpSemantics': 'unified-plan'
// };
//
// class Signaling {
// dispose() {
// if (peerConnection != null) {
// peerConnection.dispose();
// peerConnection.getLocalStreams().forEach((e) => e.dispose());
// peerConnection.getRemoteStreams().forEach((e) => e.dispose());
// }
// signalR.closeConnection();
// }
//
// init() async{
// // Create Peer Connection
// peerConnection = await createPeerConnection(google_ice_config, constraints);
// registerPeerConnectionListeners();
// }
//
// initializeSignalR(String userName) async {
// if (signalR != null) await signalR.closeConnection();
// // https://vcallapi.hmg.com/webRTCHub?source=web&username=zohaib
// // signalR = SignalRUtil(hubName: "https://vcallapi.hmg.com/webRTCHub?source=mobile&username=$userName");
// signalR = SignalRUtil(hubName: "http://35.193.237.29/webRTCHub?source=mobile&username=$userName");
// final connected = await signalR.openConnection();
// if (!connected) throw 'Failed to connect SignalR';
// }
//
// Map<String, dynamic> configuration = {
// // 'iceServers': [
// // {
// // 'urls': ['stun:stun1.l.google.com:19302', 'stun:stun2.l.google.com:19302']
// // }
// // ]
//
// 'iceServers': [
// // {'url': "stun:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3478"},
// // {'url': "turn:ec2-15-185-116-59.me-south-1.compute.amazonaws.com:3479", 'credential': "admin", 'username': "admin"}
// // {'url': "stun:15.185.116.59:3478"},
// // {
// // "url":"turn:15.185.116.59:3479",
// // "username": "admin",
// // "credential":"admin"
// // }
// {
// "url": "stun:global.stun.twilio.com:3478?transport=udp",
// "urls": "stun:global.stun.twilio.com:3478?transport=udp"
// },
// {
// "url": "turn:global.turn.twilio.com:3478?transport=udp",
// "username": "f18fc347ba4aeeaa1b00f5199b1e900834b464962d434a4a89b4cdba02510047",
// "urls": "turn:global.turn.twilio.com:3478?transport=udp",
// "credential": "WX16BB+9nKm0f+Whf5EwpM8S/Yv+T2tlvQWLfdV7oqo="
// }
// ]
// };
//
// SignalRUtil signalR;
//
// RTCPeerConnection peerConnection;
// MediaStream localStream;
// MediaStream remoteStream;
// RTCDataChannel dataChannel;
//
// // Future<bool> call(String patientId, String mobile, {@required RTCVideoRenderer localVideo, @required RTCVideoRenderer remoteVideo}) async {
// // await initializeSignalR(patientId);
// //
// // // final isCallPlaced = await FCM.sendCallNotifcationTo(DOCTOR_TOKEN, patientId, mobile);
// // if(!isCallPlaced)
// // throw 'Failed to notify target for call';
// //
// // return isCallPlaced;
// // }
//
// Future<bool> acceptCall(String caller, String receiver, {@required MediaStream localMediaStream, @required Function(MediaStream) onRemoteMediaStream, @required Function(RTCTrackEvent) onRemoteTrack}) async {
// await initializeSignalR(receiver);
// signalR.setContributors(caller: caller, receiver: receiver);
// await signalR.acceptCall(receiver, caller).catchError((e) => throw 'Failed to inform signalR that i accepted a call');
//
// peerConnection.addStream(localMediaStream);
//
// // peerConnection?.onTrack = (track){
// // onRemoteTrack(track);
// // };
// peerConnection?.onAddStream = (MediaStream stream) {
// remoteStream = stream;
// onRemoteMediaStream?.call(stream);
// };
// return true;
// }
//
//
// Future<bool> declineCall(String caller, String receiver) async {
// await initializeSignalR(receiver);
// signalR.setContributors(caller: caller, receiver: receiver);
// await signalR.declineCall(receiver, caller).catchError((e) => throw 'Failed to inform signalR that i accepted a call');
//
// // peerConnection.addStream(localMediaStream);
// //
// // peerConnection?.onAddStream = (MediaStream stream) {
// // remoteStream = stream;
// // onRemoteMediaStream?.call(stream);
// // };
// return true;
// }
//
// Future hangupCall(String caller, String receiver) async {
// await signalR.hangupCall(caller, receiver);
// dispose();
// }
//
// answerOffer(String sdp) async {
// final offer = jsonDecode(sdp);
// final caller = offer['caller'];
// final receiver = offer['target'];
// final offerSdp = offer['sdp'];
// peerConnection.setRemoteDescription(rtcSessionDescriptionFrom(offerSdp)).then((value) {
// return peerConnection.createAnswer().catchError((e){
// print(e);
// });
// }).then((anwser) {
// return peerConnection.setLocalDescription(anwser).catchError((e){
// print(e);
// });
// }).then((value) {
// return peerConnection.getLocalDescription().catchError((e){
// print(e);
// });
// }).then((answer) {
// return signalR.answerOffer(answer, caller, receiver).catchError((e){
// print(e);
// });
// }).catchError((e) {
// print(e);
// });
// }
//
// Future<void> hangUp(RTCVideoRenderer localVideo) async {}
//
// Future<String> createSdpAnswer(String toOfferSdp) async {
// final offerSdp = rtcSessionDescriptionFrom(jsonDecode(toOfferSdp));
// peerConnection.setRemoteDescription(offerSdp).catchError((e){
// print(e);
// });
//
// final answer = await peerConnection.createAnswer().catchError((e){
// print(e);
// });
// var answerSdp = json.encode(answer); // Send SDP via Push or any channel
// return answerSdp;
// }
//
// Future<String> createSdpOffer() async {
// final offer = await peerConnection.createOffer();
// await peerConnection.setLocalDescription(offer).catchError((e){
// print(e);
// });
// final map = offer.toMap();
// var offerSdp = json.encode(map); // Send SDP via Push or any channel
// return offerSdp;
// }
//
// addCandidate(String candidateJson) {
// peerConnection.addCandidate(rtcIceCandidateFrom(candidateJson)).catchError((e){
// print(e);
// });
// }
//
// void registerPeerConnectionListeners() {
// peerConnection.onRenegotiationNeeded = (){
// print('Renegotiation Needed...');
// };
//
// peerConnection.onIceCandidate = (RTCIceCandidate candidate) {
// // print(json.encode(candidate.toMap()));
// signalR.addIceCandidate(json.encode(candidate.toMap())).catchError((e){
// print(e);
// });
// };
//
// peerConnection?.onIceGatheringState = (RTCIceGatheringState state) {
// print('ICE gathering state changed: $state');
// };
//
// peerConnection?.onConnectionState = (RTCPeerConnectionState state) {
// print('Connection state change: $state');
// };
//
// peerConnection?.onSignalingState = (RTCSignalingState state) {
// print('Signaling state change: $state');
// };
//
//
// }
// }
//
// rtcSessionDescriptionFrom(Map sdp) {
// return RTCSessionDescription(
// sdp['sdp'],
// sdp['type'],
// );
// }
//
// rtcIceCandidateFrom(String json) {
// final map = jsonDecode(json)['candidate'];
// return RTCIceCandidate(map['candidate'], map['sdpMid'], map['sdpMLineIndex']);
// }

@ -82,7 +82,7 @@ var routes = {
APP_UPDATE: (_) => AppUpdatePage(),
SETTINGS: (_) => Settings(),
CART_ORDER_PAGE: (_) => CartOrderPage(),
CALL_PAGE: (_) => CallPage(),
// CALL_PAGE: (_) => CallPage(),
INCOMING_CALL_PAGE: (_) => IncomingCall(),
OPENTOK_CALL_PAGE: (_) => OpenTokConnectCallPage(
apiKey: OPENTOK_API_KEY,

@ -1757,41 +1757,45 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getPayfortSDKTokenForPayment(String deviceID, String signatureValue, {bool isTest = true}) async {
Map<String, dynamic> request;
request = {"service_command": "SDK_TOKEN", "access_code": "BsM6He4FMBaZ86W64kjZ", "merchant_identifier": "ipxnRXXq", "language": "en", "device_id": deviceID, "signature": signatureValue};
dynamic localRes;
await baseAppClient.post(isTest ? PAYFORT_TEST_URL : PAYFORT_PROD_URL, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request, isExternal: true, isAllowAny: true);
return Future.value(localRes);
}
Future<Map> logDoctorFreeSlots(int docID, int clinicID, int projectID, List<dynamic> selectedfreeSlots, dynamic appoNumber, BuildContext context, [ProjectViewModel projectViewModel]) async {
Map<String, dynamic> requestFreeSlots;
Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
requestFreeSlots = {
"DoctorID": docID,
"IsBookingForLiveCare": 0,
"ClinicID": clinicID,
"ProjectID": projectID,
"OriginalClinicID": clinicID,
"days": 0,
"isReschadual": false,
"VersionID": req.VersionID,
"Channel": 3,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"generalid": "Cs2020@2016\$2958",
"PatientOutSA": authProvider.isLogin ? authUser.outSA : 0,
"SessionID": null,
"isDentalAllowedBackend": false,
"DeviceTypeID": 1
};
request = {
Future<Map> logDoctorFreeSlots(int docID, int clinicID, int projectID, List<dynamic> selectedfreeSlots, dynamic appoNumber, BuildContext context, [ProjectViewModel projectViewModel]) async {
Map<String, dynamic> requestFreeSlots;
Map<String, dynamic> request;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
requestFreeSlots = {
"DoctorID": docID,
"IsBookingForLiveCare": 0,
"ClinicID": clinicID,
"ProjectID": projectID,
"AppointmentNo":appoNumber,
"DoctorFreeSlotRequest":requestFreeSlots,
"DoctorFreeSlotResponse":selectedfreeSlots,
"Value1":docID
};
"OriginalClinicID": clinicID,
"days": 0,
"isReschadual": false,
"VersionID": req.VersionID,
"Channel": 3,
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"generalid": "Cs2020@2016\$2958",
"PatientOutSA": authProvider.isLogin ? authUser.outSA : 0,
"SessionID": null,
"isDentalAllowedBackend": false,
"DeviceTypeID": 1
};
request = {"ClinicID": clinicID, "ProjectID": projectID, "AppointmentNo": appoNumber, "DoctorFreeSlotRequest": requestFreeSlots, "DoctorFreeSlotResponse": selectedfreeSlots, "Value1": docID};
dynamic localRes;
await baseAppClient.post(INSERT_FREE_SLOTS_LOGS, onSuccess: (response, statusCode) async {
localRes = response;
@ -1801,6 +1805,4 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
}

@ -281,15 +281,12 @@ class LiveCareService extends BaseService {
Future<Map> sendLiveCareInvoiceEmail(String appoNo, int projectID, String emailAddress, 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 = {"To": emailAddress, "ProjectID": projectID, "AppointmentNo": appoNo};
dynamic localRes;
await baseAppClient.post(SEND_LIVECARE_INVOICE_EMAIL, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {

@ -35,39 +35,38 @@ class LocalNotification {
var initializationSettings = InitializationSettings(android: initializationSettingsAndroid, iOS: initializationSettingsIOS);
await flutterLocalNotificationsPlugin.initialize(
initializationSettings,
onDidReceiveNotificationResponse:
(NotificationResponse notificationResponse) {
onDidReceiveNotificationResponse: (NotificationResponse notificationResponse) {
switch (notificationResponse.notificationResponseType) {
case NotificationResponseType.selectedNotification:
// selectNotificationStream.add(notificationResponse.payload);
// selectNotificationStream.add(notificationResponse.payload);
break;
case NotificationResponseType.selectedNotificationAction:
// if (notificationResponse.actionId == navigationActionId) {
// selectNotificationStream.add(notificationResponse.payload);
// }
// if (notificationResponse.actionId == navigationActionId) {
// selectNotificationStream.add(notificationResponse.payload);
// }
break;
}
},
onDidReceiveBackgroundNotificationResponse: notificationTapBackground,
);
} catch(ex) {}
// flutterLocalNotificationsPlugin.initialize(initializationSettings, onDidReceiveNotificationResponse: (NotificationResponse notificationResponse)
// {
// switch (notificationResponse.notificationResponseType) {
// case NotificationResponseType.selectedNotification:
// // selectNotificationStream.add(notificationResponse.payload);
// break;
// case NotificationResponseType.selectedNotificationAction:
// // if (notificationResponse.actionId == navigationActionId) {
// // selectNotificationStream.add(notificationResponse.payload);
// }
// // break;
// },}
//
// ,
//
// );
}
} catch (ex) {}
// flutterLocalNotificationsPlugin.initialize(initializationSettings, onDidReceiveNotificationResponse: (NotificationResponse notificationResponse)
// {
// switch (notificationResponse.notificationResponseType) {
// case NotificationResponseType.selectedNotification:
// // selectNotificationStream.add(notificationResponse.payload);
// break;
// case NotificationResponseType.selectedNotificationAction:
// // if (notificationResponse.actionId == navigationActionId) {
// // selectNotificationStream.add(notificationResponse.payload);
// }
// // break;
// },}
//
// ,
//
// );
}
void notificationTapBackground(NotificationResponse notificationResponse) {
// ignore: avoid_print
@ -76,110 +75,106 @@ class LocalNotification {
' payload: ${notificationResponse.payload}');
if (notificationResponse.input?.isNotEmpty ?? false) {
// ignore: avoid_print
print(
'notification action tapped with input: ${notificationResponse.input}');
print('notification action tapped with input: ${notificationResponse.input}');
}
}
var _random = new Random();
var _random = new Random();
_randomNumber({int from = 100000}) {
return _random.nextInt(from);
}
_randomNumber({int from = 100000}) {
return _random.nextInt(from);
}
_vibrationPattern() {
var vibrationPattern = Int64List(4);
vibrationPattern[0] = 0;
vibrationPattern[1] = 1000;
vibrationPattern[2] = 5000;
vibrationPattern[3] = 2000;
_vibrationPattern() {
var vibrationPattern = Int64List(4);
vibrationPattern[0] = 0;
vibrationPattern[1] = 1000;
vibrationPattern[2] = 5000;
vibrationPattern[3] = 2000;
return vibrationPattern;
}
return vibrationPattern;
}
Future showNow({@required String title, @required String subtitle, String payload}) {
Future.delayed(Duration(seconds: 1)).then((result) async {
var androidPlatformChannelSpecifics = AndroidNotificationDetails('com.hmg.local_notification', 'HMG',
channelDescription: 'HMG',
importance: Importance.max,
priority: Priority.high,
ticker: 'ticker',
vibrationPattern: _vibrationPattern());
var iOSPlatformChannelSpecifics = DarwinNotificationDetails();
var platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics, iOS: iOSPlatformChannelSpecifics);
await flutterLocalNotificationsPlugin.show(_randomNumber(), title, subtitle, platformChannelSpecifics, payload: payload).catchError((err) {
print(err);
Future showNow({@required String title, @required String subtitle, String payload}) {
Future.delayed(Duration(seconds: 1)).then((result) async {
var androidPlatformChannelSpecifics = AndroidNotificationDetails('com.hmg.local_notification', 'HMG',
channelDescription: 'HMG', importance: Importance.max, priority: Priority.high, ticker: 'ticker', vibrationPattern: _vibrationPattern());
var iOSPlatformChannelSpecifics = DarwinNotificationDetails();
var platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics, iOS: iOSPlatformChannelSpecifics);
await flutterLocalNotificationsPlugin.show(_randomNumber(), title, subtitle, platformChannelSpecifics, payload: payload).catchError((err) {
print(err);
});
});
});
}
}
Future scheduleNotification({@required DateTime scheduledNotificationDateTime, @required String title, @required String description}) async {
///vibrationPattern
var vibrationPattern = Int64List(4);
vibrationPattern[0] = 0;
vibrationPattern[1] = 1000;
vibrationPattern[2] = 5000;
vibrationPattern[3] = 2000;
var androidPlatformChannelSpecifics = AndroidNotificationDetails('active-prescriptions', 'ActivePrescriptions',
channelDescription: 'ActivePrescriptionsDescription',
// icon: 'secondary_icon',
sound: RawResourceAndroidNotificationSound('slow_spring_board'),
///change it to be as ionic
// largeIcon: DrawableResourceAndroidBitmap('sample_large_icon'),///change it to be as ionic
vibrationPattern: vibrationPattern,
enableLights: true,
color: const Color.fromARGB(255, 255, 0, 0),
ledColor: const Color.fromARGB(255, 255, 0, 0),
ledOnMs: 1000,
ledOffMs: 500);
var iOSPlatformChannelSpecifics = DarwinNotificationDetails(sound: 'slow_spring_board.aiff');
// /change it to be as ionic
var platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics, iOS: iOSPlatformChannelSpecifics);
await flutterLocalNotificationsPlugin.schedule(0, title, description, scheduledNotificationDateTime, platformChannelSpecifics);
}
Future scheduleNotification({@required DateTime scheduledNotificationDateTime, @required String title, @required String description}) async {
///vibrationPattern
var vibrationPattern = Int64List(4);
vibrationPattern[0] = 0;
vibrationPattern[1] = 1000;
vibrationPattern[2] = 5000;
vibrationPattern[3] = 2000;
var androidPlatformChannelSpecifics = AndroidNotificationDetails('active-prescriptions', 'ActivePrescriptions',
channelDescription: 'ActivePrescriptionsDescription',
// icon: 'secondary_icon',
sound: RawResourceAndroidNotificationSound('slow_spring_board'),
///change it to be as ionic
// largeIcon: DrawableResourceAndroidBitmap('sample_large_icon'),///change it to be as ionic
vibrationPattern: vibrationPattern,
enableLights: true,
color: const Color.fromARGB(255, 255, 0, 0),
ledColor: const Color.fromARGB(255, 255, 0, 0),
ledOnMs: 1000,
ledOffMs: 500);
var iOSPlatformChannelSpecifics = DarwinNotificationDetails(sound: 'slow_spring_board.aiff');
// /change it to be as ionic
var platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics, iOS: iOSPlatformChannelSpecifics);
await flutterLocalNotificationsPlugin.schedule(0, title, description, scheduledNotificationDateTime, platformChannelSpecifics);
}
///Repeat notification every day at approximately 10:00:00 am
Future showDailyAtTime() async {
var time = Time(10, 0, 0);
var androidPlatformChannelSpecifics = AndroidNotificationDetails('repeatDailyAtTime channel id', 'repeatDailyAtTime channel name', channelDescription: 'repeatDailyAtTime description');
var iOSPlatformChannelSpecifics = DarwinNotificationDetails();
// var platformChannelSpecifics = NotificationDetails(
// androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics);
// await flutterLocalNotificationsPlugin.showDailyAtTime(
// 0,
// 'show daily title',
// 'Daily notification shown at approximately ${_toTwoDigitString(time.hour)}:${_toTwoDigitString(time.minute)}:${_toTwoDigitString(time.second)}',
// time,
// platformChannelSpecifics);
}
///Repeat notification every day at approximately 10:00:00 am
Future showDailyAtTime() async {
var time = Time(10, 0, 0);
var androidPlatformChannelSpecifics = AndroidNotificationDetails('repeatDailyAtTime channel id', 'repeatDailyAtTime channel name', channelDescription: 'repeatDailyAtTime description');
var iOSPlatformChannelSpecifics = DarwinNotificationDetails();
// var platformChannelSpecifics = NotificationDetails(
// androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics);
// await flutterLocalNotificationsPlugin.showDailyAtTime(
// 0,
// 'show daily title',
// 'Daily notification shown at approximately ${_toTwoDigitString(time.hour)}:${_toTwoDigitString(time.minute)}:${_toTwoDigitString(time.second)}',
// time,
// platformChannelSpecifics);
}
///Repeat notification weekly on Monday at approximately 10:00:00 am
Future showWeeklyAtDayAndTime() async {
var time = Time(10, 0, 0);
var androidPlatformChannelSpecifics = AndroidNotificationDetails('show weekly channel id', 'show weekly channel name', channelDescription: 'show weekly description');
var iOSPlatformChannelSpecifics = DarwinNotificationDetails();
// var platformChannelSpecifics = NotificationDetails(
// androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics);
// await flutterLocalNotificationsPlugin.showWeeklyAtDayAndTime(
// 0,
// 'show weekly title',
// 'Weekly notification shown on Monday at approximately ${_toTwoDigitString(time.hour)}:${_toTwoDigitString(time.minute)}:${_toTwoDigitString(time.second)}',
// Day.Monday,
// time,
// platformChannelSpecifics);
}
///Repeat notification weekly on Monday at approximately 10:00:00 am
Future showWeeklyAtDayAndTime() async {
var time = Time(10, 0, 0);
var androidPlatformChannelSpecifics = AndroidNotificationDetails('show weekly channel id', 'show weekly channel name', channelDescription: 'show weekly description');
var iOSPlatformChannelSpecifics = DarwinNotificationDetails();
// var platformChannelSpecifics = NotificationDetails(
// androidPlatformChannelSpecifics, iOSPlatformChannelSpecifics);
// await flutterLocalNotificationsPlugin.showWeeklyAtDayAndTime(
// 0,
// 'show weekly title',
// 'Weekly notification shown on Monday at approximately ${_toTwoDigitString(time.hour)}:${_toTwoDigitString(time.minute)}:${_toTwoDigitString(time.second)}',
// Day.Monday,
// time,
// platformChannelSpecifics);
}
String _toTwoDigitString(int value) {
return value.toString().padLeft(2, '0');
}
String _toTwoDigitString(int value) {
return value.toString().padLeft(2, '0');
}
Future cancelNotification() async {
await flutterLocalNotificationsPlugin.cancel(0);
}
Future cancelNotification() async {
await flutterLocalNotificationsPlugin.cancel(0);
}
Future cancelAllNotifications() async {
await flutterLocalNotificationsPlugin.cancelAll();
}}
Future cancelAllNotifications() async {
await flutterLocalNotificationsPlugin.cancelAll();
}
}

@ -1,173 +1,173 @@
import 'dart:convert';
import 'dart:io';
import 'package:flutter/cupertino.dart';
import 'package:flutter_webrtc/flutter_webrtc.dart';
import 'package:http/io_client.dart';
import 'package:signalr_core/signalr_core.dart';
class SignalRUtil {
String hubName;
String sourceUser;
String destinationUser;
setContributors({@required String caller, @required String receiver}){
this.sourceUser = caller;
this.destinationUser = receiver;
}
Function(bool) onConnected;
SignalRUtil({@required this.hubName});
HubConnection connectionHub;
closeConnection() async{
if(connectionHub != null) {
connectionHub.off('OnIncomingCallAsync');
connectionHub.off('OnCallDeclinedAsync');
connectionHub.off('OnCallAcceptedAsync');
connectionHub.off('nHangUpAsync');
connectionHub.off('OnIceCandidateAsync');
connectionHub.off('OnOfferAsync');
await connectionHub.stop();
}
}
Future<bool> openConnection() async {
connectionHub = HubConnectionBuilder()
.withUrl(
hubName,
HttpConnectionOptions(
logMessageContent: true,
client: IOClient(HttpClient()..badCertificateCallback = (x, y, z) => true),
logging: (level, message) => print(message),
)).build();
await connectionHub.start();
await Future.delayed(Duration(seconds: 1));
connectionHub.on('ReceiveMessage', (message) {
handleIncomingMessage(message);
});
return getConnectionState();
}
void handleIncomingMessage(List<dynamic> message) {
print(message.toString());
}
void sendMessage(List<dynamic> args) async {
await connectionHub.invoke('SendMessage', args: args); //['Bob', 'Says hi!']
}
listen({Function(CallUser) onAcceptCall, Function(CallUser) onHangupCall, Function(String, CallUser) onDeclineCall, Function(String, CallUser) onOffer, Function(String) onCandidate}){
connectionHub.on('OnIncomingCallAsync', (arguments) {
print('OnIncomingCallAsync: ${arguments.toString()}');
});
connectionHub.on('OnCallDeclinedAsync', (arguments) {
print('OnCallDeclinedAsync: ${arguments.toString()}');
onDeclineCall(arguments.first, CallUser.from(arguments.last));
});
connectionHub.on('OnCallAcceptedAsync', (arguments) {
print('OnCallAcceptedAsync: ${arguments.toString()}');
});
connectionHub.on('OnHangUpAsync', (arguments) {
print('nHangUpAsync: ${arguments.toString()}');
onHangupCall(CallUser.from(arguments.first));
});
connectionHub.on('OnIceCandidateAsync', (arguments) {
print('OnIceCandidateAsync: ${arguments.toString()}');
onCandidate(arguments.first);
});
connectionHub.on('OnOfferAsync', (arguments) {
print('OnOfferAsync: ${arguments.toString()}');
onOffer(arguments.first, CallUser.from(arguments.last));
});
}
// CallUserAsync(string currentUserId, string targerUserId)
Future<dynamic> callUser(String from, to) async{
return await connectionHub.invoke('CallUserAsync', args: [from, to]);
}
// CallDeclinedAsync(string currentUserId, string targerUserId)
Future<dynamic> declineCall(String from, to) async{
return await connectionHub.invoke('CallDeclinedAsync', args: [from, to]);
}
// AnswerCallAsync(string currentUserId, string targetUserId)
Future<dynamic> answerCall(String from, to) async{
return await connectionHub.invoke('AnswerCallAsync', args: [from, to]);
}
// IceCandidateAsync(string targetUserId, string candidate)
Future<dynamic> addIceCandidate(String candidate) async{
final target = destinationUser;
return await connectionHub.invoke('IceCandidateAsync', args: [target, candidate]);
}
// OfferAsync(string targetUserId,string currentUserId, string targetOffer)
Future<dynamic> offer(String from, to, offer) async{
return await connectionHub.invoke('OfferAsync', args: [from, to, offer]);
}
// AnswerOfferAsync(string targetUserId, string CallerOffer)
Future<dynamic> answerOffer(RTCSessionDescription answerSdp, caller, receiver) async{
final payload = {
'target': receiver,
'caller': caller,
'sdp': answerSdp.toMap(),
};
return await connectionHub.invoke('AnswerOfferAsync', args: [caller, jsonEncode(payload)]);
}
// HangUpAsync(string currentUserId, string targetUserId)
Future<dynamic> hangupCall(String from, to) async{
return await connectionHub.invoke('HangUpAsync', args: [from, to]);
}
// CallAccepted(string currentUserId,string targetUserId)
Future<dynamic> acceptCall(String from, to) async{
// return await connectionHub.send(methodName: 'CallAccepted', args: [from, to]);
return await connectionHub.invoke("CallAccepted", args: [ from, to]);
}
bool getConnectionState() {
if (connectionHub.state == HubConnectionState.connected) return true;
if (connectionHub.state == HubConnectionState.disconnected) return false;
return false;
}
}
class CallUser{
String Id;
String UserName;
String Email;
String Phone;
String Title;
dynamic UserStatus;
String Image;
int UnreadMessageCount = 0;
CallUser.from(Map map){
Id = map['Id'];
UserName = map['UserName'];
Email = map['Email'];
Phone = map['Phone'];
Title = map['Title'];
UserStatus = map['UserStatus'];
Image = map['Image'];
UnreadMessageCount = map['UnreadMessageCount'];
}
}
// import 'dart:convert';
// import 'dart:io';
//
// import 'package:flutter/cupertino.dart';
// import 'package:flutter_webrtc/flutter_webrtc.dart';
// import 'package:http/io_client.dart';
// import 'package:signalr_core/signalr_core.dart';
//
// class SignalRUtil {
// String hubName;
//
// String sourceUser;
// String destinationUser;
// setContributors({@required String caller, @required String receiver}){
// this.sourceUser = caller;
// this.destinationUser = receiver;
// }
//
// Function(bool) onConnected;
// SignalRUtil({@required this.hubName});
//
//
// HubConnection connectionHub;
//
// closeConnection() async{
// if(connectionHub != null) {
// connectionHub.off('OnIncomingCallAsync');
// connectionHub.off('OnCallDeclinedAsync');
// connectionHub.off('OnCallAcceptedAsync');
// connectionHub.off('nHangUpAsync');
// connectionHub.off('OnIceCandidateAsync');
// connectionHub.off('OnOfferAsync');
// await connectionHub.stop();
// }
// }
//
// Future<bool> openConnection() async {
// connectionHub = HubConnectionBuilder()
// .withUrl(
// hubName,
// HttpConnectionOptions(
// logMessageContent: true,
// client: IOClient(HttpClient()..badCertificateCallback = (x, y, z) => true),
// logging: (level, message) => print(message),
// )).build();
//
// await connectionHub.start();
// await Future.delayed(Duration(seconds: 1));
//
// connectionHub.on('ReceiveMessage', (message) {
// handleIncomingMessage(message);
// });
//
// return getConnectionState();
// }
//
// void handleIncomingMessage(List<dynamic> message) {
// print(message.toString());
// }
//
// void sendMessage(List<dynamic> args) async {
// await connectionHub.invoke('SendMessage', args: args); //['Bob', 'Says hi!']
// }
//
// listen({Function(CallUser) onAcceptCall, Function(CallUser) onHangupCall, Function(String, CallUser) onDeclineCall, Function(String, CallUser) onOffer, Function(String) onCandidate}){
//
// connectionHub.on('OnIncomingCallAsync', (arguments) {
// print('OnIncomingCallAsync: ${arguments.toString()}');
// });
//
// connectionHub.on('OnCallDeclinedAsync', (arguments) {
// print('OnCallDeclinedAsync: ${arguments.toString()}');
// onDeclineCall(arguments.first, CallUser.from(arguments.last));
// });
//
// connectionHub.on('OnCallAcceptedAsync', (arguments) {
// print('OnCallAcceptedAsync: ${arguments.toString()}');
// });
//
// connectionHub.on('OnHangUpAsync', (arguments) {
// print('nHangUpAsync: ${arguments.toString()}');
// onHangupCall(CallUser.from(arguments.first));
// });
//
// connectionHub.on('OnIceCandidateAsync', (arguments) {
// print('OnIceCandidateAsync: ${arguments.toString()}');
// onCandidate(arguments.first);
// });
//
// connectionHub.on('OnOfferAsync', (arguments) {
// print('OnOfferAsync: ${arguments.toString()}');
// onOffer(arguments.first, CallUser.from(arguments.last));
// });
//
// }
//
// // CallUserAsync(string currentUserId, string targerUserId)
// Future<dynamic> callUser(String from, to) async{
// return await connectionHub.invoke('CallUserAsync', args: [from, to]);
// }
//
// // CallDeclinedAsync(string currentUserId, string targerUserId)
// Future<dynamic> declineCall(String from, to) async{
// return await connectionHub.invoke('CallDeclinedAsync', args: [from, to]);
// }
//
// // AnswerCallAsync(string currentUserId, string targetUserId)
// Future<dynamic> answerCall(String from, to) async{
// return await connectionHub.invoke('AnswerCallAsync', args: [from, to]);
// }
//
// // IceCandidateAsync(string targetUserId, string candidate)
// Future<dynamic> addIceCandidate(String candidate) async{
// final target = destinationUser;
// return await connectionHub.invoke('IceCandidateAsync', args: [target, candidate]);
// }
//
// // OfferAsync(string targetUserId,string currentUserId, string targetOffer)
// Future<dynamic> offer(String from, to, offer) async{
// return await connectionHub.invoke('OfferAsync', args: [from, to, offer]);
// }
//
// // AnswerOfferAsync(string targetUserId, string CallerOffer)
// Future<dynamic> answerOffer(RTCSessionDescription answerSdp, caller, receiver) async{
// final payload = {
// 'target': receiver,
// 'caller': caller,
// 'sdp': answerSdp.toMap(),
// };
// return await connectionHub.invoke('AnswerOfferAsync', args: [caller, jsonEncode(payload)]);
// }
//
// // HangUpAsync(string currentUserId, string targetUserId)
// Future<dynamic> hangupCall(String from, to) async{
// return await connectionHub.invoke('HangUpAsync', args: [from, to]);
// }
//
// // CallAccepted(string currentUserId,string targetUserId)
// Future<dynamic> acceptCall(String from, to) async{
// // return await connectionHub.send(methodName: 'CallAccepted', args: [from, to]);
// return await connectionHub.invoke("CallAccepted", args: [ from, to]);
// }
//
//
// bool getConnectionState() {
// if (connectionHub.state == HubConnectionState.connected) return true;
// if (connectionHub.state == HubConnectionState.disconnected) return false;
// return false;
// }
// }
//
//
// class CallUser{
// String Id;
// String UserName;
// String Email;
// String Phone;
// String Title;
// dynamic UserStatus;
// String Image;
// int UnreadMessageCount = 0;
//
// CallUser.from(Map map){
// Id = map['Id'];
// UserName = map['UserName'];
// Email = map['Email'];
// Phone = map['Phone'];
// Title = map['Title'];
// UserStatus = map['UserStatus'];
// Image = map['Image'];
// UnreadMessageCount = map['UnreadMessageCount'];
// }
// }

@ -2892,6 +2892,12 @@ class TranslationBase {
String get pharmaLiveCareJoinConsultation => localizedValues["pharmaLiveCareJoinConsultation"][locale.languageCode];
String get pharmaLiveCareJoinConsultation1 => localizedValues["pharmaLiveCareJoinConsultation1"][locale.languageCode];
String get emergencyServicesSubtitle => localizedValues["emergencyServicesSubtitle"][locale.languageCode];
String get rateDoctorResponse => localizedValues["rateDoctorResponse"][locale.languageCode];
String get comments => localizedValues["comments"][locale.languageCode];
String get rateDoctorResponseHeading => localizedValues["rateDoctorResponseHeading"][locale.languageCode];
String get updateInsuranceManuallyDialog => localizedValues["updateInsuranceManuallyDialog"][locale.languageCode];
String get viewReport => localizedValues["viewReport"][locale.languageCode];
String get sickLeaveAdmittedPatient => localizedValues["sickLeaveAdmittedPatient"][locale.languageCode];
String get InPatient => localizedValues["InPatient"][locale.languageCode];
String get inPatientServices => localizedValues["InPatientServices"][locale.languageCode];
String get InPatientServicesHeader => localizedValues["InPatientServicesHeader"][locale.languageCode];

@ -809,6 +809,11 @@ class Utils {
static String generateMd5Hash(String input) {
return crypto.md5.convert(utf8.encode(input)).toString();
}
static String generateSignature() {
}
}
Widget applyShadow({Color color = Colors.grey, double shadowOpacity = 0.5, double spreadRadius = 2, double blurRadius = 7, Offset offset = const Offset(2, 2), @required Widget child}) {

@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/core/service/privilege_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart';
@ -20,6 +21,7 @@ import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/pages/webRTC/call_page.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
@ -28,6 +30,7 @@ import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/HMGNetworkConnectivity.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -38,6 +41,14 @@ import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
// import 'package:flutter_amazonpaymentservices/environment_type.dart';
// import 'package:flutter_amazonpaymentservices/flutter_amazonpaymentservices.dart';
// import 'package:flutter_amazonpaymentservices/environment_type.dart';
// import 'package:flutter_amazonpaymentservices/flutter_amazonpaymentservices.dart';
// import 'package:flutter_amazonpaymentservices/flutter_amazonpaymentservices.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:in_app_review/in_app_review.dart';
import 'package:provider/provider.dart';
@ -453,11 +464,22 @@ class _AppDrawerState extends State<AppDrawer> {
),
mHeight(12),
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: CallPage()));
GifLoaderDialogUtils.showMyDialog(context);
HMGNetworkConnectivity(context).start();
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('cloud solution logo tap');
onTap: () async {
// var deviceId = await FlutterAmazonpaymentservices.getUDID;
// var signatureValue = "asD123@saereaccess_code=BsM6He4FMBaZ86W64kjZdevice_id=$deviceId" + "language=enmerchant_identifier=ipxnRXXqservice_command=SDK_TOKENasD123@saere";
// var signatureValueSHA = signatureValue.toSha256;
//
// GifLoaderDialogUtils.showMyDialog(context);
// DoctorsListService service = new DoctorsListService();
// service.getPayfortSDKTokenForPayment(deviceId, signatureValueSHA, isTest: true).then((res) {
// GifLoaderDialogUtils.hideDialog(context);
// print(res);
// startPaymentProcess(res['sdk_token']);
// }).catchError((err) {
// print(err);
// AppToast.showErrorToast(message: err);
// GifLoaderDialogUtils.hideDialog(context);
// });
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
@ -495,6 +517,34 @@ class _AppDrawerState extends State<AppDrawer> {
));
}
startPaymentProcess(String sdkToken) async {
// Map<String, String> requestParam = {};
// requestParam = {
// "amount": "100",
// "command": "PURCHASE",
// "currency": "SAR",
// "order_description": "Advance Payment",
// "customer_email": projectProvider.user.emailAddress,
// "customer_name": projectProvider.user.firstName + " " + projectProvider.user.lastName,
// "phone_number": projectProvider.user.mobileNumber,
// "language": projectProvider.isArabic ? "ar" : "en",
// "merchant_reference": DateTime.now().millisecondsSinceEpoch.toString(),
// "sdk_token": sdkToken,
// };
// try {
// await FlutterAmazonpaymentservices.normalPay(requestParam, EnvironmentType.sandbox, isShowResponsePage: false).then((value) {
// if (value["status"] == 14) {
// AppToast.showSuccessToast(message: "Payment has been successful");
// } else {
// AppToast.showErrorToast(message: value['response_message']);
// }
// });
// } on PlatformException catch (e) {
// AppToast.showErrorToast(message: e.message);
// return;
// }
}
readQRCode() async {
pharmacyLiveCareQRCode = (await BarcodeScanner.scan())?.rawContent;
print(pharmacyLiveCareQRCode);
@ -512,7 +562,13 @@ class _AppDrawerState extends State<AppDrawer> {
startPharmacyLiveCareProcess() {
sharedPref.setString(LIVECARE_CLINIC_DATA, "Pharmacy LiveCare" + "-" + "501" + "-" + "7");
Navigator.push(context, FadePage(page: LiveCareHome(isPharmacyLiveCare: true, pharmacyLiveCareQRCode: pharmacyLiveCareQRCode,)));
Navigator.push(
context,
FadePage(
page: LiveCareHome(
isPharmacyLiveCare: true,
pharmacyLiveCareQRCode: pharmacyLiveCareQRCode,
)));
}
drawerNavigator(context, routeName) {

@ -24,9 +24,7 @@ enum _PAYMENT_TYPE { PACKAGES, PHARMACY, PATIENT }
var _InAppBrowserOptions = InAppBrowserClassOptions(
inAppWebViewGroupOptions: InAppWebViewGroupOptions(
crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true, transparentBackground: false),
ios: IOSInAppWebViewOptions(
applePayAPIEnabled: true,
)),
ios: IOSInAppWebViewOptions(applePayAPIEnabled: true, isFraudulentWebsiteWarningEnabled: false)),
crossPlatform: InAppBrowserOptions(hideUrlBar: true, toolbarTopBackgroundColor: Colors.black),
android: AndroidInAppBrowserOptions(),
ios: IOSInAppBrowserOptions(hideToolbarBottom: true, toolbarBottomBackgroundColor: Colors.white, closeButtonColor: Colors.white, presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN));
@ -127,17 +125,6 @@ class MyInAppBrowser extends InAppBrowser {
this.deviceToken = deviceToken;
}
// getPatientData() async {
// if (await this.sharedPref.getObject(USER_PROFILE) != null) {
// var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
// authUser = data;
// }
// if (await this.sharedPref.getDouble(USER_LAT) != null && await this.sharedPref.getDouble(USER_LONG) != null) {
// lat = await this.sharedPref.getDouble(USER_LAT);
// long = await this.sharedPref.getDouble(USER_LONG);
// }
// }
openPackagesPaymentBrowser({@required int customer_id, @required int order_id}) {
paymentType = _PAYMENT_TYPE.PACKAGES;
var full_url = '$PACKAGES_REQUEST_PAYMENT_URL?customer_id=$customer_id&order_id=$order_id';
@ -190,7 +177,7 @@ class MyInAppBrowser extends InAppBrowser {
service.applePayInsertRequest(applePayInsertRequest, context).then((res) {
if (context != null) GifLoaderDialogUtils.hideDialog(context);
String url = "https://hmgwebservices.com/HMGApplePayLive/applepay/pay?apq=" + res['result']; // Prod
// String url = "https://uat.hmgwebservices.com/HMGApplePayLiveNew/applepay/pay?apq=" + res['result']; // UAT
// String url = "https://uat.hmgwebservices.com/HMGApplePayLive/applepay/pay?apq=" + res['result']; // UAT
// safariBrowser.open(url: Uri.parse(url));
this.browser.openUrlRequest(urlRequest: URLRequest(url: Uri.parse(url)), options: _InAppBrowserOptions);
}).catchError((err) {

@ -298,12 +298,12 @@ class DoctorHeader extends StatelessWidget {
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).excellent, style: TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w600))),
getRatingLine(doctorDetailsList[0].patientNumber, Colors.green[700]),
getRatingLine(doctorDetailsList[0].ratio, Colors.green[700]),
],
),
Container(
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
child: Text(getRatingWidth(doctorDetailsList[0].patientNumber).round().toString() + "%",
child: Text(getRatingWidth(doctorDetailsList[0].ratio).round().toString() + "%",
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
),
],
@ -319,12 +319,12 @@ class DoctorHeader extends StatelessWidget {
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).v_good, style: TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w600))),
getRatingLine(doctorDetailsList[1].patientNumber, Color(0xffB7B723)),
getRatingLine(doctorDetailsList[1].ratio, Color(0xffB7B723)),
],
),
Container(
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
child: Text(getRatingWidth(doctorDetailsList[1].patientNumber).round().toString() + "%",
child: Text(doctorDetailsList[1].ratio.round().toString() + "%",
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
),
],
@ -340,12 +340,12 @@ class DoctorHeader extends StatelessWidget {
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).good, style: TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w600))),
getRatingLine(doctorDetailsList[2].patientNumber, Color(0xffEBA727)),
getRatingLine(doctorDetailsList[2].ratio, Color(0xffEBA727)),
],
),
Container(
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
child: Text(getRatingWidth(doctorDetailsList[2].patientNumber).round().toString() + "%",
child: Text(doctorDetailsList[2].ratio.round().toString() + "%",
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
),
],
@ -361,12 +361,12 @@ class DoctorHeader extends StatelessWidget {
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).average, style: TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w600))),
getRatingLine(doctorDetailsList[3].patientNumber, Color(0xffEB7227)),
getRatingLine(doctorDetailsList[3].ratio, Color(0xffEB7227)),
],
),
Container(
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
child: Text(getRatingWidth(doctorDetailsList[3].patientNumber).round().toString() + "%",
child: Text(doctorDetailsList[3].ratio.round().toString() + "%",
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
),
],
@ -383,12 +383,12 @@ class DoctorHeader extends StatelessWidget {
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).below_average, style: TextStyle(fontSize: 13.0, color: Colors.black, fontWeight: FontWeight.w600))),
getRatingLine(doctorDetailsList[4].patientNumber, Color(0xffE20C0C)),
getRatingLine(doctorDetailsList[4].ratio, Color(0xffE20C0C)),
],
),
Container(
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0),
child: Text(getRatingWidth(doctorDetailsList[4].patientNumber).round().toString() + "%",
child: Text(doctorDetailsList[4].ratio.round().toString() + "%",
style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
),
],
@ -410,12 +410,12 @@ class DoctorHeader extends StatelessWidget {
pageBuilder: (context, animation1, animation2) {});
}
double getRatingWidth(int patientNumber) {
var width = (patientNumber / this.headerModel.totalReviews) * 100;
double getRatingWidth(double patientNumber) {
var width = patientNumber;
return width.roundToDouble();
}
Widget getRatingLine(int patientNumber, Color color) {
Widget getRatingLine(double patientNumber, Color color) {
return Container(
margin: EdgeInsets.only(top: 10.0),
child: Stack(children: [
@ -427,7 +427,7 @@ class DoctorHeader extends StatelessWidget {
),
),
SizedBox(
width: getRatingWidth(patientNumber) * 1.35,
width: patientNumber * 1.35,
height: 4.0,
child: Container(
color: color,

@ -66,8 +66,9 @@ import 'package:flutter/material.dart';
import 'package:flutter_tts/flutter_tts.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
// import 'package:speech_to_text/speech_recognition_error.dart';
// import 'package:speech_to_text/speech_to_text.dart' as stt;
import 'package:speech_to_text/speech_recognition_error.dart';
import 'package:speech_to_text/speech_to_text.dart' as stt;
import 'package:speech_to_text/speech_to_text.dart';
import 'package:url_launcher/url_launcher.dart';
class FloatingSearchButton extends StatefulWidget {
@ -83,7 +84,8 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
RobotProvider eventProvider = RobotProvider();
bool isLoading = false;
bool isError = false;
// stt.SpeechToText speech = stt.SpeechToText();
stt.SpeechToText speech = stt.SpeechToText();
FlutterTts tts = FlutterTts();
String error = '';
String _currentLocaleId = "";
String lastError;
@ -92,7 +94,6 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
double minSoundLevel = 50000;
double maxSoundLevel = -50000;
String reconizedWord = '';
FlutterTts flutterTts = FlutterTts();
var selectedLang;
bool isSearching = false;
Map results = {};
@ -113,7 +114,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
void initState() {
controller = AnimationController(vsync: this, duration: Duration(seconds: 1));
offset = Tween<Offset>(begin: Offset(0.0, 1.0), end: Offset(0.0, 0.0)).animate(controller);
startIosTts();
if (IS_VOICE_COMMAND_CLOSED == true) {
controller.reverse(from: -1);
} else {
@ -192,20 +193,20 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
: Image.asset('assets/images/gif/robot-idle.gif'),
),
onTap: () async {
// if (Platform.isAndroid) {
// if (await PermissionService.isMicrophonePermissionEnabled()) {
// new RoboSearch(context: context).showAlertDialog(context);
// initSpeechState().then((value) => {startVoiceSearch()});
// } else {
// Utils.showPermissionConsentDialog(context, TranslationBase.of(context).recordAudioPermission, () {
// new RoboSearch(context: context).showAlertDialog(context);
// initSpeechState().then((value) => {startVoiceSearch()});
// });
// }
// } else {
// new RoboSearch(context: context).showAlertDialog(context);
// initSpeechState().then((value) => {startVoiceSearch()});
// }
if (Platform.isAndroid) {
if (await PermissionService.isMicrophonePermissionEnabled()) {
new RoboSearch(context: context).showAlertDialog(context);
initSpeechState().then((value) => {startVoiceSearch()});
} else {
Utils.showPermissionConsentDialog(context, TranslationBase.of(context).recordAudioPermission, () {
new RoboSearch(context: context).showAlertDialog(context);
initSpeechState().then((value) => {startVoiceSearch()});
});
}
} else {
new RoboSearch(context: context).showAlertDialog(context);
initSpeechState().then((value) => {startVoiceSearch()});
}
},
),
Positioned(
@ -234,44 +235,60 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
]));
}
// startVoiceSearch() async {
// bool available = await speech.initialize(onStatus: statusListener, onError: errorListener);
// _currentLocaleId = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
//
// if (available) {
// speech.listen(
// onResult: resultListener,
// //listenMode: ListenMode.confirmation,
// localeId: _currentLocaleId == 'en' ? 'en_US' : 'ar_SA',
// );
// } else {
// print("The user has denied the use of speech recognition.");
// }
// // some time later...
// //speech.stop();
// // speech.listen(
// // onResult: resultListener,
// // listenFor: Duration(seconds: 10),
// // localeId: _currentLocaleId == 'en' ? 'en-US' : 'ar-SA',
// // onSoundLevelChange: soundLevelListener,
// // cancelOnError: true,
// // partialResults: true,
// // onDevice: true,
// // listenMode: ListenMode.deviceDefault);
// }
startIosTts() async{
await tts.setSharedInstance(true);
await tts.setLanguage("en-US");
tts.setIosAudioCategory(
IosTextToSpeechAudioCategory.playback,
[IosTextToSpeechAudioCategoryOptions.mixWithOthers],
IosTextToSpeechAudioMode.voicePrompt);
}
startVoiceSearch() async {
bool available = await speech.initialize();
_currentLocaleId = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
//
// if (available) {
// speech.listen(
// onResult: resultListener,
// //listenMode: ListenMode.confirmation,
// localeId: _currentLocaleId == 'en' ? 'en_US' : 'ar_SA',
// );
// } else {
// print("The user has denied the use of speech recognition.");
// }
// some time later...
if(available) {
speech.stop();
speech.listen(
onResult: resultListener,
listenFor: Duration(seconds: 10),
localeId: _currentLocaleId == 'en' ? 'en-US' : 'ar-SA',
onSoundLevelChange: soundLevelListener,
cancelOnError: true,
partialResults: true,
onDevice: true,
listenMode: ListenMode.deviceDefault);
}
}
void resultListener(result) {
_stopListening();
reconizedWord = result.recognizedWords;
event.setValue({"searchText": reconizedWord});
if (result.finalResult == true) {
Future.delayed(const Duration(seconds: 1), () {
_speak(reconizedWord);
RoboSearch.closeAlertDialog(context);
RoboSearch.closeAlertDialog(context);
//Navigator.of(context).pop();
});
}
}
void _stopListening() async {
await speech.stop();
// setState(() {});
}
Future _speak(reconizedWord) async {
getPages(reconizedWord);
}
@ -315,10 +332,10 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
// });
}
// void errorListener(SpeechRecognitionError error) {
// event.setValue({"searchText": 'null'});
// RoboSearch.closeAlertDialog(context);
// }
void errorListener(SpeechRecognitionError error) {
event.setValue({"searchText": 'null'});
RoboSearch.closeAlertDialog(context);
}
void statusListener(String status) {
//setState(() {
@ -807,7 +824,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
);
}
speak({isInit}) async {
speak({isInit =false}) async {
//if (mounted) {
setState(() {
this.networkImage = results['AnimationURL'];
@ -817,12 +834,18 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
if (isInit == true) {
event.setValue({"animationEnable": 'true'});
}
// var voice = await tts.getVoice();
// print(voice);
if (isArabic == false && results['ReturnMessage'] != null && isInit == false) {
await flutterTts.setVoice({"name": "en-au-x-aub-network", "locale": "en-AU"});
await flutterTts.speak(results['ReturnMessage']);
// await tts.synthesizeToFile("Hello World", Platform.isAndroid ? "tts.wav" : "tts.caf");
await tts.setVoice({"name": "Karen", "locale": "en-AU"});
// await tts.setVoice({"name" : voice[35]["name"],"locale": voice[35]["locale"]});
await tts.speak(results['ReturnMessage']);
} else if (results['ReturnMessage_Ar'] != null && isInit == false) {
await flutterTts.setVoice({"name": "ar-xa-x-ard-network", "locale": "ar"});
await flutterTts.speak(results['ReturnMessage_Ar']);
//await tts.setVoice({"name" : voice[0]["name"],"locale": voice[0]["locale"]});
await tts.speak(results['ReturnMessage_Ar']);
}
stopAnimation(isInit: isInit);
@ -850,7 +873,7 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
}
initialSpeak() async {
await flutterTts.awaitSpeakCompletion(true);
// await flutterTts.awaitSpeakCompletion(true);
results = {
'ReturnMessage_Ar': "هذه الخدمة تم تصميمها لتتمكن من ربط الملفات الطبية للعائلة بملفك الطبي حتى تتمكن من إدارة سجلاتهم عن طريق تسجيل الدخول إلى ملفك الطبي.",
'ReturnMessage': "Through this service, you will be able to link your family medical files to your medical file so that you can manage their records by login to your medical file."
@ -875,21 +898,21 @@ class _FloatingSearchButton extends State<FloatingSearchButton> with TickerProvi
});
});
} else {
flutterTts.setCompletionHandler(() async {
event.setValue({"animationEnable": 'false'});
setState(() {
this.networkImage = null;
this.isAnimationEnable = false;
});
});
// tts.setCompletionHandler(() async {
// event.setValue({"animationEnable": 'false'});
// setState(() {
// this.networkImage = null;
// this.isAnimationEnable = false;
// });
// });
}
flutterTts.setCompletionHandler(() async {
event.setValue({"animationEnable": 'false'});
setState(() {
this.networkImage = null;
this.isAnimationEnable = false;
});
});
// flutterTts.setCompletionHandler(() async {
// event.setValue({"animationEnable": 'false'});
// setState(() {
// this.networkImage = null;
// this.isAnimationEnable = false;
// });
// });
}
signOut() async {

@ -1,7 +1,7 @@
name: diplomaticquarterapp
description: A new Flutter application.
version: 4.5.64+1
version: 4.5.024+4050024
environment:
sdk: ">=2.7.0 <3.0.0"
@ -15,7 +15,7 @@ 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
@ -23,7 +23,7 @@ dependencies:
async: ^2.8.1
audio_wave: ^0.1.4
# audio_session: ^0.1.13
# audio_session: ^0.1.13
# State Management
provider: ^6.0.1
@ -54,7 +54,7 @@ dependencies:
maps_launcher: ^2.0.1
url_launcher: ^6.0.15
shared_preferences: ^2.0.0
# flutter_flexible_toast: ^0.1.4
# flutter_flexible_toast: ^0.1.4
fluttertoast: ^8.0.8
firebase_messaging: ^14.1.0
firebase_analytics: ^10.0.5
@ -95,10 +95,10 @@ dependencies:
# Qr code Scanner TODO fix it
# barcode_scanner: ^1.0.1
flutter_polyline_points: ^1.0.0
# flutter_polyline_points: ^1.0.0
location: ^4.3.0
# Qr code Scanner
# barcode_scan_fix: ^1.0.2
# barcode_scan_fix: ^1.0.2
barcode_scan2: ^4.2.2
# Rating Stars
@ -108,7 +108,7 @@ dependencies:
syncfusion_flutter_calendar: ^19.3.55
# SVG Images
# flutter_svg: ^0.23.0+1
# flutter_svg: ^0.23.0+1
#Calendar Events
manage_calendar_events: ^2.0.1
@ -152,7 +152,7 @@ dependencies:
#google maps places
google_maps_place_picker_mb: ^3.0.0
# google_maps_place_picker: ^2.1.0-nullsafety.3
# google_maps_place_picker: ^2.1.0-nullsafety.3
map_launcher: ^1.1.3
#countdown timer for Upcoming List
flutter_countdown_timer: ^4.1.0
@ -161,10 +161,10 @@ dependencies:
native_device_orientation: ^1.0.0
wakelock: ^0.5.6
after_layout: ^1.1.0
# twilio_programmable_video: ^0.11.0+1
# twilio_programmable_video: ^0.11.0+1
cached_network_image: ^3.1.0+1
# flutter_tts:
# path: flutter_tts-voice_enhancement
# flutter_tts:
# path: flutter_tts-voice_enhancement
flutter_tts: ^3.6.1
wifi: ^0.1.5
@ -174,8 +174,8 @@ dependencies:
geofencing: ^0.1.0
# speech_to_text: ^6.1.1
# path: speech_to_text
speech_to_text: ^6.1.1
# path: speech_to_text
in_app_update: ^3.0.0
@ -183,7 +183,7 @@ dependencies:
badges: ^2.0.1
flutter_app_icon_badge: ^2.0.0
syncfusion_flutter_sliders: ^19.3.55
# syncfusion_flutter_sliders: ^19.3.55
searchable_dropdown: ^1.1.3
dropdown_search: 0.4.9
youtube_player_flutter: ^8.0.0
@ -191,28 +191,31 @@ dependencies:
# Dep by Zohaib
shimmer: ^2.0.0
carousel_slider: ^4.0.0
flutter_material_pickers: ^3.1.2
# flutter_material_pickers: ^3.1.2
flutter_staggered_grid_view: ^0.4.1
# flutter_hms_gms_availability: ^2.0.0
# flutter_hms_gms_availability: ^2.0.0
huawei_hmsavailability: ^6.6.0+300
huawei_location: 6.0.0+302
# Marker Animation
flutter_animarker: ^3.2.0
# flutter_animarker: ^3.2.0
auto_size_text: ^3.0.0
equatable: ^2.0.3
signalr_core: ^1.1.1
# signalr_core: ^1.1.1
wave: ^0.2.0
# sms_retriever: ^1.0.0
# sms_retriever: ^1.0.0
sms_otp_auto_verify: ^2.1.0
flutter_ios_voip_kit: ^0.0.5
google_api_availability: ^3.0.1
# flutter_callkit_incoming: ^1.0.3+3
# firebase_core: 1.12.0
# flutter_callkit_incoming: ^1.0.3+3
# firebase_core: 1.12.0
# flutter_amazonpaymentservices: 0.0.6
# crypto:
dependency_overrides:
provider : ^5.0.0
# permission_handler : ^10.2.0
provider: ^5.0.0
# permission_handler : ^10.2.0
flutter_svg: ^1.0.0
# firebase_messaging_platform_interface: any
# flutter_inappwebview: 5.7.2+3

@ -1,5 +1,6 @@
import 'package:json_annotation/json_annotation.dart';
part 'speech_recognition_error.g.dart';
/// A single error returned from the underlying speech services.

Loading…
Cancel
Save