From 47437c863774ff9d28a6249ab56b6c0f7d09ee7b Mon Sep 17 00:00:00 2001 From: Elham Rababh Date: Thu, 18 Nov 2021 16:32:38 +0200 Subject: [PATCH] some fixes to go flutter 2 --- .../lab_order/labs_service.dart | 4 +- .../prescription/prescriptions_service.dart | 2 +- .../sick_leave/sickleave_service.dart | 2 +- lib/core/service/pending_order_service.dart | 4 +- .../viewModel/PatientSearchViewModel.dart | 2 +- .../viewModel/prescriptions_view_model.dart | 2 +- .../list_gt_my_patients_question_model.dart | 1 - .../doctor_replay/all_doctor_questions.dart | 2 +- .../doctor_replay/doctor_repaly_chat.dart | 2 +- .../doctor_replay/doctor_reply_screen.dart | 2 +- .../not_replaied_doctor_questions.dart | 2 +- .../In_patient/in_patient_screen.dart | 2 +- .../profile/UCAF/ucaf_pager_screen.dart | 2 +- .../admission_orders_screen.dart | 2 +- ...iabetic_details_blood_pressurewideget.dart | 2 +- .../line_chart_for_diabetic.dart | 10 +-- .../profile/diagnosis/diagnosis_screen.dart | 2 +- .../all_discharge_summary.dart | 2 +- .../discharge_Summary_widget.dart | 2 +- .../discharge_summary/discharge_summary.dart | 2 +- .../pending_discharge_summary.dart | 2 +- .../profile/lab_result/FlowChartPage.dart | 66 ++++++++++--------- .../lab_result/LineChartCurvedLabHistory.dart | 4 +- .../all_lab_special_result_page.dart | 2 +- .../special_lab_result_details_page.dart | 2 +- .../AddVerifyMedicalReport.dart | 2 +- .../nursing_note/nursing_note_screen.dart | 2 +- .../operation_report/operation_report.dart | 2 +- .../update_operation_report.dart | 2 +- .../pending_orders/pending_orders_screen.dart | 2 +- .../referral/my-referral-detail-screen.dart | 2 +- .../assessment/update_assessment_page.dart | 2 +- .../objective/update_objective_page.dart | 2 +- .../bottom_sheet_dialog_button.dart | 2 +- .../shared_soap_widgets/remove_button.dart | 2 +- .../steper/steps_widget.dart | 2 +- .../subjective/allergies/allergies_item.dart | 2 +- ..._key_checkbox_search_allergies_widget.dart | 8 +-- .../subjective/update_subjective_page.dart | 4 +- .../soap_update/update_soap_index.dart | 4 +- .../RegisterConfirmationPatientPage.dart | 2 +- .../register_patient/RegisterPatientPage.dart | 2 +- .../RegisterSearchPatientPage.dart | 4 +- .../VerifyActivationCodePage.dart | 2 +- .../profile/patient-profile-app-bar.dart | 2 +- .../profile/profile_medical_info_widget.dart | 2 +- .../shared/bottom_navigation_item.dart | 3 +- .../text_fields/country_textfield_custom.dart | 14 ++-- 48 files changed, 100 insertions(+), 98 deletions(-) diff --git a/lib/core/service/patient_medical_file/lab_order/labs_service.dart b/lib/core/service/patient_medical_file/lab_order/labs_service.dart index b291c312..1fe088c0 100644 --- a/lib/core/service/patient_medical_file/lab_order/labs_service.dart +++ b/lib/core/service/patient_medical_file/lab_order/labs_service.dart @@ -14,7 +14,7 @@ import '../../base/base_service.dart'; class LabsService extends BaseService { List patientLabOrdersList = []; - List _allSpecialLab = List(); + List _allSpecialLab = []; List get allSpecialLab => _allSpecialLab; AllSpecialLabResultRequestModel _allSpecialLabResultRequestModel = AllSpecialLabResultRequestModel(); @@ -56,7 +56,7 @@ class LabsService extends BaseService { List patientLabSpecialResult = []; List labResultList = []; List labOrdersResultsList = []; - List labOrdersResultHistoryList = List(); + List labOrdersResultHistoryList = []; Future getLaboratoryResult( {String? projectID, diff --git a/lib/core/service/patient_medical_file/prescription/prescriptions_service.dart b/lib/core/service/patient_medical_file/prescription/prescriptions_service.dart index daebebf9..55ab7a89 100644 --- a/lib/core/service/patient_medical_file/prescription/prescriptions_service.dart +++ b/lib/core/service/patient_medical_file/prescription/prescriptions_service.dart @@ -18,7 +18,7 @@ import '../../base/base_service.dart'; class PrescriptionsService extends BaseService { List prescriptionsList = []; - List medicationForInPatient = List(); + List medicationForInPatient = []; List prescriptionsOrderList = []; List prescriptionInPatientList = []; 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 e4e090d0..6efeba18 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 @@ -30,7 +30,7 @@ class SickLeaveService extends BaseService { List getAllSickLeavePatient = []; - List getAllSickLeaveDoctor = List(); + List getAllSickLeaveDoctor = []; SickLeavePatientRequestModel _sickLeavePatientRequestModel = SickLeavePatientRequestModel(); GetSickLeaveDoctorRequestModel _sickLeaveDoctorRequestModel = GetSickLeaveDoctorRequestModel(); diff --git a/lib/core/service/pending_order_service.dart b/lib/core/service/pending_order_service.dart index e6f35bb8..f0bcf5e9 100644 --- a/lib/core/service/pending_order_service.dart +++ b/lib/core/service/pending_order_service.dart @@ -6,10 +6,10 @@ import 'package:doctor_app_flutter/models/pending_orders/pending_order_request_m import 'package:doctor_app_flutter/models/pending_orders/pending_orders_model.dart'; class PendingOrderService extends BaseService { - List _pendingOrderList = List(); + List _pendingOrderList = []; List get pendingOrderList => _pendingOrderList; - List _admissionOrderList = List(); + List _admissionOrderList = []; List get admissionOrderList => _admissionOrderList; Future getPendingOrders( diff --git a/lib/core/viewModel/PatientSearchViewModel.dart b/lib/core/viewModel/PatientSearchViewModel.dart index 61ad9d70..b9a9a323 100644 --- a/lib/core/viewModel/PatientSearchViewModel.dart +++ b/lib/core/viewModel/PatientSearchViewModel.dart @@ -145,7 +145,7 @@ class PatientSearchViewModel extends BaseViewModel { List get myIinPatientList => _inPatientService.myInPatientList; List filteredInPatientItems = []; - List filteredMyInPatientItems = List(); + List filteredMyInPatientItems = []; Future getInPatientList(PatientSearchRequestModel requestModel, {bool isMyInpatient = false, bool isLocalBusy = false}) async { await getDoctorProfile(); diff --git a/lib/core/viewModel/prescriptions_view_model.dart b/lib/core/viewModel/prescriptions_view_model.dart index 84c655a7..f48294a4 100644 --- a/lib/core/viewModel/prescriptions_view_model.dart +++ b/lib/core/viewModel/prescriptions_view_model.dart @@ -32,7 +32,7 @@ class PrescriptionsViewModel extends BaseViewModel { List get medicationForInPatient => _prescriptionsService.medicationForInPatient; - List _medicationForInPatient = List(); + List _medicationForInPatient = []; getPrescriptions(PatiantInformtion patient) async { setState(ViewState.Busy); diff --git a/lib/models/doctor/list_gt_my_patients_question_model.dart b/lib/models/doctor/list_gt_my_patients_question_model.dart index a8f56ed9..0e630c5f 100644 --- a/lib/models/doctor/list_gt_my_patients_question_model.dart +++ b/lib/models/doctor/list_gt_my_patients_question_model.dart @@ -1,5 +1,4 @@ class ListGtMyPatientsQuestions { -import 'package:doctor_app_flutter/util/date-utils.dart'; Null rowID; String? setupID; diff --git a/lib/screens/doctor/doctor_replay/all_doctor_questions.dart b/lib/screens/doctor/doctor_replay/all_doctor_questions.dart index 5166d2b1..ac6736e0 100644 --- a/lib/screens/doctor/doctor_replay/all_doctor_questions.dart +++ b/lib/screens/doctor/doctor_replay/all_doctor_questions.dart @@ -14,7 +14,7 @@ import 'doctor_repaly_chat.dart'; class AllDoctorQuestions extends StatefulWidget { final Function changeCurrentTab; - const AllDoctorQuestions({Key key, this.changeCurrentTab}) : super(key: key); + const AllDoctorQuestions({Key? key, this.changeCurrentTab}) : super(key: key); @override _AllDoctorQuestionsState createState() => _AllDoctorQuestionsState(); diff --git a/lib/screens/doctor/doctor_replay/doctor_repaly_chat.dart b/lib/screens/doctor/doctor_replay/doctor_repaly_chat.dart index 52331e8e..85c06b18 100644 --- a/lib/screens/doctor/doctor_replay/doctor_repaly_chat.dart +++ b/lib/screens/doctor/doctor_replay/doctor_repaly_chat.dart @@ -24,7 +24,7 @@ class DoctorReplayChat extends StatefulWidget { final DoctorReplayViewModel previousModel; bool showMsgBox = false; DoctorReplayChat( - {Key key, this.reply, this.previousModel, + {Key? key, this.reply, this.previousModel, }); @override diff --git a/lib/screens/doctor/doctor_replay/doctor_reply_screen.dart b/lib/screens/doctor/doctor_replay/doctor_reply_screen.dart index 8b51319c..84c951f8 100644 --- a/lib/screens/doctor/doctor_replay/doctor_reply_screen.dart +++ b/lib/screens/doctor/doctor_replay/doctor_reply_screen.dart @@ -28,7 +28,7 @@ import 'not_replaied_Doctor_Questions.dart'; class DoctorReplyScreen extends StatefulWidget { final Function changeCurrentTab; - const DoctorReplyScreen({Key key, this.changeCurrentTab}) : super(key: key); + const DoctorReplyScreen({Key? key, this.changeCurrentTab}) : super(key: key); @override _DoctorReplyScreenState createState() => _DoctorReplyScreenState(); diff --git a/lib/screens/doctor/doctor_replay/not_replaied_doctor_questions.dart b/lib/screens/doctor/doctor_replay/not_replaied_doctor_questions.dart index 5b21809f..65b95217 100644 --- a/lib/screens/doctor/doctor_replay/not_replaied_doctor_questions.dart +++ b/lib/screens/doctor/doctor_replay/not_replaied_doctor_questions.dart @@ -14,7 +14,7 @@ import 'doctor_repaly_chat.dart'; class NotRepliedDoctorQuestions extends StatefulWidget { final Function changeCurrentTab; - const NotRepliedDoctorQuestions({Key key, this.changeCurrentTab}) + const NotRepliedDoctorQuestions({Key? key, this.changeCurrentTab}) : super(key: key); @override diff --git a/lib/screens/patients/In_patient/in_patient_screen.dart b/lib/screens/patients/In_patient/in_patient_screen.dart index ef9f8b03..b70d5788 100644 --- a/lib/screens/patients/In_patient/in_patient_screen.dart +++ b/lib/screens/patients/In_patient/in_patient_screen.dart @@ -25,7 +25,7 @@ class InPatientScreen extends StatefulWidget { bool isAllClinic = true; bool showBottomSheet = false; String selectedClinicName; - InPatientScreen({Key key, this.specialClinic}); + InPatientScreen({Key? key, this.specialClinic}); @override _InPatientScreenState createState() => _InPatientScreenState(); diff --git a/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart b/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart index 8c38ece7..87be05b2 100644 --- a/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart +++ b/lib/screens/patients/profile/UCAF/ucaf_pager_screen.dart @@ -15,7 +15,7 @@ import 'UCAF-detail-screen.dart'; import 'UCAF-input-screen.dart'; class UCAFPagerScreen extends StatefulWidget { - const UCAFPagerScreen({Key key}) : super(key: key); + const UCAFPagerScreen({Key? key}) : super(key: key); @override _UCAFPagerScreenState createState() => _UCAFPagerScreenState(); diff --git a/lib/screens/patients/profile/admission-orders/admission_orders_screen.dart b/lib/screens/patients/profile/admission-orders/admission_orders_screen.dart index f83117e2..41b8d0ee 100644 --- a/lib/screens/patients/profile/admission-orders/admission_orders_screen.dart +++ b/lib/screens/patients/profile/admission-orders/admission_orders_screen.dart @@ -14,7 +14,7 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class AdmissionOrdersScreen extends StatefulWidget { - const AdmissionOrdersScreen({Key key}) : super(key: key); + const AdmissionOrdersScreen({Key? key}) : super(key: key); @override _AdmissionOrdersScreenState createState() => _AdmissionOrdersScreenState(); diff --git a/lib/screens/patients/profile/diabetic_chart/diabetic_details_blood_pressurewideget.dart b/lib/screens/patients/profile/diabetic_chart/diabetic_details_blood_pressurewideget.dart index b3b1b581..c68f848f 100644 --- a/lib/screens/patients/profile/diabetic_chart/diabetic_details_blood_pressurewideget.dart +++ b/lib/screens/patients/profile/diabetic_chart/diabetic_details_blood_pressurewideget.dart @@ -13,7 +13,7 @@ class DiabeticDetails extends StatefulWidget { final List diabeticDetailsList; DiabeticDetails( - {Key key, this.diabeticDetailsList,}); + {Key? key, this.diabeticDetailsList,}); @override _VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState(); diff --git a/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart b/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart index 671230c2..1159e970 100644 --- a/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart +++ b/lib/screens/patients/profile/diabetic_chart/line_chart_for_diabetic.dart @@ -14,8 +14,8 @@ class LineChartForDiabetic extends StatelessWidget { LineChartForDiabetic( {this.title, this.timeSeries1, this.indexes, this.isOX= false}); - List xAxixs = List(); - List yAxixs = List(); + List xAxixs = []; + List yAxixs = []; @override Widget build(BuildContext context) { @@ -188,12 +188,12 @@ class LineChartForDiabetic extends StatelessWidget { } List getData(context) { - List spots = List(); + List spots = []; for (int index = 0; index < timeSeries1.length; index++) { spots.add(FlSpot(index.toDouble(), timeSeries1[index].sales)); } - List spots2 = List(); + List spots2 = []; // for (int index = 0; index < timeSeries2.length; index++) { // spots2.add(FlSpot(index.toDouble(), timeSeries2[index].sales)); // } @@ -225,7 +225,7 @@ class LineChartForDiabetic extends StatelessWidget { ), ); - List lineChartData = List(); + List lineChartData = []; if(spots.isNotEmpty){ lineChartData.add(lineChartBarData1); } diff --git a/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart b/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart index 65e483b5..caa7421b 100644 --- a/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart +++ b/lib/screens/patients/profile/diagnosis/diagnosis_screen.dart @@ -31,7 +31,7 @@ import 'package:provider/provider.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); class DiagnosisScreen extends StatefulWidget { - const DiagnosisScreen({Key key}) : super(key: key); + const DiagnosisScreen({Key? key}) : super(key: key); @override _ProgressNoteState createState() => _ProgressNoteState(); diff --git a/lib/screens/patients/profile/discharge_summary/all_discharge_summary.dart b/lib/screens/patients/profile/discharge_summary/all_discharge_summary.dart index 0ae7bf04..73317d8d 100644 --- a/lib/screens/patients/profile/discharge_summary/all_discharge_summary.dart +++ b/lib/screens/patients/profile/discharge_summary/all_discharge_summary.dart @@ -16,7 +16,7 @@ import 'discharge_Summary_widget.dart'; class AllDischargeSummary extends StatefulWidget { final Function changeCurrentTab; - const AllDischargeSummary({Key key, this.changeCurrentTab}) : super(key: key); + const AllDischargeSummary({Key? key, this.changeCurrentTab}) : super(key: key); @override _AllDischargeSummaryState createState() => _AllDischargeSummaryState(); diff --git a/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart b/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart index f4c67442..8d5b02ae 100644 --- a/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart +++ b/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart @@ -19,7 +19,7 @@ class DischargeSummaryWidget extends StatefulWidget { final GetDischargeSummaryResModel dischargeSummary; bool isShowMore = false; - DischargeSummaryWidget({Key key, this.dischargeSummary}); + DischargeSummaryWidget({Key? key, this.dischargeSummary}); @override _DischargeSummaryWidgetState createState() => _DischargeSummaryWidgetState(); diff --git a/lib/screens/patients/profile/discharge_summary/discharge_summary.dart b/lib/screens/patients/profile/discharge_summary/discharge_summary.dart index 1625d7bb..3bcd673a 100644 --- a/lib/screens/patients/profile/discharge_summary/discharge_summary.dart +++ b/lib/screens/patients/profile/discharge_summary/discharge_summary.dart @@ -23,7 +23,7 @@ import 'pending_discharge_summary.dart'; class DischargeSummaryPage extends StatefulWidget { final Function changeCurrentTab; - const DischargeSummaryPage({Key key, this.changeCurrentTab}) : super(key: key); + const DischargeSummaryPage({Key? key, this.changeCurrentTab}) : super(key: key); @override _DoctorReplyScreenState createState() => _DoctorReplyScreenState(); diff --git a/lib/screens/patients/profile/discharge_summary/pending_discharge_summary.dart b/lib/screens/patients/profile/discharge_summary/pending_discharge_summary.dart index 3981163e..317eeb4d 100644 --- a/lib/screens/patients/profile/discharge_summary/pending_discharge_summary.dart +++ b/lib/screens/patients/profile/discharge_summary/pending_discharge_summary.dart @@ -17,7 +17,7 @@ class PendingDischargeSummary extends StatefulWidget { final Function changeCurrentTab; final PatiantInformtion patient; - const PendingDischargeSummary({Key key, this.changeCurrentTab, this.patient}) + const PendingDischargeSummary({Key? key, this.changeCurrentTab, this.patient}) : super(key: key); @override diff --git a/lib/screens/patients/profile/lab_result/FlowChartPage.dart b/lib/screens/patients/profile/lab_result/FlowChartPage.dart index f634a466..3bf6929b 100644 --- a/lib/screens/patients/profile/lab_result/FlowChartPage.dart +++ b/lib/screens/patients/profile/lab_result/FlowChartPage.dart @@ -20,7 +20,7 @@ class FlowChartPage extends StatelessWidget { final bool isInpatient; FlowChartPage( - {required this.patientLabOrder, required this.filterName, required this.patient, required this.isInpatient}); + {this.patientLabOrder, this.filterName, this.patient, this.isInpatient}); @override Widget build(BuildContext context) { @@ -29,45 +29,47 @@ class FlowChartPage extends StatelessWidget { patientLabOrder: patientLabOrder, procedureDescription: filterName, patient: patient), - //onModelReady: (model) => - model.getPatientLabOrdersResults(//patientLabOrder: patientLabOrder,// procedure: filterName,// patient: patient), + // onModelReady: (model) => model.getPatientLabOrdersResults( + // patientLabOrder: patientLabOrder, + // procedure: filterName, + // patient: patient), builder: (context, model, w) => AppScaffold( isShowAppBar: true, appBarTitle: filterName, baseViewModel: model, body: model.labOrdersResultHistoryList.isNotEmpty ? SingleChildScrollView( - child: Container( - child: LabResultHistoryChartAndDetails( - name: filterName, - labResultHistory: model.labOrdersResultHistoryList, - ), - // child: LabResultChartAndDetails( - // name: filterName, - // labResult: model.labOrdersResultsList, - // ), - ), - ) + child: Container( + child: LabResultHistoryChartAndDetails( + name: filterName, + labResultHistory: model.labOrdersResultHistoryList, + ), + // child: LabResultChartAndDetails( + // name: filterName, + // labResult: model.labOrdersResultsList, + // ), + ), + ) : Container( - child: Center( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisSize: MainAxisSize.min, - children: [ - Image.asset('assets/images/no-data.png'), - Padding( - padding: const EdgeInsets.all(8.0), - child: AppText( - TranslationBase.of(context).noDataAvailable, - fontWeight: FontWeight.normal, - color: HexColor("#B8382B"), - fontSize: SizeConfig.textMultiplier * 2.5, - ), - ) - ], + child: Center( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisSize: MainAxisSize.min, + children: [ + Image.asset('assets/images/no-data.png'), + Padding( + padding: const EdgeInsets.all(8.0), + child: AppText( + TranslationBase.of(context).noDataAvailable, + fontWeight: FontWeight.normal, + color: HexColor("#B8382B"), + fontSize: SizeConfig.textMultiplier * 2.5, ), - ), - ), + ) + ], + ), + ), + ), ), ); } diff --git a/lib/screens/patients/profile/lab_result/LineChartCurvedLabHistory.dart b/lib/screens/patients/profile/lab_result/LineChartCurvedLabHistory.dart index ea9300d0..e0d0323b 100644 --- a/lib/screens/patients/profile/lab_result/LineChartCurvedLabHistory.dart +++ b/lib/screens/patients/profile/lab_result/LineChartCurvedLabHistory.dart @@ -17,7 +17,7 @@ class LineChartCurvedLabHistory extends StatefulWidget { class LineChartCurvedLabHistoryState extends State { bool isShowingMainData; - List xAxixs = List(); + List xAxixs = []; int indexes = 0; @override @@ -197,7 +197,7 @@ class LineChartCurvedLabHistoryState extends State { } List getData() { - List spots = List(); + List spots = []; for (int index = 0; index < widget.labResultHistory.length; index++) { try { var resultValueDouble = diff --git a/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart b/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart index 545b4378..4393b26f 100644 --- a/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart +++ b/lib/screens/patients/profile/lab_result/all_lab_special_result_page.dart @@ -14,7 +14,7 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class AllLabSpecialResult extends StatefulWidget { - const AllLabSpecialResult({Key key}) : super(key: key); + const AllLabSpecialResult({Key? key}) : super(key: key); @override _AllLabSpecialResultState createState() => _AllLabSpecialResultState(); diff --git a/lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart b/lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart index db86dd72..9a20209a 100644 --- a/lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart +++ b/lib/screens/patients/profile/lab_result/special_lab_result_details_page.dart @@ -13,7 +13,7 @@ class SpecialLabResultDetailsPage extends StatelessWidget { final String resultData; final PatiantInformtion patient; - const SpecialLabResultDetailsPage({Key key, this.resultData, this.patient}) : super(key: key); + const SpecialLabResultDetailsPage({Key? key, this.resultData, this.patient}) : super(key: key); @override Widget build(BuildContext context) { diff --git a/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart b/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart index 2aa95b23..3f35fd80 100644 --- a/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart +++ b/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart @@ -23,7 +23,7 @@ class AddVerifyMedicalReport extends StatefulWidget { final String medicalNote; const AddVerifyMedicalReport( - {Key key, + {Key? key, this.patient, this.patientType, this.arrivalType, diff --git a/lib/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart b/lib/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart index 0fbac8bf..50d76dfb 100644 --- a/lib/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart +++ b/lib/screens/patients/profile/notes/nursing_note/nursing_note_screen.dart @@ -30,7 +30,7 @@ import 'package:provider/provider.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); class NursingProgressNoteScreen extends StatefulWidget { - const NursingProgressNoteScreen({Key key}) : super(key: key); + const NursingProgressNoteScreen({Key? key}) : super(key: key); @override _ProgressNoteState createState() => _ProgressNoteState(); diff --git a/lib/screens/patients/profile/operation_report/operation_report.dart b/lib/screens/patients/profile/operation_report/operation_report.dart index c2751424..bc5ca8d7 100644 --- a/lib/screens/patients/profile/operation_report/operation_report.dart +++ b/lib/screens/patients/profile/operation_report/operation_report.dart @@ -33,7 +33,7 @@ DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); class OperationReportScreen extends StatefulWidget { final int visitType; - const OperationReportScreen({Key key, this.visitType}) : super(key: key); + const OperationReportScreen({Key? key, this.visitType}) : super(key: key); @override _ProgressNoteState createState() => _ProgressNoteState(); diff --git a/lib/screens/patients/profile/operation_report/update_operation_report.dart b/lib/screens/patients/profile/operation_report/update_operation_report.dart index d042ff2f..8148e2a9 100644 --- a/lib/screens/patients/profile/operation_report/update_operation_report.dart +++ b/lib/screens/patients/profile/operation_report/update_operation_report.dart @@ -40,7 +40,7 @@ class UpdateOperationReport extends StatefulWidget { final bool isUpdate; const UpdateOperationReport( - {Key key, + {Key? key, // this.operationReportViewModel, this.patient, this.visitType, diff --git a/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart b/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart index a03ca3c5..c820fded 100644 --- a/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart +++ b/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart @@ -9,7 +9,7 @@ import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.d import 'package:flutter/material.dart'; class PendingOrdersScreen extends StatelessWidget { - const PendingOrdersScreen({Key key}) : super(key: key); + const PendingOrdersScreen({Key? key}) : super(key: key); @override Widget build(BuildContext context) { diff --git a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart index 3c8331ea..ac8ddd16 100644 --- a/lib/screens/patients/profile/referral/my-referral-detail-screen.dart +++ b/lib/screens/patients/profile/referral/my-referral-detail-screen.dart @@ -18,7 +18,7 @@ import 'package:flutter/material.dart'; class MyReferralDetailScreen extends StatelessWidget { final MyReferralPatientModel referralPatient; - const MyReferralDetailScreen({Key key, this.referralPatient}) : super(key: key); + const MyReferralDetailScreen({Key? key, this.referralPatient}) : super(key: key); @override Widget build(BuildContext context) { diff --git a/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart b/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart index c2133553..f42289f9 100644 --- a/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart +++ b/lib/screens/patients/profile/soap_update/assessment/update_assessment_page.dart @@ -44,7 +44,7 @@ class UpdateAssessmentPage extends StatefulWidget { class _UpdateAssessmentPageState extends State implements AssessmentCallBack { bool isAssessmentExpand = false; - List mySelectedAssessmentList = List(); + List mySelectedAssessmentList = []; @override Widget build(BuildContext context) { diff --git a/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart index 536e2df9..99891220 100644 --- a/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart +++ b/lib/screens/patients/profile/soap_update/objective/update_objective_page.dart @@ -44,7 +44,7 @@ class UpdateObjectivePage extends StatefulWidget { class _UpdateObjectivePageState extends State implements ObjectiveCallBack { bool isSysExaminationExpand = false; - List mySelectedExamination = List(); + List mySelectedExamination = []; BoxDecoration containerBorderDecoration(Color containerColor, Color borderColor) { return BoxDecoration( diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart index 835dd225..c7d48e1c 100644 --- a/lib/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_dialog_button.dart @@ -9,7 +9,7 @@ class BottomSheetDialogButton extends StatelessWidget { double headerHeight = SizeConfig.heightMultiplier * 12; - BottomSheetDialogButton({Key key, this.onTap, this.label}) : super(key: key); + BottomSheetDialogButton({Key? key, this.onTap, this.label}) : super(key: key); @override Widget build(BuildContext context) { diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/remove_button.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/remove_button.dart index 1e5231c9..c64fe86a 100644 --- a/lib/screens/patients/profile/soap_update/shared_soap_widgets/remove_button.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/remove_button.dart @@ -10,7 +10,7 @@ class RemoveButton extends StatelessWidget { final Function onTap; final String label; - const RemoveButton({Key key, this.onTap, this.label}) : super(key: key); + const RemoveButton({Key? key, this.onTap, this.label}) : super(key: key); @override Widget build(BuildContext context) { diff --git a/lib/screens/patients/profile/soap_update/shared_soap_widgets/steper/steps_widget.dart b/lib/screens/patients/profile/soap_update/shared_soap_widgets/steper/steps_widget.dart index e1c97d75..22f92f00 100644 --- a/lib/screens/patients/profile/soap_update/shared_soap_widgets/steper/steps_widget.dart +++ b/lib/screens/patients/profile/soap_update/shared_soap_widgets/steper/steps_widget.dart @@ -16,7 +16,7 @@ class StepsWidget extends StatelessWidget { final PatiantInformtion patientInfo; StepsWidget( - {Key key, + {Key? key, this.index, this.changeCurrentTab, this.height = 0.0, diff --git a/lib/screens/patients/profile/soap_update/subjective/allergies/allergies_item.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/allergies_item.dart index 130e730d..cceab871 100644 --- a/lib/screens/patients/profile/soap_update/subjective/allergies/allergies_item.dart +++ b/lib/screens/patients/profile/soap_update/subjective/allergies/allergies_item.dart @@ -26,7 +26,7 @@ class AddAllergiesItem extends StatefulWidget { final MasterKeyModel item; const AddAllergiesItem( - {Key key, + {Key? key, this.model, this.removeAllergy, this.addAllergy, diff --git a/lib/screens/patients/profile/soap_update/subjective/allergies/master_key_checkbox_search_allergies_widget.dart b/lib/screens/patients/profile/soap_update/subjective/allergies/master_key_checkbox_search_allergies_widget.dart index 8819f04a..2c13c5b2 100644 --- a/lib/screens/patients/profile/soap_update/subjective/allergies/master_key_checkbox_search_allergies_widget.dart +++ b/lib/screens/patients/profile/soap_update/subjective/allergies/master_key_checkbox_search_allergies_widget.dart @@ -24,7 +24,7 @@ class MasterKeyCheckboxSearchAllergiesWidget extends StatefulWidget { final String hintSearchText; MasterKeyCheckboxSearchAllergiesWidget( - {Key key, + {Key? key, this.model, this.addSelectedAllergy, this.removeAllergy, @@ -43,7 +43,7 @@ class MasterKeyCheckboxSearchAllergiesWidget extends StatefulWidget { class _MasterKeyCheckboxSearchAllergiesWidgetState extends State { - List items = List(); + List items = []; TextEditingController filteredSearchController = TextEditingController(); @override @@ -122,10 +122,10 @@ class _MasterKeyCheckboxSearchAllergiesWidgetState } void filterSearchResults(String query) { - List dummySearchList = List(); + List dummySearchList = []; dummySearchList.addAll(widget.masterList); if (query.isNotEmpty) { - List dummyListData = List(); + List dummyListData = []; dummySearchList.forEach((items) { if (items.nameAr.toLowerCase().contains(query.toLowerCase()) || items.nameEn.toLowerCase().contains(query.toLowerCase())) { diff --git a/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart b/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart index 87686586..79417789 100644 --- a/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart +++ b/lib/screens/patients/profile/soap_update/subjective/update_subjective_page.dart @@ -46,8 +46,8 @@ class _UpdateSubjectivePageState extends State TextEditingController medicationController = TextEditingController(); final formKey = GlobalKey(); - List myAllergiesList = List(); - List myHistoryList = List(); + List myAllergiesList = []; + List myHistoryList = []; getHistory(SOAPViewModel model) async { widget.changeLoadingState(true); diff --git a/lib/screens/patients/profile/soap_update/update_soap_index.dart b/lib/screens/patients/profile/soap_update/update_soap_index.dart index 2ea12a6e..707770eb 100644 --- a/lib/screens/patients/profile/soap_update/update_soap_index.dart +++ b/lib/screens/patients/profile/soap_update/update_soap_index.dart @@ -31,8 +31,8 @@ class UpdateSoapIndex extends StatefulWidget { class _UpdateSoapIndexState extends State with TickerProviderStateMixin { PageController? _controller; int _currentIndex = 0; - List myAllergiesList = List(); - List myHistoryList = List(); + List myAllergiesList = []; + List myHistoryList = []; changePageViewIndex(pageIndex, {isChangeState = true}) { if (pageIndex != _currentIndex && isChangeState) changeLoadingState(true); diff --git a/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart b/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart index c03c6f96..6aaacb26 100644 --- a/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterConfirmationPatientPage.dart @@ -44,7 +44,7 @@ class RegisterConfirmationPatientPage extends StatefulWidget { final PatientRegistrationViewModel model; const RegisterConfirmationPatientPage( - {Key key, this.operationReportViewModel, this.patient, this.model}) + {Key? key, this.operationReportViewModel, this.patient, this.model}) : super(key: key); @override diff --git a/lib/screens/patients/register_patient/RegisterPatientPage.dart b/lib/screens/patients/register_patient/RegisterPatientPage.dart index 231ff3d1..9bc2d6fe 100644 --- a/lib/screens/patients/register_patient/RegisterPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterPatientPage.dart @@ -12,7 +12,7 @@ import 'package:flutter/material.dart'; import 'RegisterSearchPatientPage.dart'; class RegisterPatientPage extends StatefulWidget { - const RegisterPatientPage({Key key}) : super(key: key); + const RegisterPatientPage({Key? key}) : super(key: key); @override _RegisterPatientPageState createState() => _RegisterPatientPageState(); diff --git a/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart b/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart index 2afc593e..fd425c01 100644 --- a/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart +++ b/lib/screens/patients/register_patient/RegisterSearchPatientPage.dart @@ -30,7 +30,7 @@ class RegisterSearchPatientPage extends StatefulWidget { final PatientRegistrationViewModel model; const RegisterSearchPatientPage( - {Key key, this.changePageViewIndex, this.model}) + {Key? key, this.changePageViewIndex, this.model}) : super(key: key); @override @@ -66,7 +66,7 @@ class _RegisterSearchPatientPageState extends State { @override void initState() { _phoneCode.text = ""; - countryList = List(); + countryList = []; dynamic ksaCountry = {"id": 967, "name": "Saudi Arabia"}; dynamic uaeCountry = {"id": 971, "name": "United Arab Emirates"}; diff --git a/lib/screens/patients/register_patient/VerifyActivationCodePage.dart b/lib/screens/patients/register_patient/VerifyActivationCodePage.dart index d58e5a3b..6f0e1a31 100644 --- a/lib/screens/patients/register_patient/VerifyActivationCodePage.dart +++ b/lib/screens/patients/register_patient/VerifyActivationCodePage.dart @@ -6,7 +6,7 @@ import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; import 'package:flutter/material.dart'; class VerifyActivationCodePage extends StatefulWidget { - const VerifyActivationCodePage({Key key}) : super(key: key); + const VerifyActivationCodePage({Key? key}) : super(key: key); @override _VerifyActivationCodePageState createState() => diff --git a/lib/widgets/patients/profile/patient-profile-app-bar.dart b/lib/widgets/patients/profile/patient-profile-app-bar.dart index bc1f9a28..5158d466 100644 --- a/lib/widgets/patients/profile/patient-profile-app-bar.dart +++ b/lib/widgets/patients/profile/patient-profile-app-bar.dart @@ -399,7 +399,7 @@ class HeaderRow extends StatelessWidget { final String label; final String value; - const HeaderRow({Key key, this.label, this.value}) : super(key: key); + const HeaderRow({Key? key, this.label, this.value}) : super(key: key); @override Widget build(BuildContext context) { diff --git a/lib/widgets/patients/profile/profile_medical_info_widget.dart b/lib/widgets/patients/profile/profile_medical_info_widget.dart index a7832481..55a3d105 100644 --- a/lib/widgets/patients/profile/profile_medical_info_widget.dart +++ b/lib/widgets/patients/profile/profile_medical_info_widget.dart @@ -16,7 +16,7 @@ class ProfileMedicalInfoWidget extends StatelessWidget { final bool isInpatient; ProfileMedicalInfoWidget( - {Key key, this.patient, this.patientType, this.arrivalType, this.from, this.to, this.isInpatient}); + {Key? key, this.patient, this.patientType, this.arrivalType, this.from, this.to, this.isInpatient}); @override Widget build(BuildContext context) { diff --git a/lib/widgets/shared/bottom_navigation_item.dart b/lib/widgets/shared/bottom_navigation_item.dart index bc50ad82..0d5b09f6 100644 --- a/lib/widgets/shared/bottom_navigation_item.dart +++ b/lib/widgets/shared/bottom_navigation_item.dart @@ -1,4 +1,5 @@ import 'package:badges/badges.dart'; +import 'package:doctor_app_flutter/config/size_config.dart'; import 'package:doctor_app_flutter/core/viewModel/dashboard_view_model.dart'; import 'package:doctor_app_flutter/core/viewModel/doctor_replay_view_model.dart'; import 'package:flutter/cupertino.dart'; @@ -14,7 +15,7 @@ class BottomNavigationItem extends StatelessWidget { final int? index; final int currentIndex; final String? name; - final DashboardViewModel dashboardViewModel; + final DashboardViewModel? dashboardViewModel; BottomNavigationItem( diff --git a/lib/widgets/shared/text_fields/country_textfield_custom.dart b/lib/widgets/shared/text_fields/country_textfield_custom.dart index baed4995..51f586e1 100644 --- a/lib/widgets/shared/text_fields/country_textfield_custom.dart +++ b/lib/widgets/shared/text_fields/country_textfield_custom.dart @@ -7,16 +7,16 @@ import 'package:flutter/material.dart'; class CountryTextField extends StatefulWidget { final dynamic element; - final String elementError; - final List elementList; - final String keyName; - final String keyId; - final String hintText; - final double width; + final String? elementError; + final List? elementList; + final String? keyName; + final String? keyId; + final String? hintText; + final double? width; final Function(dynamic) okFunction; CountryTextField( - {Key key, + {Key? key, @required this.element, @required this.elementError, this.width,