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_ORDERS = '/api/orders';
var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; 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://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/'; // var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/'; // 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 GET_PATIENT_PASSPORT_NUMBER = 'Services/Patients.svc/REST/Covid19_Certificate_GetPassport';
var UPDATE_WORKPLACE_NAME = 'Services/Patients.svc/REST/ActivateSickLeave_FromVida'; 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'; 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 REPORTS = 'Services/Doctors.svc/REST/GetPatientMedicalReportStatusInfo';
var INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport'; var INSERT_REQUEST_FOR_MEDICAL_REPORT = 'Services/Doctors.svc/REST/InsertRequestForMedicalReport';
var SEND_MEDICAL_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendMedicalReportEmail'; var SEND_MEDICAL_REPORT_EMAIL = 'Services/Notifications.svc/REST/SendMedicalReportEmail';
var GET_INPATIENT_ADMISSIONS = 'Services/inps.svc/REST/getAdmissionForMedicalReport';
///Rate ///Rate
// var IS_LAST_APPOITMENT_RATED = 'Services/Doctors.svc/REST/IsLastAppoitmentRated'; // 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 CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958'; var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20'; var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 10.5; var VERSION_ID = 10.7;
var SETUP_ID = '91877'; var SETUP_ID = '91877';
var LANGUAGE = 2; var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0; // 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_INFO_HOURS_RESULT = 'Services/Doctors.svc/REST/GetCallInfoHoursResult';
var GET_CALL_REQUEST_TYPE_LOV = 'Services/Doctors.svc/REST/GetCallRequestType_LOV'; 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 UPDATE_DIABETIC_RESULT = 'Services/Patients.svc/REST/Patient_UpdateDiabeticResult';
var SEND_AVERAGE_BLOOD_SUGAR_REPORT = 'Services/Notifications.svc/REST/SendAverageBloodSugarReport'; 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 DEACTIVATE_WEIGHT_PRESSURE_RESULT = 'services/Patients.svc/REST/Patient_DeactivateWeightMeasurementStatus';
var GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse'; var GET_DOCTOR_RESPONSE = 'Services/Patients.svc/REST/GetDoctorResponse';
var UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus'; var UPDATE_READ_STATUS = 'Services/Patients.svc/REST/UpdateReadStatus';
var INSERT_CALL_INFO = 'Services/Doctors.svc/REST/InsertCallInfo'; 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'; 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 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 // Check If InPatient API
var CHECK_IF_INPATIENT = 'Services/Patients.svc/REST/GetInPatientAdmissionInfo'; var CHECK_IF_INPATIENT = 'Services/Patients.svc/REST/GetInPatientAdmissionInfo';

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

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

