diff --git a/android/app/src/main/kotlin/com/hmg/hmgDr/Service/VideoStreamFloatingWidgetService.kt b/android/app/src/main/kotlin/com/hmg/hmgDr/Service/VideoStreamFloatingWidgetService.kt index f76104dc..3c4a5dc1 100644 --- a/android/app/src/main/kotlin/com/hmg/hmgDr/Service/VideoStreamFloatingWidgetService.kt +++ b/android/app/src/main/kotlin/com/hmg/hmgDr/Service/VideoStreamFloatingWidgetService.kt @@ -822,7 +822,7 @@ class VideoStreamFloatingWidgetService : Service(), Session.SessionListener, mSubscriber!!.destroy() mSubscriber = null } - disconnectSession() +// disconnectSession() } private fun disconnectSession() { @@ -855,7 +855,8 @@ class VideoStreamFloatingWidgetService : Service(), Session.SessionListener, sessionStatusModel!!.vcid ) ) - stopService() +// stopService() + onCallChangeCallStatusSuccessful() } private fun subscribeToStream(stream: Stream) { @@ -970,6 +971,13 @@ class VideoStreamFloatingWidgetService : Service(), Session.SessionListener, } } + fun onCallChangeCallStatusSuccessful(){ + val returnIntent = Intent() + returnIntent.putExtra("CallEnd", sessionStatusModel) + videoCallResponseListener?.onCallFinished(Activity.RESULT_CANCELED, returnIntent) + stopService() + } + override fun onCallChangeCallStatusSuccessful(sessionStatusModel: SessionStatusModel?) {} override fun onFailure() {} diff --git a/android/app/src/main/kotlin/com/hmg/hmgDr/ui/VideoCallContract.java b/android/app/src/main/kotlin/com/hmg/hmgDr/ui/VideoCallContract.java index 8b615e69..cf87e54e 100644 --- a/android/app/src/main/kotlin/com/hmg/hmgDr/ui/VideoCallContract.java +++ b/android/app/src/main/kotlin/com/hmg/hmgDr/ui/VideoCallContract.java @@ -13,6 +13,7 @@ public interface VideoCallContract { void onCallChangeCallStatusSuccessful(SessionStatusModel sessionStatusModel); void onFailure(); + } interface VideoCallPresenter { diff --git a/android/app/src/main/kotlin/com/hmg/hmgDr/ui/VideoCallPresenterImpl.java b/android/app/src/main/kotlin/com/hmg/hmgDr/ui/VideoCallPresenterImpl.java index 63cf8c27..eed191fb 100644 --- a/android/app/src/main/kotlin/com/hmg/hmgDr/ui/VideoCallPresenterImpl.java +++ b/android/app/src/main/kotlin/com/hmg/hmgDr/ui/VideoCallPresenterImpl.java @@ -59,7 +59,6 @@ public class VideoCallPresenterImpl implements VideoCallContract.VideoCallPresen public void onResponse(@NotNull Call call, @NotNull Response response) { if (!response.isSuccessful()) view.onFailure(); - } @Override diff --git a/android/app/src/main/kotlin/com/hmg/hmgDr/ui/fragment/VideoCallFragment.kt b/android/app/src/main/kotlin/com/hmg/hmgDr/ui/fragment/VideoCallFragment.kt index 4d649aac..010976b9 100644 --- a/android/app/src/main/kotlin/com/hmg/hmgDr/ui/fragment/VideoCallFragment.kt +++ b/android/app/src/main/kotlin/com/hmg/hmgDr/ui/fragment/VideoCallFragment.kt @@ -419,6 +419,20 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session mSession = Session.Builder(context, apiKey, sessionId).build() mSession!!.setSessionListener(this) mSession!!.connect(token) + + mSession!!.setReconnectionListener(object :Session.ReconnectionListener{ + override fun onReconnecting(p0: Session?) { + + } + + override fun onReconnected(session: Session?) { + session?.connect(token) + } + + + }) + + } catch (e: Exception) { e.printStackTrace() } @@ -456,10 +470,10 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session override fun onDisconnected(session: Session) { Log.d(TAG, "onDisconnected: disconnected from session " + session.sessionId) - mSession = null - cmTimer.stop() - disconnectSession() - videoCallResponseListener?.minimizeVideoEvent(false) +// mSession = null +// cmTimer.stop() +// disconnectSession() +// videoCallResponseListener?.minimizeVideoEvent(false) } override fun onError(session: Session, opentokError: OpentokError) { @@ -503,7 +517,7 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session mSubscriber!!.destroy() mSubscriber = null } - disconnectSession() + //disconnectSession() } override fun onStreamCreated(publisherKit: PublisherKit?, stream: Stream) { @@ -628,6 +642,16 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session sessionStatusModel!!.vcid ) ) +// if(isDismiss) +// dialog?.dismiss() +// else + onCallChangeCallStatusSuccessful() + } + + fun onCallChangeCallStatusSuccessful(){ + val returnIntent = Intent() + returnIntent.putExtra("CallEnd", sessionStatusModel) + videoCallResponseListener?.onCallFinished(Activity.RESULT_CANCELED, returnIntent) dialog?.dismiss() } diff --git a/android/google-services.json b/android/google-services.json index db548786..34a225b2 100644 --- a/android/google-services.json +++ b/android/google-services.json @@ -1,33 +1,33 @@ { "project_info": { - "project_number": "157373154094", - "project_id": "hmg-doctor-app-1553688619744", - "storage_bucket": "hmg-doctor-app-1553688619744.appspot.com" + "project_number": "1095694324958", + "project_id": "mobapp-bb272", + "storage_bucket": "mobapp-bb272.appspot.com" }, "client": [ { "client_info": { - "mobilesdk_app_id": "1:157373154094:android:daeea3a4e1f4462a1bf0bf", + "mobilesdk_app_id": "1:1095694324958:android:70a42e30fcc98ea33fde4f", "android_client_info": { "package_name": "com.hmg.hmgDr" } }, "oauth_client": [ { - "client_id": "157373154094-egrhbfr861l7k722g3v2gd4a0opi3r1u.apps.googleusercontent.com", + "client_id": "1095694324958-5psabq8tpbti0uqo8bt46atjtbas9uhr.apps.googleusercontent.com", "client_type": 3 } ], "api_key": [ { - "current_key": "AIzaSyDX8RPwu00MyrpqC-T2zXtrUQvTQGRv1mM" + "current_key": "AIzaSyCuPtf1hTikWXrp5OQIVfqO-TJWubI-Vd8" } ], "services": { "appinvite_service": { "other_platform_oauth_client": [ { - "client_id": "157373154094-egrhbfr861l7k722g3v2gd4a0opi3r1u.apps.googleusercontent.com", + "client_id": "1095694324958-5psabq8tpbti0uqo8bt46atjtbas9uhr.apps.googleusercontent.com", "client_type": 3 } ] @@ -36,4 +36,4 @@ } ], "configuration_version": "1" -} \ No newline at end of file +} diff --git a/lib/config/config.dart b/lib/config/config.dart index d6836827..d193bfac 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -231,6 +231,9 @@ const GET_SPECIAL_CLINICAL_CARE_MAPPING_LIST = "Services/DoctorApplication.svc/R const INSERT_MEDICAL_REPORT = "Services/Patients.svc/REST/DAPP_InsertMedicalReport_New"; const UPDATE_MEDICAL_REPORT = "Services/Patients.svc/REST/DAPP_UpdateMedicalReport"; +const GET_SICK_LEAVE_DOCTOR_APP = "Services/DoctorApplication.svc/REST/GetAllSickLeaves"; +const ADD_PATIENT_TO_DOCTOR = "LiveCareApi/DoctorApp/AssignPatientToDoctor"; +const REMOVE_PATIENT_FROM_DOCTOR = "LiveCareApi/DoctorApp/BackPatientToQueue"; var selectedPatientType = 1; @@ -283,7 +286,7 @@ const TRANSACTION_NO = 0; const LANGUAGE_ID = 2; const STAMP = '2020-04-27T12:17:17.721Z'; const IP_ADDRESS = '9.9.9.9'; -const VERSION_ID = 6.1; +const VERSION_ID = 6.2; const CHANNEL = 9; const SESSION_ID = 'BlUSkYymTt'; const IS_LOGIN_FOR_DOCTOR_APP = true; diff --git a/lib/core/model/live_care/add_patient_to_doctor_list_request_model.dart b/lib/core/model/live_care/add_patient_to_doctor_list_request_model.dart new file mode 100644 index 00000000..1d63e885 --- /dev/null +++ b/lib/core/model/live_care/add_patient_to_doctor_list_request_model.dart @@ -0,0 +1,27 @@ +class AddPatientToDoctorListRequestModel { + int vCID; + String tokenID; + String generalid; + int doctorId; + bool isOutKsa; + + AddPatientToDoctorListRequestModel({this.vCID, this.tokenID, this.generalid, this.doctorId, this.isOutKsa}); + + AddPatientToDoctorListRequestModel.fromJson(Map json) { + vCID = json['VC_ID']; + tokenID = json['TokenID']; + generalid = json['generalid']; + doctorId = json['DoctorId']; + isOutKsa = json['IsOutKsa']; + } + + Map toJson() { + final Map data = new Map(); + data['VC_ID'] = this.vCID; + data['TokenID'] = this.tokenID; + data['generalid'] = this.generalid; + data['DoctorId'] = this.doctorId; + data['IsOutKsa'] = this.isOutKsa; + return data; + } +} diff --git a/lib/core/model/sick_leave/sick_leave_doctor_request_model.dart b/lib/core/model/sick_leave/sick_leave_doctor_request_model.dart new file mode 100644 index 00000000..26bb76bd --- /dev/null +++ b/lib/core/model/sick_leave/sick_leave_doctor_request_model.dart @@ -0,0 +1,28 @@ +class GetSickLeaveDoctorRequestModel { + int patientMRN; + String appointmentNo; + int status; + String vidaAuthTokenID; + String vidaRefreshTokenID; + + GetSickLeaveDoctorRequestModel( + {this.patientMRN, this.appointmentNo, this.status, this.vidaAuthTokenID, this.vidaRefreshTokenID}); + + GetSickLeaveDoctorRequestModel.fromJson(Map json) { + patientMRN = json['PatientMRN']; + appointmentNo = json['AppointmentNo']; + status = json['status']; + vidaAuthTokenID = json['VidaAuthTokenID']; + vidaRefreshTokenID = json['VidaRefreshTokenID']; + } + + Map toJson() { + final Map data = new Map(); + data['PatientMRN'] = this.patientMRN; + data['AppointmentNo'] = this.appointmentNo; + data['status'] = this.status; + data['VidaAuthTokenID'] = this.vidaAuthTokenID; + data['VidaRefreshTokenID'] = this.vidaRefreshTokenID; + return data; + } +} diff --git a/lib/core/model/sick_leave/sick_leave_patient_model.dart b/lib/core/model/sick_leave/sick_leave_patient_model.dart index 3c78f1ff..43dbdb05 100644 --- a/lib/core/model/sick_leave/sick_leave_patient_model.dart +++ b/lib/core/model/sick_leave/sick_leave_patient_model.dart @@ -36,6 +36,11 @@ class SickLeavePatientModel { String strRequestDate; String startDate; String endDate; + dynamic isExtendedLeave; + dynamic noOfDays; + dynamic patientMRN; + dynamic remarks; + dynamic status; SickLeavePatientModel( {this.setupID, @@ -72,10 +77,19 @@ class SickLeavePatientModel { // this.speciality, this.strRequestDate, this.startDate, - this.endDate}); + this.endDate, + this.isExtendedLeave, + this.noOfDays, + this.patientMRN, + this.remarks, + this.status}); SickLeavePatientModel.fromJson(Map json) { setupID = json['SetupID']; + isExtendedLeave = json['isExtendedLeave']; + noOfDays = json['noOfDays']; + patientMRN = json['patientMRN']; + status = json['status']; projectID = json['ProjectID']; patientID = json['PatientID']; @@ -109,13 +123,17 @@ class SickLeavePatientModel { qR = json['QR']; // speciality = json['Speciality'].cast(); strRequestDate = json['StrRequestDate']; - startDate = json['StartDate']; + startDate = json['StartDate'] ?? json['startDate']; endDate = json['EndDate']; } Map toJson() { final Map data = new Map(); data['SetupID'] = this.setupID; + data['status'] = this.status; + data['isExtendedLeave'] = this.isExtendedLeave; + data['noOfDays'] = this.noOfDays; + data['patientMRN'] = this.patientMRN; data['ProjectID'] = this.projectID; data['PatientID'] = this.patientID; diff --git a/lib/core/model/sick_leave/sick_leave_patient_request_model.dart b/lib/core/model/sick_leave/sick_leave_patient_request_model.dart index ec588316..69b18f41 100644 --- a/lib/core/model/sick_leave/sick_leave_patient_request_model.dart +++ b/lib/core/model/sick_leave/sick_leave_patient_request_model.dart @@ -10,6 +10,7 @@ class SickLeavePatientRequestModel { int patientTypeID; String tokenID; int patientID; + int patientMRN; String sessionID; SickLeavePatientRequestModel( @@ -24,10 +25,12 @@ class SickLeavePatientRequestModel { this.patientTypeID, this.tokenID, this.patientID, - this.sessionID}); + this.sessionID, + this.patientMRN}); SickLeavePatientRequestModel.fromJson(Map json) { versionID = json['VersionID']; + patientMRN = json['PatientMRN']; channel = json['Channel']; languageID = json['LanguageID']; iPAdress = json['IPAdress']; @@ -44,6 +47,7 @@ class SickLeavePatientRequestModel { Map toJson() { final Map data = new Map(); data['VersionID'] = this.versionID; + data['PatientMRN'] = this.patientMRN; data['Channel'] = this.channel; data['LanguageID'] = this.languageID; data['IPAdress'] = this.iPAdress; diff --git a/lib/core/service/AnalyticsService.dart b/lib/core/service/AnalyticsService.dart new file mode 100644 index 00000000..660267d5 --- /dev/null +++ b/lib/core/service/AnalyticsService.dart @@ -0,0 +1,22 @@ +import 'package:firebase_analytics/firebase_analytics.dart'; +import 'package:firebase_analytics/observer.dart'; + +class AnalyticsService { + final FirebaseAnalytics _analytics = FirebaseAnalytics(); + + FirebaseAnalyticsObserver getAnalyticsObserver() => + FirebaseAnalyticsObserver(analytics: _analytics); + + Future logEvent( + {String eventCategory, + String eventLabel, + String eventAction, + String eventValue}) async { + await _analytics.logEvent(name: 'event', parameters: { + "eventCategory": eventCategory, + "eventLabel": eventLabel, + "eventAction": eventAction, + "eventValue": eventValue + }); + } +} diff --git a/lib/core/service/patient/LiveCarePatientServices.dart b/lib/core/service/patient/LiveCarePatientServices.dart index fff803d8..10af0ea2 100644 --- a/lib/core/service/patient/LiveCarePatientServices.dart +++ b/lib/core/service/patient/LiveCarePatientServices.dart @@ -1,7 +1,7 @@ - import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/core/model/live_care/AlternativeServicesList.dart'; import 'package:doctor_app_flutter/core/model/live_care/PendingPatientERForDoctorAppRequestModel.dart'; +import 'package:doctor_app_flutter/core/model/live_care/add_patient_to_doctor_list_request_model.dart'; import 'package:doctor_app_flutter/core/model/live_care/live_care_login_reguest_model.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; import 'package:doctor_app_flutter/models/livecare/end_call_req.dart'; @@ -35,14 +35,12 @@ class LiveCarePatientServices extends BaseService { StartCallRes get startCallRes => _startCallRes; Future getPendingPatientERForDoctorApp( - PendingPatientERForDoctorAppRequestModel - pendingPatientERForDoctorAppRequestModel) async { + PendingPatientERForDoctorAppRequestModel pendingPatientERForDoctorAppRequestModel) async { hasError = false; await baseAppClient.post( GET_PENDING_PATIENT_ER_FOR_DOCTOR_APP, onSuccess: (dynamic response, int statusCode) { - - List localPatientList= []; + List localPatientList = []; response['List_PendingPatientList'].forEach((v) { localPatientList.add(PatiantInformtion.fromJson(v)); @@ -50,22 +48,19 @@ class LiveCarePatientServices extends BaseService { /// add new items. localPatientList.forEach((element) { - if ((_patientList.singleWhere((it) => it.patientId == element.patientId, - orElse: () => null)) == null) { + if ((_patientList.singleWhere((it) => it.patientId == element.patientId, orElse: () => null)) == null) { _patientList.add(element); } }); /// remove items. - List removedPatientList= []; + List removedPatientList = []; _patientList.forEach((element) { - if ((localPatientList.singleWhere((it) => it.patientId == element.patientId, - orElse: () => null)) == null) { + if ((localPatientList.singleWhere((it) => it.patientId == element.patientId, orElse: () => null)) == null) { removedPatientList.add(element); } }); - removedPatientList.forEach((element) { _patientList.remove(element); }); @@ -105,11 +100,7 @@ class LiveCarePatientServices extends BaseService { }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: { - "VC_ID": vcID, - "AltServiceList": altServiceList, - "generalid":GENERAL_ID - }, isLiveCare: _isLive); + }, body: {"VC_ID": vcID, "AltServiceList": altServiceList, "generalid": GENERAL_ID}, isLiveCare: _isLive); } Future transferToAdmin(int vcID, String notes) async { @@ -128,20 +119,17 @@ class LiveCarePatientServices extends BaseService { Future sendSMSInstruction(int vcID) async { hasError = false; - await baseAppClient.post(SEND_SMS_INSTRUCTIONS, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(SEND_SMS_INSTRUCTIONS, onSuccess: (dynamic response, int statusCode) { transferToAdminResponse = response; }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: { - "VC_ID": vcID, "generalid": GENERAL_ID - }, isLiveCare: _isLive); + }, body: {"VC_ID": vcID, "generalid": GENERAL_ID}, isLiveCare: _isLive); } Future isLogin({LiveCareUserLoginRequestModel isLoginRequestModel, int loginStatus}) async { hasError = false; - await getDoctorProfile( ); + await getDoctorProfile(); isLoginRequestModel.doctorId = super.doctorProfile.doctorID; await baseAppClient.post(LIVE_CARE_IS_LOGIN, onSuccess: (response, statusCode) async { isLoginResponse = response; @@ -155,17 +143,48 @@ class LiveCarePatientServices extends BaseService { hasError = false; alternativeServicesList.clear(); - await baseAppClient.post(GET_ALTERNATIVE_SERVICE, - onSuccess: (dynamic response, int statusCode) { + await baseAppClient.post(GET_ALTERNATIVE_SERVICE, onSuccess: (dynamic response, int statusCode) { response['AlternativeServicesList'].forEach((v) { alternativeServicesList.add(AlternativeService.fromJson(v)); }); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: { - "VC_ID": vcID, - "generalid": GENERAL_ID - }, isLiveCare: _isLive); + }, body: {"VC_ID": vcID, "generalid": GENERAL_ID}, isLiveCare: _isLive); + } + + Future addPatientToDoctorList({int vcID}) async { + hasError = false; + await getDoctorProfile(); + AddPatientToDoctorListRequestModel addPatientToDoctorListRequestModel = AddPatientToDoctorListRequestModel(); + + addPatientToDoctorListRequestModel.doctorId = super.doctorProfile.doctorID; + addPatientToDoctorListRequestModel.vCID = vcID; + addPatientToDoctorListRequestModel.isOutKsa = false; + addPatientToDoctorListRequestModel.generalid = GENERAL_ID; + + await baseAppClient.post(ADD_PATIENT_TO_DOCTOR, onSuccess: (response, statusCode) async { + isLoginResponse = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: addPatientToDoctorListRequestModel.toJson(), isLiveCare: _isLive); + } + + Future removePatientFromDoctorList({int vcID}) async { + hasError = false; + AddPatientToDoctorListRequestModel addPatientToDoctorListRequestModel = AddPatientToDoctorListRequestModel(); + await getDoctorProfile(); + addPatientToDoctorListRequestModel.doctorId = super.doctorProfile.doctorID; + addPatientToDoctorListRequestModel.vCID = vcID; + addPatientToDoctorListRequestModel.isOutKsa = false; + addPatientToDoctorListRequestModel.generalid = GENERAL_ID; + + await baseAppClient.post(REMOVE_PATIENT_FROM_DOCTOR, onSuccess: (response, statusCode) async { + isLoginResponse = response; + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: addPatientToDoctorListRequestModel.toJson(), isLiveCare: _isLive); } } diff --git a/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart b/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart index 01a09592..dfb9c3ae 100644 --- a/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart +++ b/lib/core/service/patient_medical_file/medical_report/PatientMedicalReportService.dart @@ -15,9 +15,8 @@ class PatientMedicalReportService extends BaseService { body['AdmissionNo'] = patient.admissionNo; body['SetupID'] = doctorProfile.setupID; body['ProjectID'] = doctorProfile.projectID; - + medicalReportList = []; await baseAppClient.postPatient(PATIENT_MEDICAL_REPORT_GET_LIST, onSuccess: (dynamic response, int statusCode) { - medicalReportList.clear(); if (response['DAPP_ListMedicalReportList'] != null) { response['DAPP_ListMedicalReportList'].forEach((v) { medicalReportList.add(MedicalReportModel.fromJson(v)); diff --git a/lib/core/service/patient_medical_file/sick_leave/sickleave_service.dart b/lib/core/service/patient_medical_file/sick_leave/sickleave_service.dart index 8113c9a7..e1fca881 100644 --- a/lib/core/service/patient_medical_file/sick_leave/sickleave_service.dart +++ b/lib/core/service/patient_medical_file/sick_leave/sickleave_service.dart @@ -1,4 +1,5 @@ import 'package:doctor_app_flutter/config/config.dart'; +import 'package:doctor_app_flutter/core/model/sick_leave/sick_leave_doctor_request_model.dart'; import 'package:doctor_app_flutter/core/model/sick_leave/sick_leave_patient_model.dart'; import 'package:doctor_app_flutter/core/model/sick_leave/sick_leave_patient_request_model.dart'; import 'package:doctor_app_flutter/core/service/base/base_service.dart'; @@ -21,8 +22,7 @@ class SickLeaveService extends BaseService { List get coveringDoctorsList => _coveringDoctors; List _coveringDoctors = []; - List get getAllRescheduleLeave => - _getReScheduleLeave; + List get getAllRescheduleLeave => _getReScheduleLeave; List _getReScheduleLeave = []; dynamic get postReschedule => _postReschedule; dynamic _postReschedule; @@ -31,9 +31,11 @@ class SickLeaveService extends BaseService { dynamic _sickLeaveResponse; List getAllSickLeavePatient = List(); + List getAllSickLeaveDoctor = List(); + //getAllSickLeavePatient.addAll(getAllSickLeaveDoctor); - SickLeavePatientRequestModel _sickLeavePatientRequestModel = - SickLeavePatientRequestModel(); + SickLeavePatientRequestModel _sickLeavePatientRequestModel = SickLeavePatientRequestModel(); + GetSickLeaveDoctorRequestModel _sickLeaveDoctorRequestModel = GetSickLeaveDoctorRequestModel(); Future getStatistics(appoNo, patientMRN) async { hasError = false; @@ -56,6 +58,7 @@ class SickLeaveService extends BaseService { // addSickLeaveRequest.appointmentNo = '2016054661'; // addSickLeaveRequest.patientMRN = '3120746'; hasError = false; + _sickLeaveResponse.clear(); await baseAppClient.post( ADD_SICK_LEAVE, onSuccess: (dynamic response, int statusCode) { @@ -73,8 +76,7 @@ class SickLeaveService extends BaseService { Future extendSickLeave(GetAllSickLeaveResponse request) async { var extendSickLeaveRequest = ExtendSickLeaveRequest(); - extendSickLeaveRequest.patientMRN = - request.patientMRN.toString(); //'3120746'; + extendSickLeaveRequest.patientMRN = request.patientMRN.toString(); //'3120746'; extendSickLeaveRequest.previousRequestNo = request.requestNo.toString(); extendSickLeaveRequest.noOfDays = request.noOfDays.toString(); extendSickLeaveRequest.remarks = request.remarks; @@ -114,8 +116,8 @@ class SickLeaveService extends BaseService { } Future getSickLeavePatient(patientMRN) async { - _sickLeavePatientRequestModel = SickLeavePatientRequestModel( - patientID: patientMRN, patientTypeID: 2, patientType: 1); + _sickLeavePatientRequestModel = + SickLeavePatientRequestModel(patientID: patientMRN, patientTypeID: 2, patientType: 1); hasError = false; getAllSickLeavePatient = []; getAllSickLeavePatient.clear(); @@ -136,6 +138,28 @@ class SickLeaveService extends BaseService { ); } + Future getSickLeaveDoctor(patientMRN) async { + _sickLeaveDoctorRequestModel = GetSickLeaveDoctorRequestModel(patientMRN: patientMRN); + hasError = false; + getAllSickLeaveDoctor = []; + getAllSickLeaveDoctor.clear(); + await baseAppClient.post( + GET_SICK_LEAVE_DOCTOR_APP, + onSuccess: (dynamic response, int statusCode) { + Future.value(response); + getAllSickLeaveDoctor.clear(); + response['SickLeavesList']['entityList'].forEach((v) { + getAllSickLeaveDoctor.add(SickLeavePatientModel.fromJson(v)); + }); + }, + onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, + body: _sickLeaveDoctorRequestModel.toJson(), + ); + } + Future getRescheduleLeave() async { hasError = false; await baseAppClient.post( diff --git a/lib/core/viewModel/LiveCarePatientViewModel.dart b/lib/core/viewModel/LiveCarePatientViewModel.dart index 03cb0a7b..53feedd1 100644 --- a/lib/core/viewModel/LiveCarePatientViewModel.dart +++ b/lib/core/viewModel/LiveCarePatientViewModel.dart @@ -20,8 +20,7 @@ class LiveCarePatientViewModel extends BaseViewModel { StartCallRes get startCallRes => _liveCarePatientServices.startCallRes; - List get alternativeServicesList => - _liveCarePatientServices.alternativeServicesList; + List get alternativeServicesList => _liveCarePatientServices.alternativeServicesList; DashboardService _dashboardService = locator(); @@ -106,8 +105,7 @@ class LiveCarePatientViewModel extends BaseViewModel { selectedServices = getSelectedAlternativeServices(); } - await _liveCarePatientServices.endCallWithCharge( - vcID, selectedServices); + await _liveCarePatientServices.endCallWithCharge(vcID, selectedServices); if (_liveCarePatientServices.hasError) { error = _liveCarePatientServices.error; setState(ViewState.ErrorLocal); @@ -209,8 +207,7 @@ class LiveCarePatientViewModel extends BaseViewModel { AlternativeService(serviceID: 2, serviceName: "LABORATORY"), ); alternativeServicesList.add( - AlternativeService( - serviceID: 3, serviceName: "RADIOLOGY(ULTRASOUND) For pregnant only"), + AlternativeService(serviceID: 3, serviceName: "RADIOLOGY(ULTRASOUND) For pregnant only"), ); alternativeServicesList.add( AlternativeService(serviceID: 4, serviceName: "VACCINATIONS"), @@ -231,25 +228,46 @@ class LiveCarePatientViewModel extends BaseViewModel { AlternativeService(serviceID: 9, serviceName: "FAMILY MEDICIN DR"), ); alternativeServicesList.add( - AlternativeService( - serviceID: 10, serviceName: "FOLYS CATHETER INSERTION"), + AlternativeService(serviceID: 10, serviceName: "FOLYS CATHETER INSERTION"), ); alternativeServicesList.add( AlternativeService(serviceID: 11, serviceName: "GASTRIC TUBE CHANGE"), ); } - updateInCallPatient({PatiantInformtion patient, appointmentNo}){ - - _liveCarePatientServices.patientList.forEach((e) { - if(e.patientId == patient.patientId) { - e.episodeNo = 0 ; + updateInCallPatient({PatiantInformtion patient, appointmentNo}) { + _liveCarePatientServices.patientList.forEach((e) { + if (e.patientId == patient.patientId) { + e.episodeNo = 0; e.appointmentNo = appointmentNo; return; } }); setState(ViewState.Idle); + } + + Future addPatientToDoctorList(int vcID) async { + await getDoctorProfile(isGetProfile: true); + setState(ViewState.BusyLocal); + await _liveCarePatientServices.addPatientToDoctorList(vcID: vcID); + if (_liveCarePatientServices.hasError) { + error = _liveCarePatientServices.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } + } + Future removePatientFromDoctorList(int vcID) async { + await getDoctorProfile(isGetProfile: true); + setState(ViewState.BusyLocal); + await _liveCarePatientServices.removePatientFromDoctorList(vcID: vcID); + if (_liveCarePatientServices.hasError) { + error = _liveCarePatientServices.error; + setState(ViewState.ErrorLocal); + } else { + setState(ViewState.Idle); + } } } diff --git a/lib/core/viewModel/PatientMedicalReportViewModel.dart b/lib/core/viewModel/PatientMedicalReportViewModel.dart index ac5ecdeb..e7d343b4 100644 --- a/lib/core/viewModel/PatientMedicalReportViewModel.dart +++ b/lib/core/viewModel/PatientMedicalReportViewModel.dart @@ -60,10 +60,12 @@ class PatientMedicalReportViewModel extends BaseViewModel { await _service.addMedicalReport(patient, htmlText); if (_service.hasError) { error = _service.error; + await getMedicalReportList(patient); setState(ViewState.ErrorLocal); } else - await getMedicalReportList(patient); - setState(ViewState.Idle); + { await getMedicalReportList(patient); + setState(ViewState.Idle); + } } Future updateMedicalReport(PatiantInformtion patient, String htmlText, int limitNumber, String invoiceNumber) async { @@ -71,9 +73,11 @@ class PatientMedicalReportViewModel extends BaseViewModel { await _service.updateMedicalReport(patient, htmlText, limitNumber, invoiceNumber); if (_service.hasError) { error = _service.error; + await getMedicalReportList(patient); setState(ViewState.ErrorLocal); } else - await getMedicalReportList(patient); - setState(ViewState.Idle); + { + await getMedicalReportList(patient); + setState(ViewState.Idle);} } } diff --git a/lib/core/viewModel/patient-referral-viewmodel.dart b/lib/core/viewModel/patient-referral-viewmodel.dart index 2e3a6605..4240e848 100644 --- a/lib/core/viewModel/patient-referral-viewmodel.dart +++ b/lib/core/viewModel/patient-referral-viewmodel.dart @@ -303,13 +303,13 @@ class PatientReferralViewModel extends BaseViewModel { String getReferralStatusNameByCode(int statusCode, BuildContext context) { switch (statusCode) { case 1: - return TranslationBase.of(context).pending /*referralStatusHold*/; + return TranslationBase.of(context).referralStatusHold /*pending*/; case 2: - return TranslationBase.of(context).accepted /*referralStatusActive*/; + return TranslationBase.of(context).referralStatusActive /* accepted*/; case 4: - return TranslationBase.of(context).rejected /*referralStatusCancelled*/; + return TranslationBase.of(context).referralStatusCancelled /*rejected*/; case 46: - return TranslationBase.of(context).accepted /*referralStatusCompleted*/; + return TranslationBase.of(context).referralStatusCompleted /*accepted*/; case 63: return TranslationBase.of(context).rejected /*referralStatusNotSeen*/; default: diff --git a/lib/core/viewModel/project_view_model.dart b/lib/core/viewModel/project_view_model.dart index f464df0e..e7b7a80f 100644 --- a/lib/core/viewModel/project_view_model.dart +++ b/lib/core/viewModel/project_view_model.dart @@ -107,8 +107,8 @@ class ProjectViewModel with ChangeNotifier { return Future.value(localRes); } catch (error) { - print(error); - throw error; + //print(error); + //throw error; } } diff --git a/lib/core/viewModel/sick_leave_view_model.dart b/lib/core/viewModel/sick_leave_view_model.dart index b768cc9d..e80318f6 100644 --- a/lib/core/viewModel/sick_leave_view_model.dart +++ b/lib/core/viewModel/sick_leave_view_model.dart @@ -10,13 +10,17 @@ class SickLeaveViewModel extends BaseViewModel { SickLeaveService _sickLeaveService = locator(); get sickLeaveStatistics => _sickLeaveService.sickLeavestatisitics; get getAllSIckLeave => _sickLeaveService.getAllSickLeave; - get getAllSIckLeavePatient => _sickLeaveService.getAllSickLeavePatient; + //get getAllSIckLeavePatient => _sickLeaveService.getAllSickLeavePatient; + get sickleaveResponse => _sickLeaveService.sickLeaveResponse; + List get allOffTime => _sickLeaveService.getOffTimeList; List get allReasons => _sickLeaveService.getReasons; List get coveringDoctors => _sickLeaveService.coveringDoctorsList; + List get sickLeaveDoctor => _sickLeaveService.getAllSickLeaveDoctor; get getReschduleLeave => _sickLeaveService.getAllRescheduleLeave; get postSechedule => _sickLeaveService.postReschedule; - get sickleaveResponse => _sickLeaveService.sickLeaveResponse; + get getAllSIckLeavePatient => + [..._sickLeaveService.getAllSickLeavePatient, ..._sickLeaveService.getAllSickLeaveDoctor]; Future addSickLeave(AddSickLeaveRequest addSickLeaveRequest) async { setState(ViewState.Busy); await _sickLeaveService.addSickLeave(addSickLeaveRequest); @@ -67,6 +71,16 @@ class SickLeaveViewModel extends BaseViewModel { setState(ViewState.Idle); } + Future getSickLeaveDoctor(patientMRN) async { + setState(ViewState.Busy); + await _sickLeaveService.getSickLeaveDoctor(patientMRN); + if (_sickLeaveService.hasError) { + error = _sickLeaveService.error; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + Future getRescheduleLeave() async { setState(ViewState.Busy); await _sickLeaveService.getRescheduleLeave(); diff --git a/lib/locator.dart b/lib/locator.dart index d74fad8b..aa259758 100644 --- a/lib/locator.dart +++ b/lib/locator.dart @@ -10,6 +10,7 @@ import 'package:doctor_app_flutter/core/viewModel/scan_qr_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart'; import 'package:get_it/get_it.dart'; +import 'core/service/AnalyticsService.dart'; import 'core/service/NavigationService.dart'; import 'core/service/VideoCallService.dart'; import 'core/service/home/dasboard_service.dart'; @@ -98,6 +99,7 @@ void setupLocator() { locator.registerLazySingleton(() => ScanQrService()); locator.registerLazySingleton(() => SpecialClinicsService()); locator.registerLazySingleton(() => VideoCallService()); + locator.registerLazySingleton(() => AnalyticsService()); /// View Model locator.registerFactory(() => DoctorReplayViewModel()); diff --git a/lib/main.dart b/lib/main.dart index c29429b0..bf319a84 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -2,6 +2,8 @@ import 'package:doctor_app_flutter/core/provider/robot_provider.dart'; import 'package:doctor_app_flutter/core/viewModel/livecare_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; +import 'package:firebase_analytics/firebase_analytics.dart'; +import 'package:firebase_analytics/observer.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; @@ -11,6 +13,7 @@ import 'package:provider/provider.dart'; import './config/size_config.dart'; import './routes.dart'; import 'config/config.dart'; +import 'core/service/AnalyticsService.dart'; import 'core/service/NavigationService.dart'; import 'core/viewModel/authentication_view_model.dart'; import 'locator.dart'; @@ -67,7 +70,10 @@ class MyApp extends StatelessWidget { dividerColor: Colors.grey[350], backgroundColor: Color.fromRGBO(255, 255, 255, 1), ), - navigatorKey: locator().navigatorKey, + navigatorKey: locator().navigatorKey, + navigatorObservers:[ + locator().getAnalyticsObserver(), + ], initialRoute: INIT_ROUTE, routes: routes, debugShowCheckedModeBanner: false, diff --git a/lib/models/livecare/start_call_res.dart b/lib/models/livecare/start_call_res.dart index e3c1a54f..44921d5f 100644 --- a/lib/models/livecare/start_call_res.dart +++ b/lib/models/livecare/start_call_res.dart @@ -24,7 +24,7 @@ class StartCallRes { isAuthenticated = json['IsAuthenticated']; messageStatus = json['MessageStatus']; appointmentNo = json['AppointmentNo']; - isRecording = json['isRecording']; + isRecording = json['IsRecordedSession'] ?? false; } Map toJson() { @@ -35,7 +35,7 @@ class StartCallRes { data['IsAuthenticated'] = this.isAuthenticated; data['MessageStatus'] = this.messageStatus; data['AppointmentNo'] = this.appointmentNo; - data['isRecording'] = this.isRecording; + data['IsRecordedSession'] = this.isRecording ?? false; return data; } } diff --git a/lib/screens/auth/verification_methods_screen.dart b/lib/screens/auth/verification_methods_screen.dart index 69d4a47a..c4587014 100644 --- a/lib/screens/auth/verification_methods_screen.dart +++ b/lib/screens/auth/verification_methods_screen.dart @@ -45,7 +45,7 @@ class VerificationMethodsScreen extends StatefulWidget { } class _VerificationMethodsScreenState extends State { - + ProjectViewModel projectsProvider; bool isMoreOption = false; bool onlySMSBox = false; @@ -409,13 +409,6 @@ class _VerificationMethodsScreenState extends State { onTap: () { authenticationViewModel.deleteUser(); authenticationViewModel.setAppStatus(APP_STATUS.UNAUTHENTICATED); - // Navigator.pushAndRemoveUntil( - // AppGlobal.CONTEX, - // FadePage( - // page: RootPage(), - // ), - // (r) => false); - // Navigator.of(context).pushNamed(LOGIN); }, ), @@ -548,13 +541,14 @@ class _VerificationMethodsScreenState extends State { } } - checkActivationCode({value}) async { + checkActivationCode({String value}) async { await authenticationViewModel.checkActivationCodeForDoctorApp(activationCode: value); if (authenticationViewModel.state == ViewState.ErrorLocal) { Navigator.pop(context); Helpers.showErrorToast(authenticationViewModel.error); } else { await authenticationViewModel.onCheckActivationCodeSuccess(); + if(value !=null) Navigator.pop(context); Navigator.pop(context); navigateToLandingPage(); @@ -569,6 +563,4 @@ class _VerificationMethodsScreenState extends State { } } - - } diff --git a/lib/screens/live_care/live_care_patient_screen.dart b/lib/screens/live_care/live_care_patient_screen.dart index 12c8caff..f0f5e232 100644 --- a/lib/screens/live_care/live_care_patient_screen.dart +++ b/lib/screens/live_care/live_care_patient_screen.dart @@ -194,10 +194,7 @@ class _LiveCarePatientScreenState extends State { ); } - callConnected(){ + callConnected() {} - } - - callDisconnected(){ - } + callDisconnected() {} } diff --git a/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart b/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart index 4a6be6c8..72ee1311 100644 --- a/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart +++ b/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart @@ -43,7 +43,9 @@ class _AddVerifyMedicalReportState extends State { String txtOfMedicalReport; return BaseView( - onModelReady: (model) async {}, + onModelReady: (model) async { + model.getMedicalReportTemplate(); + }, builder: (_, model, w) => AppScaffold( baseViewModel: model, isShowAppBar: true, @@ -103,12 +105,12 @@ class _AddVerifyMedicalReportState extends State { if (txtOfMedicalReport.isNotEmpty) { GifLoaderDialogUtils.showMyDialog(context); widget.medicalReport != null - ? widget.model.updateMedicalReport( + ?await widget.model.updateMedicalReport( widget.patient, txtOfMedicalReport, widget.medicalReport != null ? widget.medicalReport.lineItemNo : null, widget.medicalReport != null ? widget.medicalReport.invoiceNo : null) - : widget.model.addMedicalReport(widget.patient, txtOfMedicalReport); + : await widget.model.addMedicalReport(widget.patient, txtOfMedicalReport); //model.getMedicalReportList(patient); Navigator.pop(context); diff --git a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart index 22645520..a5c367de 100644 --- a/lib/screens/patients/profile/medical_report/MedicalReportPage.dart +++ b/lib/screens/patients/profile/medical_report/MedicalReportPage.dart @@ -92,29 +92,15 @@ class _MedicalReportPageState extends State { )), ); - // Navigator.of(context).pushNamed(PATIENT_MEDICAL_REPORT_INSERT, arguments: { - // 'patient': patient, - // 'patientType': patientType, - // 'arrivalType': arrivalType, - // 'type': MedicalReportStatus.ADD, - // 'model': model, - // }); }, label: TranslationBase.of(context).createNewMedicalReport, ), - if (model.state != ViewState.ErrorLocal) + // if (model.state != ViewState.ErrorLocal)ß ...List.generate( model.medicalReportList.length, (index) => InkWell( onTap: () { if (model.medicalReportList[index].status == 1) { - // Navigator.of(context).pushNamed(PATIENT_MEDICAL_REPORT_INSERT, arguments: { - // 'patient': patient, - // 'patientType': patientType, - // 'arrivalType': arrivalType, - // 'medicalReport': model.medicalReportList[index], - // 'model': model, - // }); Navigator.push( context, MaterialPageRoute( diff --git a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart index 7484803a..8040e88e 100644 --- a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart +++ b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart @@ -32,6 +32,7 @@ class PatientProfileScreen extends StatefulWidget { class _PatientProfileScreenState extends State with SingleTickerProviderStateMixin { PatiantInformtion patient; + LiveCarePatientViewModel _liveCareViewModel = LiveCarePatientViewModel(); bool isFromSearch = false; bool isFromLiveCare = false; @@ -63,6 +64,9 @@ class _PatientProfileScreenState extends State with Single void dispose() { _tabController.dispose(); super.dispose(); + if (isFromLiveCare) { + _liveCareViewModel.removePatientFromDoctorList(patient.vcId); + } } @override @@ -123,6 +127,9 @@ class _PatientProfileScreenState extends State with Single Widget build(BuildContext context) { final screenSize = MediaQuery.of(context).size; return BaseView( + onModelReady: (model) async { + if (isFromLiveCare && patient.patientStatus == 1) await model.addPatientToDoctorList(patient.vcId); + }, builder: (_, model, w) => AppScaffold( baseViewModel: model, appBarTitle: TranslationBase.of(context).patientProfile, @@ -317,43 +324,35 @@ class _PatientProfileScreenState extends State with Single Navigator.push( context, MaterialPageRoute( - builder: (BuildContext context) => - EndCallScreen(patient: patient))); + builder: (BuildContext context) => EndCallScreen(patient: patient))); } else { GifLoaderDialogUtils.showMyDialog(context); - await model.startCall( - isReCall: false, vCID: patient.vcId); + await model.startCall(isReCall: false, vCID: patient.vcId); if (model.state == ViewState.ErrorLocal) { GifLoaderDialogUtils.hideDialog(context); Helpers.showErrorToast(model.error); } else { await model.getDoctorProfile(); - patient.appointmentNo = int.parse(model - .startCallRes.appointmentNo - .toString()); + patient.appointmentNo = int.parse(model.startCallRes.appointmentNo.toString()); patient.episodeNo = 0; model.updateInCallPatient( patient: patient, - appointmentNo: int.parse(model - .startCallRes.appointmentNo - .toString())); + appointmentNo: int.parse(model.startCallRes.appointmentNo.toString())); setState(() { isCallStarted = true; }); GifLoaderDialogUtils.hideDialog(context); - AppPermissionsUtils - .requestVideoCallPermission( - context: context, - onTapGrant: () { - locator() - .openVideo( - model.startCallRes, - patient, - model.startCallRes != null ? model.startCallRes.isRecording : true - , callConnected, - callDisconnected); - }); + AppPermissionsUtils.requestVideoCallPermission( + context: context, + onTapGrant: () { + locator().openVideo( + model.startCallRes, + patient, + model.startCallRes != null ? model.startCallRes.isRecording : true, + callConnected, + callDisconnected); + }); } }*/ }, diff --git a/lib/screens/sick-leave/add-sickleave.dart b/lib/screens/sick-leave/add-sickleave.dart index 7b065321..61c81957 100644 --- a/lib/screens/sick-leave/add-sickleave.dart +++ b/lib/screens/sick-leave/add-sickleave.dart @@ -28,8 +28,10 @@ class AddSickLeavScreen extends StatelessWidget { patient = routeArgs['patient']; bool isInpatient = routeArgs['isInpatient']; return BaseView( - onModelReady: (model) => - model.getSickLeavePatient(patient.patientMRN ?? patient.patientId), + onModelReady: (model) async { + await model.getSickLeavePatient(patient.patientMRN ?? patient.patientId); + await model.getSickLeaveDoctor(patient.patientMRN ?? patient.patientId); + }, builder: (_, model, w) => AppScaffold( baseViewModel: model, isShowAppBar: true, @@ -61,56 +63,59 @@ class AddSickLeavScreen extends StatelessWidget { ), ], )), - Container( - width: SizeConfig.screenWidth, - margin: EdgeInsets.only( - left: 20, right: 20, top: 10, bottom: 10), - padding: EdgeInsets.all(20), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(10), - color: HexColor('#EAEAEA')), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - child: Container( - decoration: BoxDecoration( - color: Colors.grey, - borderRadius: BorderRadius.circular(10)), - padding: EdgeInsets.all(3), - child: IconButton( + InkWell( + onTap: () { + openSickLeave( + context, + false, + ); + }, + child: Container( + width: SizeConfig.screenWidth, + margin: EdgeInsets.only(left: 20, right: 20, top: 10, bottom: 10), + padding: EdgeInsets.all(20), + decoration: + BoxDecoration(borderRadius: BorderRadius.circular(10), color: HexColor('#EAEAEA')), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Container( + child: Container( + decoration: + BoxDecoration(color: Colors.grey, borderRadius: BorderRadius.circular(10)), + padding: EdgeInsets.all(3), + child: IconButton( icon: Icon( Icons.add, size: 35, color: Colors.white, ), - onPressed: () { - openSickLeave( - context, - false, - ); - }), - )), - Padding( - child: AppText( - TranslationBase.of(context) - .noSickLeaveApplied, - fontWeight: FontWeight.bold, - fontFamily: 'Poppins', - fontSize: 16, - textAlign: TextAlign.center, - color: HexColor('#7E7E7E')), - padding: EdgeInsets.all(10), - ), - ], - )), + // onPressed: () { + // openSickLeave( + // context, + // false, + // ); + // }, + ), + )), + Padding( + child: AppText(TranslationBase.of(context).noSickLeaveApplied, + fontWeight: FontWeight.bold, + fontFamily: 'Poppins', + fontSize: 16, + textAlign: TextAlign.center, + color: HexColor('#7E7E7E')), + padding: EdgeInsets.all(10), + ), + ], + )), + ), ], ) : SizedBox(), model.getAllSIckLeavePatient.length > 0 ? Column( - children: model.getAllSIckLeavePatient - .map((SickLeavePatientModel item) { + children: model.getAllSIckLeavePatient.map((SickLeavePatientModel item) { return RoundedContainer( margin: EdgeInsets.all(10), child: Column( @@ -129,8 +134,7 @@ class AddSickLeavScreen extends StatelessWidget { // ))), padding: EdgeInsets.all(10), child: Row( - mainAxisAlignment: - MainAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, children: [ Expanded( flex: 4, @@ -139,13 +143,12 @@ class AddSickLeavScreen extends StatelessWidget { // MainAxisAlignment.start, children: [ Column( - crossAxisAlignment: - CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( padding: EdgeInsets.all(3), child: AppText( - item.doctorName, + item.doctorName ?? "", // item.status == 1 // ? TranslationBase.of( // context) @@ -158,8 +161,7 @@ class AddSickLeavScreen extends StatelessWidget { // : TranslationBase // .of(context) // .all, - fontWeight: - FontWeight.bold, + fontWeight: FontWeight.bold, // color: item.status == 1 // ? Colors.yellow[800] // : item.status == 2 @@ -170,34 +172,25 @@ class AddSickLeavScreen extends StatelessWidget { ), Row( children: [ - AppText(TranslationBase - .of(context) - .daysSickleave + - ": "), + AppText(TranslationBase.of(context).daysSickleave + ": "), AppText( - item.sickLeaveDays - .toString(), - fontWeight: - FontWeight.bold, + item.sickLeaveDays ?? item.noOfDays.toString(), + fontWeight: FontWeight.bold, ), ], ), Row( children: [ AppText( - TranslationBase.of( - context) - .startDate + - ' ', + TranslationBase.of(context).startDate + ' ' ?? "", ), Flexible( child: AppText( AppDateUtils.getDayMonthYearDateFormatted( - AppDateUtils - .convertStringToDate( - item.startDate)), - fontWeight: - FontWeight.bold, + item.startDate.contains("/Date(") + ? AppDateUtils.convertStringToDate(item.startDate) + : DateTime.parse(item.startDate)), + fontWeight: FontWeight.bold, ), ) ], @@ -205,42 +198,21 @@ class AddSickLeavScreen extends StatelessWidget { Row( children: [ AppText( - TranslationBase.of(context) - .endDate + - ' ', + TranslationBase.of(context).endDate + ' ' ?? "", ), Flexible( child: AppText( - AppDateUtils - .getDayMonthYearDateFormatted( - AppDateUtils - .convertStringToDate( - item.endDate, - )), - fontWeight: - FontWeight.bold, + AppDateUtils.getDayMonthYearDateFormatted( + item.startDate.contains("/Date(") + ? AppDateUtils.convertStringToDate(item.endDate) + .add(Duration(days: item.noOfDays)) + : DateTime.parse(item.startDate) + .add(Duration(days: item.noOfDays))), + fontWeight: FontWeight.bold, ), ) ], ), - Row(children: [ - AppText(TranslationBase.of( - context) - .branch + - ": "), - AppText( - item.projectName ?? "", - ), - ]), - Row(children: [ - AppText(TranslationBase.of( - context) - .clinic + - ": "), - AppText( - item.clinicName ?? "", - ), - ]), ], ), SizedBox( @@ -266,8 +238,7 @@ class AddSickLeavScreen extends StatelessWidget { Image.asset('assets/images/no-data.png'), Padding( padding: const EdgeInsets.all(8.0), - child: AppText( - TranslationBase.of(context).noSickLeave), + child: AppText(TranslationBase.of(context).noSickLeave), ) ], ), @@ -276,8 +247,7 @@ class AddSickLeavScreen extends StatelessWidget { ])))); } - openSickLeave(BuildContext context, isExtend, - {GetAllSickLeaveResponse extendedData}) { + openSickLeave(BuildContext context, isExtend, {GetAllSickLeaveResponse extendedData}) { // showModalBottomSheet( // context: context, // builder: (context) { @@ -287,12 +257,9 @@ class AddSickLeavScreen extends StatelessWidget { context, FadePage( page: SickLeaveScreen( - appointmentNo: isExtend == true - ? extendedData.appointmentNo - : patient.appointmentNo, //extendedData.appointmentNo, - patientMRN: isExtend == true - ? extendedData.patientMRN - : patient.patientMRN, + appointmentNo: + isExtend == true ? extendedData.appointmentNo : patient.appointmentNo, //extendedData.appointmentNo, + patientMRN: isExtend == true ? extendedData.patientMRN : patient.patientMRN, isExtended: isExtend, extendedData: extendedData, patient: patient))); diff --git a/lib/screens/sick-leave/sick_leave.dart b/lib/screens/sick-leave/sick_leave.dart index 199a7c82..be8e38f1 100644 --- a/lib/screens/sick-leave/sick_leave.dart +++ b/lib/screens/sick-leave/sick_leave.dart @@ -1,12 +1,14 @@ import 'package:doctor_app_flutter/config/config.dart'; import 'package:doctor_app_flutter/config/shared_pref_kay.dart'; import 'package:doctor_app_flutter/config/size_config.dart'; +import 'package:doctor_app_flutter/core/enum/viewstate.dart'; import 'package:doctor_app_flutter/core/viewModel/patient_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/sick_leave_view_model.dart'; import 'package:doctor_app_flutter/models/sickleave/add_sickleave_request.dart'; import 'package:doctor_app_flutter/models/sickleave/get_all_sickleave_response.dart'; import 'package:doctor_app_flutter/routes.dart'; import 'package:doctor_app_flutter/screens/base/base_view.dart'; +import 'package:doctor_app_flutter/screens/sick-leave/add-sickleave.dart'; import 'package:doctor_app_flutter/util/dr_app_shared_pref.dart'; import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart'; import 'package:doctor_app_flutter/util/helpers.dart'; @@ -28,12 +30,7 @@ class SickLeaveScreen extends StatefulWidget { final appointmentNo; final patientMRN; final patient; - SickLeaveScreen( - {this.appointmentNo, - this.patientMRN, - this.isExtended = false, - this.extendedData, - this.patient}); + SickLeaveScreen({this.appointmentNo, this.patientMRN, this.isExtended = false, this.extendedData, this.patient}); @override _SickLeaveScreenState createState() => _SickLeaveScreenState(); } @@ -76,8 +73,7 @@ class _SickLeaveScreenState extends State { return BaseView( onModelReady: (model) => model.getClinicsList(), builder: (_, model, w) => BaseView( - onModelReady: (model2) => model2.preSickLeaveStatistics( - widget.appointmentNo, widget.patientMRN), + onModelReady: (model2) => model2.preSickLeaveStatistics(widget.appointmentNo, widget.patientMRN), builder: (_, model2, w) => GestureDetector( onTap: () { FocusScope.of(context).requestFocus(new FocusNode()); @@ -108,46 +104,35 @@ class _SickLeaveScreenState extends State { Container( margin: EdgeInsets.only(left: 10, right: 10), decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(6.0)), + borderRadius: BorderRadius.all(Radius.circular(6.0)), border: Border.all( width: 1.0, color: HexColor("#CCCCCC"), ), color: Colors.white), padding: EdgeInsets.all(5), - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Padding( - padding: EdgeInsets.only( - top: 5, left: 10, right: 10), - child: AppText( - TranslationBase.of(context) - .sickLeave + - ' ' + - TranslationBase.of(context) - .days)), - AppTextFormField( - borderColor: Colors.white, - onChanged: (value) { - addSickLeave.noOfDays = value; - if (widget.extendedData != null) { - widget.extendedData.noOfDays = - int.parse(value); - } - }, - hintText: widget.extendedData != null - ? widget.extendedData.noOfDays - .toString() - : '', - // validator: (value) { - // return TextValidator().validateName(value); - // }, - textInputType:TextInputType.number, - inputFormatter: ONLY_NUMBERS) - ]), + child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [ + Padding( + padding: EdgeInsets.only(top: 5, left: 10, right: 10), + child: AppText(TranslationBase.of(context).sickLeave + + ' ' + + TranslationBase.of(context).days)), + AppTextFormField( + borderColor: Colors.white, + onChanged: (value) { + addSickLeave.noOfDays = value; + if (widget.extendedData != null) { + widget.extendedData.noOfDays = int.parse(value); + } + }, + hintText: + widget.extendedData != null ? widget.extendedData.noOfDays.toString() : '', + // validator: (value) { + // return TextValidator().validateName(value); + // }, + textInputType: TextInputType.number, + inputFormatter: ONLY_NUMBERS) + ]), ), SizedBox( height: 10, @@ -155,146 +140,107 @@ class _SickLeaveScreenState extends State { Container( margin: EdgeInsets.only(left: 10, right: 10), decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, color: HexColor("#CCCCCC")), + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all(width: 1.0, color: HexColor("#CCCCCC")), color: Colors.white, ), padding: EdgeInsets.all(5), child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: EdgeInsets.only( - top: 5, left: 10, right: 10), + padding: EdgeInsets.only(top: 5, left: 10, right: 10), child: AppText( - TranslationBase.of(context) - .sickLeaveDate, + TranslationBase.of(context).sickLeaveDate, )), AppTextFormField( - hintText: widget.extendedData != null - ? widget.extendedData.startDate - : '', + hintText: widget.extendedData != null ? widget.extendedData.startDate : '', borderColor: Colors.white, - prefix: IconButton( - icon: Icon(Icons.calendar_today)), + prefix: IconButton(icon: Icon(Icons.calendar_today)), textInputType: TextInputType.number, controller: _toDateController, onTap: () { - _presentDatePicker( - '_selectedToDate'); + _presentDatePicker('_selectedToDate'); }, inputFormatter: ONLY_DATE, onChanged: (value) { addSickLeave.startDate = value; if (widget.extendedData != null) { - widget.extendedData.startDate = - value; + widget.extendedData.startDate = value; } }), ], )), Container( - margin: EdgeInsets.only( - top: 10, left: 10, right: 10), + margin: EdgeInsets.only(top: 10, left: 10, right: 10), decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, color: HexColor("#CCCCCC")), + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all(width: 1.0, color: HexColor("#CCCCCC")), color: Colors.white, ), width: double.infinity, child: Padding( padding: EdgeInsets.only( top: SizeConfig.widthMultiplier * 0.9, - bottom: - SizeConfig.widthMultiplier * 0.9, + bottom: SizeConfig.widthMultiplier * 0.9, right: SizeConfig.widthMultiplier * 3, left: SizeConfig.widthMultiplier * 3), child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: EdgeInsets.only(top: 5), child: AppText( - TranslationBase.of(context) - .clinicName, + TranslationBase.of(context).clinicName, )), Row( mainAxisSize: MainAxisSize.max, children: [ Expanded( // add Expanded to have your dropdown button fill remaining space - child: - DropdownButtonHideUnderline( - child: new IgnorePointer( - ignoring: true, - child: DropdownButton( - isExpanded: true, - value: getClinicName( - model) ?? - "", - iconSize: 0, - elevation: 16, - selectedItemBuilder: - (BuildContext - context) { - return model - .getClinicNameList() - .map((item) { - return Row( - mainAxisSize: - MainAxisSize - .max, - children: < - Widget>[ - AppText( - item, - fontSize: - SizeConfig.textMultiplier * - 2.1, - color: Colors - .grey, - ), - ], - ); - }).toList(); - }, - onChanged: - (newValue) => - {}, - items: model - .getClinicNameList() - .map((item) { - return DropdownMenuItem( - value: item - .toString(), - child: Text( + child: DropdownButtonHideUnderline( + child: new IgnorePointer( + ignoring: true, + child: DropdownButton( + isExpanded: true, + value: getClinicName(model) ?? "", + iconSize: 0, + elevation: 16, + selectedItemBuilder: (BuildContext context) { + return model.getClinicNameList().map((item) { + return Row( + mainAxisSize: MainAxisSize.max, + children: [ + AppText( item, - textAlign: - TextAlign - .end, + fontSize: SizeConfig.textMultiplier * 2.1, + color: Colors.grey, ), - ); - }).toList(), - ))), + ], + ); + }).toList(); + }, + onChanged: (newValue) => {}, + items: model.getClinicNameList().map((item) { + return DropdownMenuItem( + value: item.toString(), + child: Text( + item, + textAlign: TextAlign.end, + ), + ); + }).toList(), + ))), ), ], ) ], ), )), - model2.sickLeaveStatistics[ - 'recommendedSickLeaveDays'] != - null + model2.sickLeaveStatistics['recommendedSickLeaveDays'] != null ? Padding( child: AppText( - model2.sickLeaveStatistics[ - 'recommendedSickLeaveDays'], + model2.sickLeaveStatistics['recommendedSickLeaveDays'], fontWeight: FontWeight.bold, textAlign: TextAlign.start, ), @@ -306,10 +252,8 @@ class _SickLeaveScreenState extends State { Container( margin: EdgeInsets.only(left: 10, right: 10), decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, color: HexColor("#CCCCCC")), + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all(width: 1.0, color: HexColor("#CCCCCC")), color: Colors.white, ), padding: EdgeInsets.all(5), @@ -317,11 +261,9 @@ class _SickLeaveScreenState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: EdgeInsets.only( - top: 5, left: 10, right: 10), + padding: EdgeInsets.only(top: 5, left: 10, right: 10), child: AppText( - TranslationBase.of(context) - .doctorName, + TranslationBase.of(context).doctorName, )), new IgnorePointer( ignoring: true, @@ -343,10 +285,8 @@ class _SickLeaveScreenState extends State { Container( margin: EdgeInsets.only(left: 10, right: 10), decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(6.0)), - border: Border.all( - width: 1.0, color: HexColor("#CCCCCC")), + borderRadius: BorderRadius.all(Radius.circular(6.0)), + border: Border.all(width: 1.0, color: HexColor("#CCCCCC")), color: Colors.white, ), padding: EdgeInsets.all(5), @@ -354,8 +294,7 @@ class _SickLeaveScreenState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( - padding: EdgeInsets.only( - top: 5, left: 10, right: 10), + padding: EdgeInsets.only(top: 5, left: 10, right: 10), child: AppText( TranslationBase.of(context).remarks, )), @@ -364,9 +303,7 @@ class _SickLeaveScreenState extends State { decoration: InputDecoration( contentPadding: EdgeInsets.all(20.0), border: InputBorder.none, - hintText: widget.extendedData != null - ? widget.extendedData.remarks - : ''), + hintText: widget.extendedData != null ? widget.extendedData.remarks : ''), onChanged: (value) { addSickLeave.remarks = value; if (widget.extendedData != null) { @@ -378,40 +315,60 @@ class _SickLeaveScreenState extends State { ), ), Container( - margin: EdgeInsets.all( - SizeConfig.widthMultiplier * 5), + margin: EdgeInsets.all(SizeConfig.widthMultiplier * 5), child: Wrap( alignment: WrapAlignment.center, children: [ AppButton( title: widget.isExtended == true ? TranslationBase.of(context).extend - : TranslationBase.of(context) - .addSickLeaverequest, + : TranslationBase.of(context).addSickLeaverequest, color: Colors.green, onPressed: () async { if (widget.isExtended) { - await model2.extendSickLeave( - widget.extendedData); + await model2.extendSickLeave(widget.extendedData); DrAppToastMsg.showSuccesToast( - model2.sickleaveResponse[ - 'ListSickLeavesToExtent'] - ['success']); - Navigator.of(context) - .popUntil((route) { - return route.settings.name == - PATIENTS_PROFILE; + model2.sickleaveResponse['ListSickLeavesToExtent']['success']); + Navigator.of(context).popUntil((route) { + return route.settings.name == PATIENTS_PROFILE; }); - Navigator.of(context).pushNamed( - ADD_SICKLEAVE, - arguments: { - 'patient': widget.patient - }); + Navigator.of(context) + .pushNamed(ADD_SICKLEAVE, arguments: {'patient': widget.patient}); //print(value); //}); } else { - _validateInputs(model2); + try { + if (addSickLeave.noOfDays == null) { + DrAppToastMsg.showErrorToast( + TranslationBase.of(context).pleaseEnterNoOfDays); + } else if (addSickLeave.remarks == null) { + DrAppToastMsg.showErrorToast( + TranslationBase.of(context).pleaseEnterRemarks); + } else if (addSickLeave.startDate == null) { + DrAppToastMsg.showErrorToast(TranslationBase.of(context).pleaseEnterDate); + } else { + addSickLeave.patientMRN = widget.patient.patientMRN.toString(); + addSickLeave.appointmentNo = widget.patient.appointmentNo.toString(); + await model2.addSickLeave(addSickLeave); + + if (model2.sickleaveResponse['SickLeavesList']['success'] != null) + DrAppToastMsg.showSuccesToast( + model2.sickleaveResponse['SickLeavesList']['success']); + } + // Navigator.push( + // context, + // MaterialPageRoute(builder: (context) => AddSickLeavScreen()), + // ); + + // Navigator.of(context).popUntil((route) { + // return route.settings.name == PATIENTS_PROFILE; + // }); + // Navigator.of(context) + // .pushNamed(ADD_SICKLEAVE, arguments: {'patient': widget.patient}); + } catch (err) { + print(err); + } } }, ), @@ -437,26 +394,21 @@ class _SickLeaveScreenState extends State { void _validateInputs(model2) async { try { if (addSickLeave.noOfDays == null) { - DrAppToastMsg.showErrorToast( - TranslationBase.of(context).pleaseEnterNoOfDays); + DrAppToastMsg.showErrorToast(TranslationBase.of(context).pleaseEnterNoOfDays); } else if (addSickLeave.remarks == null) { - DrAppToastMsg.showErrorToast( - TranslationBase.of(context).pleaseEnterRemarks); + DrAppToastMsg.showErrorToast(TranslationBase.of(context).pleaseEnterRemarks); } else if (addSickLeave.startDate == null) { - DrAppToastMsg.showErrorToast( - TranslationBase.of(context).pleaseEnterDate); + DrAppToastMsg.showErrorToast(TranslationBase.of(context).pleaseEnterDate); } else { addSickLeave.patientMRN = widget.patient.patientMRN.toString(); addSickLeave.appointmentNo = widget.patient.appointmentNo.toString(); await model2.addSickLeave(addSickLeave).then((value) => print(value)); - DrAppToastMsg.showSuccesToast( - model2.sickleaveResponse['ListSickLeavesToExtent']['success']); + DrAppToastMsg.showSuccesToast(model2.sickleaveResponse['ListSickLeavesToExtent']['success']); Navigator.of(context).popUntil((route) { return route.settings.name == PATIENTS_PROFILE; }); - Navigator.of(context) - .pushNamed(ADD_SICKLEAVE, arguments: {'patient': widget.patient}); + Navigator.of(context).pushNamed(ADD_SICKLEAVE, arguments: {'patient': widget.patient}); } } catch (err) { print(err); @@ -471,9 +423,7 @@ class _SickLeaveScreenState extends State { } getClinicName(model) { - var clinicInfo = model.clinicsList - .where((i) => i['ClinicID'] == this.profile['ClinicID']) - .toList(); + var clinicInfo = model.clinicsList.where((i) => i['ClinicID'] == this.profile['ClinicID']).toList(); return clinicInfo.length > 0 ? clinicInfo[0]['ClinicDescription'] : ""; } } diff --git a/lib/widgets/patients/patient-referral-item-widget.dart b/lib/widgets/patients/patient-referral-item-widget.dart index a898e39c..6d573cc4 100644 --- a/lib/widgets/patients/patient-referral-item-widget.dart +++ b/lib/widgets/patients/patient-referral-item-widget.dart @@ -44,7 +44,9 @@ class PatientReferralItemWidget extends StatelessWidget { this.doctorAvatar, this.referralDoctorName, this.clinicDescription, - this.infoIcon,this.isReferralClinic=false,this.referralClinic}); + this.infoIcon, + this.isReferralClinic = false, + this.referralClinic}); @override Widget build(BuildContext context) { @@ -58,9 +60,13 @@ class PatientReferralItemWidget extends StatelessWidget { child: CardWithBgWidget( bgColor: referralStatusCode == 1 ? Color(0xffc4aa54) - : referralStatusCode == 46 || referralStatusCode == 2 + : referralStatusCode == 2 ? Colors.green[700] - : Colors.red[700], + : referralStatusCode == 46 + ? Colors.green[900] + : referralStatusCode == 4 + ? Colors.red[700] + : Colors.red[900], hasBorder: false, widget: Container( // padding: EdgeInsets.only(left: 20, right: 0, bottom: 0), @@ -78,9 +84,13 @@ class PatientReferralItemWidget extends StatelessWidget { fontWeight: FontWeight.w700, color: referralStatusCode == 1 ? Color(0xffc4aa54) - : referralStatusCode == 46 || referralStatusCode == 2 + : referralStatusCode == 2 ? Colors.green[700] - : Colors.red[700], + : referralStatusCode == 46 + ? Colors.green[900] + : referralStatusCode == 4 + ? Colors.red[700] + : Colors.red[900], ), AppText( referredDate, @@ -158,7 +168,10 @@ class PatientReferralItemWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - isSameBranch ? TranslationBase.of(context).referredFrom :TranslationBase.of(context).refClinic, + isSameBranch + ? TranslationBase.of(context) + .referredFrom + : TranslationBase.of(context).refClinic, fontFamily: 'Poppins', fontWeight: FontWeight.w600, fontSize: 1.7 * SizeConfig.textMultiplier, @@ -166,7 +179,13 @@ class PatientReferralItemWidget extends StatelessWidget { ), Expanded( child: AppText( - !isReferralClinic? isSameBranch ? TranslationBase.of(context).sameBranch : TranslationBase.of(context).otherBranch: " "+referralClinic, + !isReferralClinic + ? isSameBranch + ? TranslationBase.of(context) + .sameBranch + : TranslationBase.of(context) + .otherBranch + : " " + referralClinic, fontFamily: 'Poppins', fontWeight: FontWeight.w700, fontSize: 1.8 * SizeConfig.textMultiplier, @@ -217,7 +236,7 @@ class PatientReferralItemWidget extends StatelessWidget { ), Expanded( child: AppText( - remark??"", + remark ?? "", fontFamily: 'Poppins', fontWeight: FontWeight.w700, fontSize: 1.8 * SizeConfig.textMultiplier, @@ -261,13 +280,13 @@ class PatientReferralItemWidget extends StatelessWidget { }, )) : Container( - child: Image.asset( - patientGender == 1 - ? 'assets/images/male_avatar.png' - : 'assets/images/female_avatar.png', - fit: BoxFit.cover, - ), - ), + child: Image.asset( + patientGender == 1 + ? 'assets/images/male_avatar.png' + : 'assets/images/female_avatar.png', + fit: BoxFit.cover, + ), + ), ), ), Expanded( diff --git a/pubspec.lock b/pubspec.lock index a408ffd5..c90d86d9 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -351,6 +351,34 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "5.2.1" + firebase: + dependency: transitive + description: + name: firebase + url: "https://pub.dartlang.org" + source: hosted + version: "7.3.3" + firebase_analytics: + dependency: "direct main" + description: + name: firebase_analytics + url: "https://pub.dartlang.org" + source: hosted + version: "6.3.0" + firebase_analytics_platform_interface: + dependency: transitive + description: + name: firebase_analytics_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + firebase_analytics_web: + dependency: transitive + description: + name: firebase_analytics_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1" firebase_core: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 1429bc3e..8582b9cb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -71,6 +71,7 @@ dependencies: # Firebase firebase_messaging: ^7.0.3 + firebase_analytics: 6.3.0 #GIF image flutter_gifimage: ^1.0.1