@ -15,6 +15,7 @@ class RequestReports {
String tokenID; String tokenID;
int patientTypeID; int patientTypeID;
int patientType; int patientType;
int projectID;
RequestReports( RequestReports(
{this.isReport, {this.isReport,
@ -32,7 +33,8 @@ class RequestReports {
this.patientID, this.patientID,
this.tokenID, this.tokenID,
this.patientTypeID, this.patientTypeID,
this.patientType}); this.patientType,
this.projectID});
RequestReports.fromJson(Map<String, dynamic> json) { RequestReports.fromJson(Map<String, dynamic> json) {
isReport = json['IsReport']; isReport = json['IsReport'];
@ -51,6 +53,7 @@ class RequestReports {
tokenID = json['TokenID']; tokenID = json['TokenID'];
patientTypeID = json['PatientTypeID']; patientTypeID = json['PatientTypeID'];
patientType = json['PatientType']; patientType = json['PatientType'];
projectID = json['ProjectID'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -71,6 +74,7 @@ class RequestReports {
data['TokenID'] = this.tokenID; data['TokenID'] = this.tokenID;
data['PatientTypeID'] = this.patientTypeID; data['PatientTypeID'] = this.patientTypeID;
data['PatientType'] = this.patientType; data['PatientType'] = this.patientType;
data['ProjectID'] = this.projectID;
return data; 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/config/config.dart';
import 'package:diplomaticquarterapp/core/model/ask_doctor/AskDoctorReqTypes.dart'; import 'package:diplomaticquarterapp/core/model/ask_doctor/AskDoctorReqTypes.dart';
import 'package:diplomaticquarterapp/core/model/ask_doctor/DoctorResponse.dart'; import 'package:diplomaticquarterapp/core/model/ask_doctor/DoctorResponse.dart';
@ -18,8 +20,7 @@ class AskDoctorService extends BaseService {
dynamic localRes; dynamic localRes;
await baseAppClient.post(GET_CALL_INFO_HOURS_RESULT, await baseAppClient.post(GET_CALL_INFO_HOURS_RESULT, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -29,11 +30,10 @@ class AskDoctorService extends BaseService {
} }
Future getCallRequestTypeLOV() async { Future getCallRequestTypeLOV() async {
hasError =false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_CALL_REQUEST_TYPE_LOV, await baseAppClient.post(GET_CALL_REQUEST_TYPE_LOV, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
askDoctorReqTypes.clear(); askDoctorReqTypes.clear();
response['ListReqTypes'].forEach((reqType) { response['ListReqTypes'].forEach((reqType) {
askDoctorReqTypes.add(AskDoctorReqTypes.fromJson(reqType)); askDoctorReqTypes.add(AskDoctorReqTypes.fromJson(reqType));
@ -44,16 +44,28 @@ class AskDoctorService extends BaseService {
}, body: body); }, 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 { Future getDoctorResponse() async {
hasError =false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['from'] = body['from'] = "${DateTime.now().year}-${DateTime.now().month}-${DateTime.now().day} 00:00:00";
"${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";
body['from'] = await baseAppClient.post(GET_DOCTOR_RESPONSE, onSuccess: (dynamic response, int statusCode) {
"${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(); doctorResponseList.clear();
response['List_DoctorResponse'].forEach((reqType) { response['List_DoctorResponse'].forEach((reqType) {
doctorResponseList.add(DoctorResponse.fromJson(reqType)); doctorResponseList.add(DoctorResponse.fromJson(reqType));
@ -65,12 +77,11 @@ class AskDoctorService extends BaseService {
} }
Future updateReadStatus({int transactionNo}) async { Future updateReadStatus({int transactionNo}) async {
hasError =false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
body['TransactionNo'] = transactionNo; body['TransactionNo'] = transactionNo;
await baseAppClient.post(UPDATE_READ_STATUS, await baseAppClient.post(UPDATE_READ_STATUS, onSuccess: (dynamic response, int statusCode) {
onSuccess: (dynamic response, int statusCode) {
//TODO fix it //TODO fix it
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
@ -78,31 +89,63 @@ class AskDoctorService extends BaseService {
}, body: body); }, body: body);
} }
Future sendRequestLOV({DoctorList doctorList, String requestType, String remark}) async {
Future sendRequestLOV({DoctorList doctorList,String requestType,String remark}) async { hasError = false;
hasError =false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['ProjectID'] = doctorList.projectID; body['ProjectID'] = doctorList.projectID;
body['SetupID'] = doctorList.setupID; body['SetupID'] = doctorList.setupID;
body['DoctorID'] = doctorList.doctorID; body['DoctorID'] = doctorList.doctorID;
body['PatientMobileNumber'] = user.mobileNumber; body['PatientMobileNumber'] = user.mobileNumber;
body['IsMessageSent'] = false; body['IsMessageSent'] = false;
body['RequestDate'] = DateUtil.yearMonthDay(DateTime.now()); body['RequestDate'] = DateUtil.convertDateToString(DateTime.now());
body['RequestTime'] = DateUtil.time(DateTime.now()); body['RequestTime'] = DateUtil.convertDateToString(DateTime.now());
body['Remarks'] = remark; 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['CreatedBy'] = 102;
body['CreatedOn'] = DateUtil.yearMonthDay(DateTime.now()); body['CreatedOn'] = DateUtil.convertDateToString(DateTime.now());
body['EditedBy'] = 102; body['EditedBy'] = 102;
body['EditedOn'] = DateUtil.yearMonthDay(DateTime.now()); body['EditedOn'] = DateUtil.convertDateToString(DateTime.now());
body['isDentalAllowedBackend'] = false; body['isDentalAllowedBackend'] = false;
await baseAppClient.post(INSERT_CALL_INFO, body['AppointmentNo'] = doctorList.appointmentNo;
onSuccess: (dynamic response, int statusCode) { body['ClinicID'] = doctorList.clinicID;
body['QuestionType'] = num.parse(requestType);
body['RequestType'] = num.parse(requestType);
body['RequestTypeID'] = num.parse(requestType);
}, onFailure: (String error, int statusCode) { await baseAppClient.post(INSERT_CALL_INFO, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: body); }, 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); 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 { Future getPatientLabOrdersResults({PatientLabOrders patientLabOrder, String procedure}) async {
hasError = false; hasError = false;
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
@ -189,6 +207,7 @@ class LabsService extends BaseService {
_requestSendLabReportEmail.patientMobileNumber = userObj.mobileNumber; _requestSendLabReportEmail.patientMobileNumber = userObj.mobileNumber;
_requestSendLabReportEmail.projectName = patientLabOrder.projectName; _requestSendLabReportEmail.projectName = patientLabOrder.projectName;
_requestSendLabReportEmail.setupID = patientLabOrder.setupID; _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) { await baseAppClient.post(SEND_LAB_RESULT_EMAIL, onSuccess: (dynamic response, int statusCode) {}, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;

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

@ -54,6 +54,17 @@ class AskDoctorViewModel extends BaseViewModel {
setState(ViewState.Idle); 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 { Future getCallInfoHoursResult({int projectId, int doctorId}) async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _askDoctorService.getCallInfoHoursResult(projectId: projectId, doctorId: doctorId); await _askDoctorService.getCallInfoHoursResult(projectId: projectId, doctorId: doctorId);

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

@ -1,6 +1,19 @@
import 'dart:convert';
import 'package:crypto/crypto.dart';
extension CapExtension on String { extension CapExtension on String {
String get toCamelCase => "${this[0].toUpperCase()}${this.substring(1)}"; String get toCamelCase => "${this[0].toUpperCase()}${this.substring(1)}";
String get inCaps => '${this[0].toUpperCase()}${this.substring(1)}'; String get inCaps => '${this[0].toUpperCase()}${this.substring(1)}';
String get allInCaps => this.toUpperCase(); 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 { class DoctorList {
num clinicID; num clinicID;
dynamic appointmentNo;
String clinicName; String clinicName;
String doctorTitle; String doctorTitle;
num iD; num iD;
@ -45,6 +46,7 @@ class DoctorList {
DoctorList( DoctorList(
{this.clinicID, {this.clinicID,
this.appointmentNo,
this.clinicName, this.clinicName,
this.doctorTitle, this.doctorTitle,
this.iD, this.iD,
@ -90,6 +92,7 @@ class DoctorList {
DoctorList.fromJson(Map<String, dynamic> json) { DoctorList.fromJson(Map<String, dynamic> json) {
clinicID = json['ClinicID']; clinicID = json['ClinicID'];
appointmentNo = json['AppointmentNo'];
clinicName = json['ClinicName']; clinicName = json['ClinicName'];
doctorTitle = json['DoctorTitle']; doctorTitle = json['DoctorTitle'];
iD = json['ID']; iD = json['ID'];
@ -138,6 +141,7 @@ class DoctorList {
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['ClinicID'] = this.clinicID; data['ClinicID'] = this.clinicID;
data['AppointmentNo'] = this.appointmentNo;
data['ClinicName'] = this.clinicName; data['ClinicName'] = this.clinicName;
data['DoctorTitle'] = this.doctorTitle; data['DoctorTitle'] = this.doctorTitle;
data['ID'] = this.iD; data['ID'] = this.iD;

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

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

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

@ -1,6 +1,6 @@
import 'package:diplomaticquarterapp/core/service/insurance_service.dart'; import 'package:diplomaticquarterapp/core/service/insurance_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.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/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart';
@ -9,6 +9,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../locator.dart'; import '../../locator.dart';
import '../../widgets/dialogs/confirm_dialog.dart';
import 'insurance_card_update_details.dart'; import 'insurance_card_update_details.dart';
class InsurancePage extends StatelessWidget { 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}) { getDetails({String setupID, int projectID, String patientIdentificationID, int patientID, String name, bool isFamily, int parentID = 0, BuildContext context}) {
GifLoaderDialogUtils.showMyDialog(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); GifLoaderDialogUtils.hideDialog(context);
if (!_insuranceCardService.hasError && _insuranceCardService.isHaveInsuranceCard) { if (!_insuranceCardService.hasError && _insuranceCardService.isHaveInsuranceCard) {
Navigator.push( Navigator.push(
@ -159,8 +162,20 @@ class InsurancePage extends StatelessWidget {
model.getInsuranceUpdated(); model.getInsuranceUpdated();
}); });
} else { } 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 // projectViewModel.havePrivilege(82) || bypassPrivilageCheck
? Container() // ? Container()
: Container( // : Container(
width: double.infinity, // width: double.infinity,
height: double.infinity, // height: double.infinity,
clipBehavior: Clip.antiAlias, // clipBehavior: Clip.antiAlias,
decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor.withOpacity(0.7), darkColor: CustomColors.lightGreyColor.withOpacity(0.7)), // decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor.withOpacity(0.7), darkColor: CustomColors.lightGreyColor.withOpacity(0.7)),
child: Icon( // child: Icon(
Icons.lock_outline, // Icons.lock_outline,
size: 40, // 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/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/LocalNotification.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_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -81,7 +80,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
var themeNotifier; var themeNotifier;
DateTime currentBackPressTime; DateTime currentBackPressTime;
SignalRUtil signalRUtil; // SignalRUtil signalRUtil;
ToDoCountProviderModel toDoProvider; ToDoCountProviderModel toDoProvider;

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

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

@ -1,21 +1,39 @@
import 'package:diplomaticquarterapp/core/model/ask_doctor/DoctorResponse.dart'; 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/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/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/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.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; final DoctorResponse doctorResponse;
const ViewDoctorResponsesPage({Key key, this.doctorResponse}) : super(key: key); 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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return BaseView<AskDoctorViewModel>( return BaseView<AskDoctorViewModel>(
onModelReady: (model) => model.updateReadStatus(transactionNo: doctorResponse.transactionNo), onModelReady: (model) => model.updateReadStatus(transactionNo: widget.doctorResponse.transactionNo),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
showNewAppBar: true, showNewAppBar: true,
@ -44,7 +62,7 @@ class ViewDoctorResponsesPage extends StatelessWidget {
itemBuilder: (context, _index) { itemBuilder: (context, _index) {
return Container( return Container(
padding: const EdgeInsets.only(left: 20, right: 12, top: 12, bottom: 12), padding: const EdgeInsets.only(left: 20, right: 12, top: 12, bottom: 12),
height: 130, height: 160,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(10.0), Radius.circular(10.0),
@ -64,7 +82,7 @@ class ViewDoctorResponsesPage extends StatelessWidget {
children: [ children: [
Container( Container(
child: Text( child: Text(
(doctorResponse.doctorName ?? ""), (widget.doctorResponse.doctorName ?? ""),
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
@ -75,7 +93,7 @@ class ViewDoctorResponsesPage extends StatelessWidget {
), ),
Container( Container(
child: Text( child: Text(
(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(doctorResponse.createdOn)) ?? ""), (DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(widget.doctorResponse.createdOn)) ?? ""),
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
color: Color(0xff2E303A), color: Color(0xff2E303A),
@ -86,7 +104,7 @@ class ViewDoctorResponsesPage extends StatelessWidget {
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text( child: Text(
doctorResponse.transactions[_index]['InfoStatusDescription'], widget.doctorResponse.transactions[_index]['DoctorResponse'],
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
color: Color(0xff2E303A), 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), 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( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [ children: [
Texts('${doctor.doctorName}'), Texts('${doctor.doctorName}'),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
Texts( Texts('${doctor.requestTypeDescription}'),
'${doctor.requestTypeDescription}'),
], ],
), ),
), ),
), ),
Padding( Padding(
padding: const EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0), padding: const EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0),
child: Icon(projectViewModel.isArabic child: Icon(projectViewModel.isArabic ? Icons.arrow_back_ios : Icons.arrow_forward_ios),
? Icons.arrow_forward_ios
: Icons.arrow_back_ios),
) )
], ],
), ),
@ -158,24 +154,20 @@ class DoctorResponse extends StatelessWidget {
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start,
children: [ children: [
Texts('${doctor.doctorName}'), Texts('${doctor.doctorName}'),
SizedBox( SizedBox(
height: 5, height: 5,
), ),
Texts( Texts('${doctor.requestTypeDescription}'),
'${doctor.requestTypeDescription}'),
], ],
), ),
), ),
), ),
Padding( Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Icon(projectViewModel.isArabic child: Icon(projectViewModel.isArabic ? Icons.arrow_back_ios : Icons.arrow_forward_ios),
? Icons.arrow_forward_ios
: Icons.arrow_back_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/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/balance/new_text_Field.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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -26,7 +27,7 @@ class _RequestTypePageState extends State<RequestTypePage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<AskDoctorViewModel>( return BaseView<AskDoctorViewModel>(
onModelReady: (model) => model.getCallRequestTypeLOVs(), onModelReady: (model) => model.getQuestionTypes(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).requestType, 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) { model.sendRequestLOV(doctorList: widget.doctorList, requestType: parameterCode.toString(), remark: question).then((value) {
if (model.state != ViewState.ErrorLocal || model.state != ViewState.Error) { if (model.state != ViewState.ErrorLocal || model.state != ViewState.Error) {
Navigator.pop(context); 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/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/medical/patient_sick_leave_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/sickleave_workplace_update_page.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/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.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_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
@ -110,7 +116,39 @@ 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( Navigator.push(
context, context,
FadePage( FadePage(
@ -118,12 +156,16 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
requestNumber: requestNumber, requestNumber: requestNumber,
setupID: setupID, setupID: setupID,
projectID: projectID, projectID: projectID,
))).then((value) { ),
),
).then(
(value) {
print(value); print(value);
if (value != null && value == true) { if (value != null && value == true) {
model.getSickLeave(); model.getSickLeave();
showEmailDialog(model, index); showEmailDialog(model, index);
} }
}); },
);
} }
} }

@ -21,19 +21,23 @@ class HomeReportPage extends StatefulWidget {
} }
class _HomeReportPageState extends State<HomeReportPage> with SingleTickerProviderStateMixin { class _HomeReportPageState extends State<HomeReportPage> with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController_new;
List<ImagesInfo> imagesInfo = List(); List<ImagesInfo> imagesInfo = List();
int _currentPage = 0;
@override @override
void initState() { void initState() {
_tabController_new = TabController(length: 2, vsync: this);
WidgetsBinding.instance.addPostFrameCallback((_) {
getInPatientAdmissionList();
});
super.initState(); super.initState();
_tabController = TabController(length: 4, vsync: this);
} }
@override @override
void dispose() { void dispose() {
super.dispose(); super.dispose();
_tabController.dispose(); _tabController_new.dispose();
} }
@override @override
@ -57,11 +61,11 @@ class _HomeReportPageState extends State<HomeReportPage> with SingleTickerProvid
showNewAppBarTitle: true, showNewAppBarTitle: true,
backgroundColor: Color(0xffF7F7F7), backgroundColor: Color(0xffF7F7F7),
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
body: Column( body: Container(
child: Column(
children: [ children: [
TabBar( TabBar(
isScrollable: true, controller: _tabController_new,
controller: _tabController,
indicatorWeight: 3.0, indicatorWeight: 3.0,
indicatorSize: TabBarIndicatorSize.tab, indicatorSize: TabBarIndicatorSize.tab,
labelColor: Color(0xff2B353E), labelColor: Color(0xff2B353E),
@ -77,21 +81,17 @@ class _HomeReportPageState extends State<HomeReportPage> with SingleTickerProvid
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
letterSpacing: -0.48, letterSpacing: -0.48,
), ),
onTap: (int value) {
print(value);
setState(() {});
},
tabs: [ tabs: [
Text( Text(
TranslationBase.of(context).requested, TranslationBase.of(context).inPatient,
style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'), style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
), ),
Text( Text(
TranslationBase.of(context).ready, TranslationBase.of(context).outpatient,
style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
),
Text(
TranslationBase.of(context).completed,
style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
),
Text(
TranslationBase.of(context).cancelled,
style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'), style: TextStyle(fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins'),
), ),
], ],
@ -100,16 +100,40 @@ class _HomeReportPageState extends State<HomeReportPage> with SingleTickerProvid
Expanded( Expanded(
child: TabBarView( child: TabBarView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),
controller: _tabController, controller: _tabController_new,
children: <Widget>[ 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.reportsOrderRequestList, emailAddress: model.user.emailAddress),
ReportListWidget(reportList: model.reportsOrderReadyList, 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), ReportListWidget(reportList: model.reportsOrderCanceledList, emailAddress: model.user.emailAddress),
], ],
), ),
)
],
), ),
if (projectViewModel.havePrivilege(21)) )
],
),
),
if (projectViewModel.havePrivilege(21) && _tabController_new.index == 1)
Padding( Padding(
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21), padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton( child: DefaultButton(
@ -119,12 +143,56 @@ class _HomeReportPageState extends State<HomeReportPage> with SingleTickerProvid
FadePage( FadePage(
page: MedicalReports(), 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/service/medical/reports_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -55,10 +56,25 @@ class ReportListWidget extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
if (report.doctorName != null) if (report.doctorName != null)
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text( Text(
report.doctorName, report.doctorName,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16), 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), if (report.doctorName != null) SizedBox(height: 6),
Row( Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
@ -93,6 +109,13 @@ class ReportListWidget extends StatelessWidget {
emptyIcon: Icons.star_border, emptyIcon: Icons.star_border,
), ),
if (reportList[index].status == 2) if (reportList[index].status == 2)
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( IconButton(
icon: Icon(Icons.email), icon: Icon(Icons.email),
color: Color(0xff28323A), color: Color(0xff28323A),
@ -105,6 +128,8 @@ class ReportListWidget extends StatelessWidget {
), ),
], ],
), ),
],
),
), ),
], ],
), ),

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

@ -1,164 +1,164 @@
import 'dart:io'; // import 'dart:io';
//
import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart'; // import 'package:diplomaticquarterapp/models/LiveCare/IncomingCallData.dart';
import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart'; // import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart';
import 'package:diplomaticquarterapp/pages/webRTC/signaling.dart'; // import 'package:diplomaticquarterapp/pages/webRTC/signaling.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; // import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:firebase_messaging/firebase_messaging.dart'; // import 'package:firebase_messaging/firebase_messaging.dart';
import 'package:flutter/material.dart'; // import 'package:flutter/material.dart';
import 'package:flutter_webrtc/flutter_webrtc.dart'; // import 'package:flutter_webrtc/flutter_webrtc.dart';
//
class CallPage extends StatefulWidget { // class CallPage extends StatefulWidget {
@override // @override
_CallPageState createState() => _CallPageState(); // _CallPageState createState() => _CallPageState();
} // }
//
class _CallPageState extends State<CallPage> { // class _CallPageState extends State<CallPage> {
Signaling signaling = Signaling(); // Signaling signaling = Signaling();
RTCVideoRenderer _localRenderer = RTCVideoRenderer(); // RTCVideoRenderer _localRenderer = RTCVideoRenderer();
RTCVideoRenderer _remoteRenderer = RTCVideoRenderer(); // RTCVideoRenderer _remoteRenderer = RTCVideoRenderer();
String roomId; // String roomId;
TextEditingController textEditingController = TextEditingController(text: ''); // TextEditingController textEditingController = TextEditingController(text: '');
//
@override // @override
void initState() { // void initState() {
_localRenderer.initialize(); // _localRenderer.initialize();
_remoteRenderer.initialize(); // _remoteRenderer.initialize();
//
// signaling.onRemoteStream = ((stream) { // // signaling.onRemoteStream = ((stream) {
// _remoteRenderer.srcObject = stream; // // _remoteRenderer.srcObject = stream;
// setState(() {}); // // setState(() {});
// }); // // });
//
fcmConfigure(); // fcmConfigure();
//
super.initState(); // super.initState();
} // }
//
@override // @override
void dispose() { // void dispose() {
_localRenderer.dispose(); // _localRenderer.dispose();
_remoteRenderer.dispose(); // _remoteRenderer.dispose();
super.dispose(); // super.dispose();
} // }
//
@override // @override
Widget build(BuildContext context) { // Widget build(BuildContext context) {
FirebaseMessaging.instance.getToken().then((value) { // FirebaseMessaging.instance.getToken().then((value) {
print('FCM_TOKEN: $value'); // print('FCM_TOKEN: $value');
}); // });
//
return AppScaffold( // return AppScaffold(
isShowAppBar: true, // isShowAppBar: true,
showNewAppBar: true, // showNewAppBar: true,
showNewAppBarTitle: true, // showNewAppBarTitle: true,
isShowDecPage: false, // isShowDecPage: false,
appBarTitle: "WebRTC Calling", // appBarTitle: "WebRTC Calling",
body: Column( // body: Column(
children: [ // children: [
SizedBox(height: 8), // SizedBox(height: 8),
Wrap( // Wrap(
children: [ // children: [
SizedBox( // SizedBox(
width: 8, // width: 8,
), // ),
ElevatedButton( // ElevatedButton(
onPressed: () { // onPressed: () {
dummyCall(); // dummyCall();
}, // },
child: Text("Call"), // child: Text("Call"),
), // ),
SizedBox( // SizedBox(
width: 8, // width: 8,
), // ),
ElevatedButton( // ElevatedButton(
onPressed: () { // onPressed: () {
signaling.hangUp(_localRenderer); // signaling.hangUp(_localRenderer);
}, // },
child: Text("Hangup"), // child: Text("Hangup"),
) // )
], // ],
), // ),
SizedBox(height: 8), // SizedBox(height: 8),
Expanded( // Expanded(
child: Padding( // child: Padding(
padding: const EdgeInsets.all(0.0), // padding: const EdgeInsets.all(0.0),
child: Stack( // child: Stack(
children: [ // children: [
Positioned(top: 0.0, right: 0.0, left: 0.0, bottom: 0.0, child: RTCVideoView(_remoteRenderer)), // Positioned(top: 0.0, right: 0.0, left: 0.0, bottom: 0.0, child: RTCVideoView(_remoteRenderer)),
Positioned( // Positioned(
top: 20.0, // top: 20.0,
right: 100.0, // right: 100.0,
left: 20.0, // left: 20.0,
bottom: 300.0, // bottom: 300.0,
child: RTCVideoView(_localRenderer, mirror: true), // child: RTCVideoView(_localRenderer, mirror: true),
), // ),
], // ],
), // ),
), // ),
), // ),
Padding( // Padding(
padding: const EdgeInsets.all(8.0), // padding: const EdgeInsets.all(8.0),
child: Row( // child: Row(
mainAxisAlignment: MainAxisAlignment.center, // mainAxisAlignment: MainAxisAlignment.center,
children: [ // children: [
Text("Join the following Room: "), // Text("Join the following Room: "),
Flexible( // Flexible(
child: TextFormField( // child: TextFormField(
controller: textEditingController, // controller: textEditingController,
), // ),
) // )
], // ],
), // ),
), // ),
SizedBox(height: 8) // SizedBox(height: 8)
], // ],
), // ),
); // );
} // }
//
dummyCall() async { // dummyCall() async {
final json = { // final json = {
"callerID": "9920", // "callerID": "9920",
"receiverID": "2001273", // "receiverID": "2001273",
"msgID": "123", // "msgID": "123",
"notfID": "123", // "notfID": "123",
"notification_foreground": "true", // "notification_foreground": "true",
"count": "1", // "count": "1",
"message": "Doctor is calling ", // "message": "Doctor is calling ",
"AppointmentNo": "123", // "AppointmentNo": "123",
"title": "Rayyan Hospital", // "title": "Rayyan Hospital",
"ProjectID": "123", // "ProjectID": "123",
"NotificationType": "10", // "NotificationType": "10",
"background": "1", // "background": "1",
"doctorname": "Dr Sulaiman Al Habib", // "doctorname": "Dr Sulaiman Al Habib",
"clinicname": "ENT Clinic", // "clinicname": "ENT Clinic",
"speciality": "Speciality", // "speciality": "Speciality",
"appointmentdate": "Sun, 15th Dec, 2019", // "appointmentdate": "Sun, 15th Dec, 2019",
"appointmenttime": "09:00", // "appointmenttime": "09:00",
"type": "video", // "type": "video",
"session_id": // "session_id":
"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6InR3aWxpby1mcGE7dj0xIn0.eyJqdGkiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0LTE1OTg3NzQ1MDYiLCJpc3MiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0Iiwic3ViIjoiQUNhYWQ1YTNmOGM2NGZhNjczNTY3NTYxNTc0N2YyNmMyYiIsImV4cCI6MTU5ODc3ODEwNiwiZ3JhbnRzIjp7ImlkZW50aXR5IjoiSGFyb29uMSIsInZpZGVvIjp7InJvb20iOiJTbWFsbERhaWx5U3RhbmR1cCJ9fX0.7XUS5uMQQJfkrBZu9EjQ6STL6R7iXkso6BtO1HmrQKk", // "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImN0eSI6InR3aWxpby1mcGE7dj0xIn0.eyJqdGkiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0LTE1OTg3NzQ1MDYiLCJpc3MiOiJTS2I2NjYyOWMzN2ZhOTM3YjFjNDI2Zjg1MTgyNWFmN2M0Iiwic3ViIjoiQUNhYWQ1YTNmOGM2NGZhNjczNTY3NTYxNTc0N2YyNmMyYiIsImV4cCI6MTU5ODc3ODEwNiwiZ3JhbnRzIjp7ImlkZW50aXR5IjoiSGFyb29uMSIsInZpZGVvIjp7InJvb20iOiJTbWFsbERhaWx5U3RhbmR1cCJ9fX0.7XUS5uMQQJfkrBZu9EjQ6STL6R7iXkso6BtO1HmrQKk",
"identity": "Haroon1", // "identity": "Haroon1",
"name": "SmallDailyStandup", // "name": "SmallDailyStandup",
"videoUrl": "video", // "videoUrl": "video",
"picture": "video", // "picture": "video",
"is_call": "true" // "is_call": "true"
}; // };
//
IncomingCallData incomingCallData = IncomingCallData.fromJson(json); // IncomingCallData incomingCallData = IncomingCallData.fromJson(json);
final result = await Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: incomingCallData))); // final result = await Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: incomingCallData)));
} // }
//
fcmConfigure() { // fcmConfigure() {
FirebaseMessaging.onMessage.listen((RemoteMessage message) async { // FirebaseMessaging.onMessage.listen((RemoteMessage message) async {
print(message.toString()); // print(message.toString());
//
IncomingCallData incomingCallData; // IncomingCallData incomingCallData;
if (Platform.isAndroid) // if (Platform.isAndroid)
incomingCallData = IncomingCallData.fromJson(message.data['data']); // incomingCallData = IncomingCallData.fromJson(message.data['data']);
else if (Platform.isIOS) incomingCallData = IncomingCallData.fromJson(message.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))); // if (incomingCallData != null) final result = await Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: incomingCallData)));
}); // });
} // }
} // }

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

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

@ -1757,7 +1757,18 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); 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 { 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> requestFreeSlots;
@ -1784,14 +1795,7 @@ class DoctorsListService extends BaseService {
"DeviceTypeID": 1 "DeviceTypeID": 1
}; };
request = { request = {"ClinicID": clinicID, "ProjectID": projectID, "AppointmentNo": appoNumber, "DoctorFreeSlotRequest": requestFreeSlots, "DoctorFreeSlotResponse": selectedfreeSlots, "Value1": docID};
"ClinicID": clinicID,
"ProjectID": projectID,
"AppointmentNo":appoNumber,
"DoctorFreeSlotRequest":requestFreeSlots,
"DoctorFreeSlotResponse":selectedfreeSlots,
"Value1":docID
};
dynamic localRes; dynamic localRes;
await baseAppClient.post(INSERT_FREE_SLOTS_LOGS, onSuccess: (response, statusCode) async { await baseAppClient.post(INSERT_FREE_SLOTS_LOGS, onSuccess: (response, statusCode) async {
localRes = response; localRes = response;
@ -1801,6 +1805,4 @@ class DoctorsListService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
} }

@ -281,15 +281,12 @@ class LiveCareService extends BaseService {
Future<Map> sendLiveCareInvoiceEmail(String appoNo, int projectID, String emailAddress, BuildContext context) async { Future<Map> sendLiveCareInvoiceEmail(String appoNo, int projectID, String emailAddress, BuildContext context) async {
Map<String, dynamic> request; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE)); var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data; authUser = data;
} }
request = {"To": emailAddress, "ProjectID": projectID, "AppointmentNo": appoNo}; request = {"To": emailAddress, "ProjectID": projectID, "AppointmentNo": appoNo};
dynamic localRes; dynamic localRes;
await baseAppClient.post(SEND_LIVECARE_INVOICE_EMAIL, onSuccess: (response, statusCode) async { await baseAppClient.post(SEND_LIVECARE_INVOICE_EMAIL, onSuccess: (response, statusCode) async {
localRes = response; localRes = response;
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {

@ -35,8 +35,7 @@ class LocalNotification {
var initializationSettings = InitializationSettings(android: initializationSettingsAndroid, iOS: initializationSettingsIOS); var initializationSettings = InitializationSettings(android: initializationSettingsAndroid, iOS: initializationSettingsIOS);
await flutterLocalNotificationsPlugin.initialize( await flutterLocalNotificationsPlugin.initialize(
initializationSettings, initializationSettings,
onDidReceiveNotificationResponse: onDidReceiveNotificationResponse: (NotificationResponse notificationResponse) {
(NotificationResponse notificationResponse) {
switch (notificationResponse.notificationResponseType) { switch (notificationResponse.notificationResponseType) {
case NotificationResponseType.selectedNotification: case NotificationResponseType.selectedNotification:
// selectNotificationStream.add(notificationResponse.payload); // selectNotificationStream.add(notificationResponse.payload);
@ -50,7 +49,7 @@ class LocalNotification {
}, },
onDidReceiveBackgroundNotificationResponse: notificationTapBackground, onDidReceiveBackgroundNotificationResponse: notificationTapBackground,
); );
} catch(ex) {} } catch (ex) {}
// flutterLocalNotificationsPlugin.initialize(initializationSettings, onDidReceiveNotificationResponse: (NotificationResponse notificationResponse) // flutterLocalNotificationsPlugin.initialize(initializationSettings, onDidReceiveNotificationResponse: (NotificationResponse notificationResponse)
// { // {
// switch (notificationResponse.notificationResponseType) { // switch (notificationResponse.notificationResponseType) {
@ -67,7 +66,7 @@ class LocalNotification {
// , // ,
// //
// ); // );
} }
void notificationTapBackground(NotificationResponse notificationResponse) { void notificationTapBackground(NotificationResponse notificationResponse) {
// ignore: avoid_print // ignore: avoid_print
@ -76,18 +75,17 @@ class LocalNotification {
' payload: ${notificationResponse.payload}'); ' payload: ${notificationResponse.payload}');
if (notificationResponse.input?.isNotEmpty ?? false) { if (notificationResponse.input?.isNotEmpty ?? false) {
// ignore: avoid_print // ignore: avoid_print
print( print('notification action tapped with input: ${notificationResponse.input}');
'notification action tapped with input: ${notificationResponse.input}');
} }
} }
var _random = new Random(); var _random = new Random();
_randomNumber({int from = 100000}) { _randomNumber({int from = 100000}) {
return _random.nextInt(from); return _random.nextInt(from);
} }
_vibrationPattern() { _vibrationPattern() {
var vibrationPattern = Int64List(4); var vibrationPattern = Int64List(4);
vibrationPattern[0] = 0; vibrationPattern[0] = 0;
vibrationPattern[1] = 1000; vibrationPattern[1] = 1000;
@ -95,25 +93,21 @@ _vibrationPattern() {
vibrationPattern[3] = 2000; vibrationPattern[3] = 2000;
return vibrationPattern; return vibrationPattern;
} }
Future showNow({@required String title, @required String subtitle, String payload}) { Future showNow({@required String title, @required String subtitle, String payload}) {
Future.delayed(Duration(seconds: 1)).then((result) async { Future.delayed(Duration(seconds: 1)).then((result) async {
var androidPlatformChannelSpecifics = AndroidNotificationDetails('com.hmg.local_notification', 'HMG', var androidPlatformChannelSpecifics = AndroidNotificationDetails('com.hmg.local_notification', 'HMG',
channelDescription: 'HMG', channelDescription: 'HMG', importance: Importance.max, priority: Priority.high, ticker: 'ticker', vibrationPattern: _vibrationPattern());
importance: Importance.max,
priority: Priority.high,
ticker: 'ticker',
vibrationPattern: _vibrationPattern());
var iOSPlatformChannelSpecifics = DarwinNotificationDetails(); var iOSPlatformChannelSpecifics = DarwinNotificationDetails();
var platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics, iOS: iOSPlatformChannelSpecifics); var platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics, iOS: iOSPlatformChannelSpecifics);
await flutterLocalNotificationsPlugin.show(_randomNumber(), title, subtitle, platformChannelSpecifics, payload: payload).catchError((err) { await flutterLocalNotificationsPlugin.show(_randomNumber(), title, subtitle, platformChannelSpecifics, payload: payload).catchError((err) {
print(err); print(err);
}); });
}); });
} }
Future scheduleNotification({@required DateTime scheduledNotificationDateTime, @required String title, @required String description}) async { Future scheduleNotification({@required DateTime scheduledNotificationDateTime, @required String title, @required String description}) async {
///vibrationPattern ///vibrationPattern
var vibrationPattern = Int64List(4); var vibrationPattern = Int64List(4);
vibrationPattern[0] = 0; vibrationPattern[0] = 0;
@ -139,10 +133,10 @@ Future scheduleNotification({@required DateTime scheduledNotificationDateTime, @
// /change it to be as ionic // /change it to be as ionic
var platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics, iOS: iOSPlatformChannelSpecifics); var platformChannelSpecifics = NotificationDetails(android: androidPlatformChannelSpecifics, iOS: iOSPlatformChannelSpecifics);
await flutterLocalNotificationsPlugin.schedule(0, title, description, scheduledNotificationDateTime, platformChannelSpecifics); await flutterLocalNotificationsPlugin.schedule(0, title, description, scheduledNotificationDateTime, platformChannelSpecifics);
} }
///Repeat notification every day at approximately 10:00:00 am ///Repeat notification every day at approximately 10:00:00 am
Future showDailyAtTime() async { Future showDailyAtTime() async {
var time = Time(10, 0, 0); var time = Time(10, 0, 0);
var androidPlatformChannelSpecifics = AndroidNotificationDetails('repeatDailyAtTime channel id', 'repeatDailyAtTime channel name', channelDescription: 'repeatDailyAtTime description'); var androidPlatformChannelSpecifics = AndroidNotificationDetails('repeatDailyAtTime channel id', 'repeatDailyAtTime channel name', channelDescription: 'repeatDailyAtTime description');
var iOSPlatformChannelSpecifics = DarwinNotificationDetails(); var iOSPlatformChannelSpecifics = DarwinNotificationDetails();
@ -154,10 +148,10 @@ Future showDailyAtTime() async {
// 'Daily notification shown at approximately ${_toTwoDigitString(time.hour)}:${_toTwoDigitString(time.minute)}:${_toTwoDigitString(time.second)}', // 'Daily notification shown at approximately ${_toTwoDigitString(time.hour)}:${_toTwoDigitString(time.minute)}:${_toTwoDigitString(time.second)}',
// time, // time,
// platformChannelSpecifics); // platformChannelSpecifics);
} }
///Repeat notification weekly on Monday at approximately 10:00:00 am ///Repeat notification weekly on Monday at approximately 10:00:00 am
Future showWeeklyAtDayAndTime() async { Future showWeeklyAtDayAndTime() async {
var time = Time(10, 0, 0); var time = Time(10, 0, 0);
var androidPlatformChannelSpecifics = AndroidNotificationDetails('show weekly channel id', 'show weekly channel name', channelDescription: 'show weekly description'); var androidPlatformChannelSpecifics = AndroidNotificationDetails('show weekly channel id', 'show weekly channel name', channelDescription: 'show weekly description');
var iOSPlatformChannelSpecifics = DarwinNotificationDetails(); var iOSPlatformChannelSpecifics = DarwinNotificationDetails();
@ -170,16 +164,17 @@ Future showWeeklyAtDayAndTime() async {
// Day.Monday, // Day.Monday,
// time, // time,
// platformChannelSpecifics); // platformChannelSpecifics);
} }
String _toTwoDigitString(int value) { String _toTwoDigitString(int value) {
return value.toString().padLeft(2, '0'); return value.toString().padLeft(2, '0');
} }
Future cancelNotification() async { Future cancelNotification() async {
await flutterLocalNotificationsPlugin.cancel(0); await flutterLocalNotificationsPlugin.cancel(0);
} }
Future cancelAllNotifications() async { Future cancelAllNotifications() async {
await flutterLocalNotificationsPlugin.cancelAll(); await flutterLocalNotificationsPlugin.cancelAll();
}} }
}

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

@ -2892,6 +2892,12 @@ class TranslationBase {
String get pharmaLiveCareJoinConsultation => localizedValues["pharmaLiveCareJoinConsultation"][locale.languageCode]; String get pharmaLiveCareJoinConsultation => localizedValues["pharmaLiveCareJoinConsultation"][locale.languageCode];
String get pharmaLiveCareJoinConsultation1 => localizedValues["pharmaLiveCareJoinConsultation1"][locale.languageCode]; String get pharmaLiveCareJoinConsultation1 => localizedValues["pharmaLiveCareJoinConsultation1"][locale.languageCode];
String get emergencyServicesSubtitle => localizedValues["emergencyServicesSubtitle"][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 InPatient => localizedValues["InPatient"][locale.languageCode];
String get inPatientServices => localizedValues["InPatientServices"][locale.languageCode]; String get inPatientServices => localizedValues["InPatientServices"][locale.languageCode];
String get InPatientServicesHeader => localizedValues["InPatientServicesHeader"][locale.languageCode]; String get InPatientServicesHeader => localizedValues["InPatientServicesHeader"][locale.languageCode];

@ -809,6 +809,11 @@ class Utils {
static String generateMd5Hash(String input) { static String generateMd5Hash(String input) {
return crypto.md5.convert(utf8.encode(input)).toString(); 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}) { 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/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_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/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.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/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/pages/webRTC/call_page.dart'; import 'package:diplomaticquarterapp/pages/webRTC/call_page.dart';
import 'package:diplomaticquarterapp/routes.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/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart'; import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.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_notifier.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart'; import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/HMGNetworkConnectivity.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_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.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/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.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:flutter_svg/flutter_svg.dart';
import 'package:in_app_review/in_app_review.dart'; import 'package:in_app_review/in_app_review.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -453,11 +464,22 @@ class _AppDrawerState extends State<AppDrawer> {
), ),
mHeight(12), mHeight(12),
InkWell( InkWell(
onTap: () { onTap: () async {
Navigator.push(context, FadePage(page: CallPage())); // var deviceId = await FlutterAmazonpaymentservices.getUDID;
GifLoaderDialogUtils.showMyDialog(context); // var signatureValue = "asD123@saereaccess_code=BsM6He4FMBaZ86W64kjZdevice_id=$deviceId" + "language=enmerchant_identifier=ipxnRXXqservice_command=SDK_TOKENasD123@saere";
HMGNetworkConnectivity(context).start(); // var signatureValueSHA = signatureValue.toSha256;
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('cloud solution logo tap'); //
// 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( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, 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 { readQRCode() async {
pharmacyLiveCareQRCode = (await BarcodeScanner.scan())?.rawContent; pharmacyLiveCareQRCode = (await BarcodeScanner.scan())?.rawContent;
print(pharmacyLiveCareQRCode); print(pharmacyLiveCareQRCode);
@ -512,7 +562,13 @@ class _AppDrawerState extends State<AppDrawer> {
startPharmacyLiveCareProcess() { startPharmacyLiveCareProcess() {
sharedPref.setString(LIVECARE_CLINIC_DATA, "Pharmacy LiveCare" + "-" + "501" + "-" + "7"); 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) { drawerNavigator(context, routeName) {

@ -24,9 +24,7 @@ enum _PAYMENT_TYPE { PACKAGES, PHARMACY, PATIENT }
var _InAppBrowserOptions = InAppBrowserClassOptions( var _InAppBrowserOptions = InAppBrowserClassOptions(
inAppWebViewGroupOptions: InAppWebViewGroupOptions( inAppWebViewGroupOptions: InAppWebViewGroupOptions(
crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true, transparentBackground: false), crossPlatform: InAppWebViewOptions(useShouldOverrideUrlLoading: true, transparentBackground: false),
ios: IOSInAppWebViewOptions( ios: IOSInAppWebViewOptions(applePayAPIEnabled: true, isFraudulentWebsiteWarningEnabled: false)),
applePayAPIEnabled: true,
)),
crossPlatform: InAppBrowserOptions(hideUrlBar: true, toolbarTopBackgroundColor: Colors.black), crossPlatform: InAppBrowserOptions(hideUrlBar: true, toolbarTopBackgroundColor: Colors.black),
android: AndroidInAppBrowserOptions(), android: AndroidInAppBrowserOptions(),
ios: IOSInAppBrowserOptions(hideToolbarBottom: true, toolbarBottomBackgroundColor: Colors.white, closeButtonColor: Colors.white, presentationStyle: IOSUIModalPresentationStyle.OVER_FULL_SCREEN)); 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; 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}) { openPackagesPaymentBrowser({@required int customer_id, @required int order_id}) {
paymentType = _PAYMENT_TYPE.PACKAGES; paymentType = _PAYMENT_TYPE.PACKAGES;
var full_url = '$PACKAGES_REQUEST_PAYMENT_URL?customer_id=$customer_id&order_id=$order_id'; 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) { service.applePayInsertRequest(applePayInsertRequest, context).then((res) {
if (context != null) GifLoaderDialogUtils.hideDialog(context); if (context != null) GifLoaderDialogUtils.hideDialog(context);
String url = "https://hmgwebservices.com/HMGApplePayLive/applepay/pay?apq=" + res['result']; // Prod 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)); // safariBrowser.open(url: Uri.parse(url));
this.browser.openUrlRequest(urlRequest: URLRequest(url: Uri.parse(url)), options: _InAppBrowserOptions); this.browser.openUrlRequest(urlRequest: URLRequest(url: Uri.parse(url)), options: _InAppBrowserOptions);
}).catchError((err) { }).catchError((err) {

@ -298,12 +298,12 @@ class DoctorHeader extends StatelessWidget {
width: 100.0, width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.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))), 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( Container(
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), 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)), style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
), ),
], ],
@ -319,12 +319,12 @@ class DoctorHeader extends StatelessWidget {
width: 100.0, width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.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))), 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( Container(
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), 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)), style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
), ),
], ],
@ -340,12 +340,12 @@ class DoctorHeader extends StatelessWidget {
width: 100.0, width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.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))), 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( Container(
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), 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)), style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
), ),
], ],
@ -361,12 +361,12 @@ class DoctorHeader extends StatelessWidget {
width: 100.0, width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.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))), 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( Container(
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), 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)), style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
), ),
], ],
@ -383,12 +383,12 @@ class DoctorHeader extends StatelessWidget {
width: 100.0, width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.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))), 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( Container(
margin: EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), 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)), style: TextStyle(fontSize: 14.0, color: Colors.black, fontWeight: FontWeight.w600)),
), ),
], ],
@ -410,12 +410,12 @@ class DoctorHeader extends StatelessWidget {
pageBuilder: (context, animation1, animation2) {}); pageBuilder: (context, animation1, animation2) {});
} }
double getRatingWidth(int patientNumber) { double getRatingWidth(double patientNumber) {
var width = (patientNumber / this.headerModel.totalReviews) * 100; var width = patientNumber;
return width.roundToDouble(); return width.roundToDouble();
} }
Widget getRatingLine(int patientNumber, Color color) { Widget getRatingLine(double patientNumber, Color color) {
return Container( return Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Stack(children: [ child: Stack(children: [
@ -427,7 +427,7 @@ class DoctorHeader extends StatelessWidget {
), ),
), ),
SizedBox( SizedBox(
width: getRatingWidth(patientNumber) * 1.35, width: patientNumber * 1.35,
height: 4.0, height: 4.0,
child: Container( child: Container(
color: color, color: color,

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

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

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

Loading…
Cancel
Save