diff --git a/lib/core/viewModel/PatientMedicalReportViewModel.dart b/lib/core/viewModel/PatientMedicalReportViewModel.dart index 59485e92..996766ec 100644 --- a/lib/core/viewModel/PatientMedicalReportViewModel.dart +++ b/lib/core/viewModel/PatientMedicalReportViewModel.dart @@ -68,9 +68,9 @@ class PatientMedicalReportViewModel extends BaseViewModel { } } - Future updateMedicalReport(PatiantInformtion patient, String htmlText, int limitNumber, String invoiceNumber) async { + Future updateMedicalReport(PatiantInformtion patient, String htmlText, int? limitNumber, String? invoiceNumber) async { setState(ViewState.Busy); - await _service.updateMedicalReport(patient, htmlText, limitNumber, invoiceNumber); + await _service.updateMedicalReport(patient, htmlText, limitNumber!, invoiceNumber!); if (_service.hasError) { error = _service.error!; await getMedicalReportList(patient); diff --git a/lib/screens/live_care/end_call_screen.dart b/lib/screens/live_care/end_call_screen.dart index 886061c8..a9ab2d9f 100644 --- a/lib/screens/live_care/end_call_screen.dart +++ b/lib/screens/live_care/end_call_screen.dart @@ -189,19 +189,20 @@ class _EndCallScreenState extends State { .of(context) .scaffoldBackgroundColor, isShowAppBar: true, - appBar: PatientProfileAppBar(patientProfileAppBarModel :PatientProfileAppBarModel(patient: patient!,isInpatient: isInpatient, - isDischargedPatient: isDischargedPatient, - height: (patient!.patientStatusType != null && patient!.patientStatusType == 43) - ? 210 - : isDischargedPatient - ? 240 - : 0, - ), + appBar: PatientProfileAppBar( + patient, onPressed: (){ Navigator.pop(context); }, - ), + isInpatient: isInpatient, + height: (patient!.patientStatusType != null && + patient!.patientStatusType == 43) + ? 210 + : isDischargedPatient + ? 240 + : 0, + isDischargedPatient: isDischargedPatient), body: Container( height: !isSearchAndOut ? isDischargedPatient 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 f29315ae..50e1cd4d 100644 --- a/lib/screens/patients/profile/discharge_summary/all_discharge_summary.dart +++ b/lib/screens/patients/profile/discharge_summary/all_discharge_summary.dart @@ -10,10 +10,9 @@ import 'package:flutter/material.dart'; import 'discharge_Summary_widget.dart'; class AllDischargeSummary extends StatefulWidget { - final Function changeCurrentTab; final PatiantInformtion patient; - const AllDischargeSummary({this.changeCurrentTab, this.patient}); + const AllDischargeSummary({ required this.patient}); @override _AllDischargeSummaryState createState() => _AllDischargeSummaryState(); @@ -27,7 +26,7 @@ class _AllDischargeSummaryState extends State { onModelReady: (model) { model.getAllDischargeSummary( patientId: widget.patient.patientId, - admissionNo: int.parse(widget.patient.admissionNo), + admissionNo: int.parse(widget.patient.admissionNo!), ); }, builder: (_, model, w) => AppScaffold( @@ -36,7 +35,7 @@ class _AllDischargeSummaryState extends State { body: // DrAppEmbeddedError(error: TranslationBase.of(context).noItem) model.allDisChargeSummaryList.isEmpty ? ErrorMessage( - error: TranslationBase.of(context).noDataAvailable) + error: TranslationBase.of(context).noDataAvailable!) : Column( children: [ Padding( 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 9af1493c..33572f93 100644 --- a/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart +++ b/lib/screens/patients/profile/discharge_summary/discharge_Summary_widget.dart @@ -17,7 +17,7 @@ class DischargeSummaryWidget extends StatefulWidget { final GetDischargeSummaryResModel dischargeSummary; bool isShowMore = false; - DischargeSummaryWidget({Key? key, this.dischargeSummary}); + DischargeSummaryWidget({Key? key, required this.dischargeSummary}); @override _DischargeSummaryWidgetState createState() => _DischargeSummaryWidgetState(); @@ -40,7 +40,7 @@ class _DischargeSummaryWidgetState extends State { borderRadius: BorderRadius.all( Radius.circular(10.0), ), - border: Border.all(color: Colors.grey[200], width: 0.5), + border: Border.all(color: Colors.grey[200]!, width: 0.5), ), child: Padding( padding: EdgeInsets.all(15.0), @@ -52,26 +52,26 @@ class _DischargeSummaryWidgetState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ CustomRow( - label: TranslationBase.of(context).doctorName + ": ", + label: TranslationBase.of(context).doctorName! + ": ", value: widget.dischargeSummary.createdByName.toString() ?? "".toString(), isCopyable: false, ), CustomRow( - label: TranslationBase.of(context).branch + ": ", + label: TranslationBase.of(context).branch! + ": ", value: widget.dischargeSummary.projectName.toString() ?? "".toString(), isCopyable: false, ), CustomRow( - label: TranslationBase.of(context).clinicName + ": ", + label: TranslationBase.of(context).clinicName! + ": ", value: widget.dischargeSummary.clinicName.toString() ?? "".toString(), isCopyable: false, ), CustomRow( - label: TranslationBase.of(context).dischargeDate + ": ", + label: TranslationBase.of(context).dischargeDate! + ": ", value: AppDateUtils.getDateTimeFromServerFormat( widget.dischargeSummary.createdOn) .day diff --git a/lib/screens/patients/profile/discharge_summary/discharge_summary.dart b/lib/screens/patients/profile/discharge_summary/discharge_summary.dart index ae321872..b5ab77a7 100644 --- a/lib/screens/patients/profile/discharge_summary/discharge_summary.dart +++ b/lib/screens/patients/profile/discharge_summary/discharge_summary.dart @@ -12,9 +12,8 @@ import 'all_discharge_summary.dart'; import 'pending_discharge_summary.dart'; class DischargeSummaryPage extends StatefulWidget { - final Function changeCurrentTab; - const DischargeSummaryPage({Key? key, this.changeCurrentTab}) + const DischargeSummaryPage({Key? key, }) : super(key: key); @override @@ -23,7 +22,7 @@ class DischargeSummaryPage extends StatefulWidget { class _DoctorReplyScreenState extends State with SingleTickerProviderStateMixin { - TabController _tabController; + late TabController _tabController; int _activeTab = 0; int pageIndex = 1; @@ -54,11 +53,10 @@ class _DoctorReplyScreenState extends State return WillPopScope( onWillPop: () async { - widget.changeCurrentTab(); return false; }, child: AppScaffold( - appBarTitle: TranslationBase.of(context).replay2, + appBarTitle: TranslationBase.of(context).replay2!, isShowAppBar: true, // appBarTitle: TranslationBase.of(context).progressNote, appBar: PatientProfileAppBar( @@ -103,7 +101,7 @@ class _DoctorReplyScreenState extends State tabWidget( screenSize, _activeTab == 1, - TranslationBase.of(context).all, + TranslationBase.of(context).all!, ), ], ), 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 d25f41a1..a99ce464 100644 --- a/lib/screens/patients/profile/discharge_summary/pending_discharge_summary.dart +++ b/lib/screens/patients/profile/discharge_summary/pending_discharge_summary.dart @@ -9,10 +9,9 @@ import 'package:flutter/material.dart'; import 'discharge_Summary_widget.dart'; class PendingDischargeSummary extends StatefulWidget { - final Function changeCurrentTab; final PatiantInformtion patient; - const PendingDischargeSummary({Key? key, this.changeCurrentTab, this.patient}) + const PendingDischargeSummary({Key? key, required this.patient}) : super(key: key); @override @@ -29,7 +28,7 @@ class _PendingDischargeSummaryState extends State { onModelReady: (model) { model.getPendingDischargeSummary( patientId: widget.patient.patientId, - admissionNo: int.parse(widget.patient.admissionNo), + admissionNo: int.parse(widget.patient.admissionNo!), ); }, builder: (_, model, w) => AppScaffold( @@ -38,7 +37,7 @@ class _PendingDischargeSummaryState extends State { body: model.pendingDischargeSummaryList.isEmpty ? ErrorMessage( error: TranslationBase.of(context) - .noDataAvailable) // DrAppEmbeddedError(error: TranslationBase.of(context).noItem!) + .noDataAvailable!) // DrAppEmbeddedError(error: TranslationBase.of(context).noItem!) : Column( children: [ Padding( diff --git a/lib/screens/patients/profile/lab_result/FlowChartPage.dart b/lib/screens/patients/profile/lab_result/FlowChartPage.dart index 3bf6929b..f0ee0404 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( - {this.patientLabOrder, this.filterName, this.patient, this.isInpatient}); + {required this.patientLabOrder, required this.filterName, required this.patient, required this.isInpatient}); @override Widget build(BuildContext context) { diff --git a/lib/screens/patients/profile/lab_result/LabResultHistoryPage.dart b/lib/screens/patients/profile/lab_result/LabResultHistoryPage.dart index 118bc476..4a23710f 100644 --- a/lib/screens/patients/profile/lab_result/LabResultHistoryPage.dart +++ b/lib/screens/patients/profile/lab_result/LabResultHistoryPage.dart @@ -14,7 +14,7 @@ class LabResultHistoryPage extends StatelessWidget { final String filterName; final PatiantInformtion patient; - LabResultHistoryPage({this.patientLabOrder, this.filterName, this.patient}); + LabResultHistoryPage({required this.patientLabOrder, required this.filterName, required this.patient}); // TODO mosa UI changes @override Widget build(BuildContext context) { diff --git a/lib/screens/patients/profile/lab_result/LabResultWidget.dart b/lib/screens/patients/profile/lab_result/LabResultWidget.dart index 67e50e53..df0eef1f 100644 --- a/lib/screens/patients/profile/lab_result/LabResultWidget.dart +++ b/lib/screens/patients/profile/lab_result/LabResultWidget.dart @@ -220,7 +220,7 @@ class LabResultWidget extends StatelessWidget { FadePage( page: FlowChartPage( filterName: - patientLabResultList[index].description, + patientLabResultList[index].description!, patientLabOrder: patientLabOrder, patient: patient, isInpatient: isInpatient, diff --git a/lib/screens/patients/profile/lab_result/Lab_Result_history_details_wideget.dart b/lib/screens/patients/profile/lab_result/Lab_Result_history_details_wideget.dart index 490d0ec4..aa28c4ed 100644 --- a/lib/screens/patients/profile/lab_result/Lab_Result_history_details_wideget.dart +++ b/lib/screens/patients/profile/lab_result/Lab_Result_history_details_wideget.dart @@ -12,7 +12,7 @@ class LabResultHistoryDetailsWidget extends StatefulWidget { final List labResultHistory; LabResultHistoryDetailsWidget({ - this.labResultHistory, + required this.labResultHistory, }); @override @@ -72,7 +72,7 @@ class _VitalSignDetailsWidgetState extends State ), Table( border: TableBorder.symmetric( - inside: BorderSide(width: 1.0, color: Colors.grey[300]), + inside: BorderSide(width: 1.0, color: Colors.grey[300]!), ), children: fullData(projectViewModel), ), diff --git a/lib/screens/patients/profile/lab_result/LineChartCurvedLabHistory.dart b/lib/screens/patients/profile/lab_result/LineChartCurvedLabHistory.dart index e0d0323b..606c75a2 100644 --- a/lib/screens/patients/profile/lab_result/LineChartCurvedLabHistory.dart +++ b/lib/screens/patients/profile/lab_result/LineChartCurvedLabHistory.dart @@ -9,14 +9,14 @@ class LineChartCurvedLabHistory extends StatefulWidget { final String title; final List labResultHistory; - LineChartCurvedLabHistory({this.title, this.labResultHistory}); + LineChartCurvedLabHistory({required this.title, required this.labResultHistory}); @override State createState() => LineChartCurvedLabHistoryState(); } class LineChartCurvedLabHistoryState extends State { - bool isShowingMainData; + late bool isShowingMainData; List xAxixs = []; int indexes = 0; 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 f18d89c8..c24d0677 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 @@ -21,12 +21,12 @@ class AllLabSpecialResult extends StatefulWidget { } class _AllLabSpecialResultState extends State { - String patientType; + late String patientType; - String arrivalType; - PatiantInformtion patient; - bool isInpatient; - bool isFromLiveCare; + late String arrivalType; + late PatiantInformtion patient; + late bool isInpatient; + late bool isFromLiveCare; @override void didChangeDependencies() { @@ -46,7 +46,7 @@ class _AllLabSpecialResultState extends State { ProjectViewModel projectViewModel = Provider.of(context); return BaseView( onModelReady: (model) => - model.getAllSpecialLabResult(patientId: patient.patientMRN), + model.getAllSpecialLabResult(patientId: patient!.patientMRN!), builder: (context, LabsViewModel model, widget) => AppScaffold( baseViewModel: model, backgroundColor: Colors.grey[100], @@ -71,9 +71,9 @@ class _AllLabSpecialResultState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ AppText( - TranslationBase.of(context).special + + TranslationBase.of(context).special! + " " + - TranslationBase.of(context).lab, + TranslationBase.of(context).lab!, style: "caption2", color: Colors.black, fontSize: 13, @@ -137,15 +137,15 @@ class _AllLabSpecialResultState extends State { model.allSpecialLabList[index] .isLiveCareAppointment ? TranslationBase.of(context) - .liveCare + .liveCare! .toUpperCase() : !model.allSpecialLabList[index] .isInOutPatient ? TranslationBase.of(context) - .inPatientLabel + .inPatientLabel! .toUpperCase() : TranslationBase.of(context) - .outpatient + .outpatient! .toUpperCase(), style: TextStyle(color: Colors.white), ), diff --git a/lib/screens/patients/profile/lab_result/lab_result_history_chart_and_detials.dart b/lib/screens/patients/profile/lab_result/lab_result_history_chart_and_detials.dart index 322eb817..fdf95b2c 100644 --- a/lib/screens/patients/profile/lab_result/lab_result_history_chart_and_detials.dart +++ b/lib/screens/patients/profile/lab_result/lab_result_history_chart_and_detials.dart @@ -9,9 +9,9 @@ import 'LineChartCurvedLabHistory.dart'; class LabResultHistoryChartAndDetails extends StatelessWidget { LabResultHistoryChartAndDetails({ - Key key, - @required this.labResultHistory, - @required this.name, + Key? key, + required this.labResultHistory, + required this.name, }) : super(key: key); final List labResultHistory; diff --git a/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart b/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart index 54d894b6..e84552ba 100644 --- a/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart @@ -151,7 +151,7 @@ class _LaboratoryResultWidgetState extends State { else if (widget.details == null) Container( child: ErrorMessage( - error: TranslationBase.of(context).noDataAvailable, + error: TranslationBase.of(context).noDataAvailable!, ), ), SizedBox( 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 9a20209a..e338635a 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, required this.resultData, required 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 3f35fd80..66c63024 100644 --- a/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart +++ b/lib/screens/patients/profile/medical_report/AddVerifyMedicalReport.dart @@ -15,20 +15,20 @@ import 'package:permission_handler/permission_handler.dart'; class AddVerifyMedicalReport extends StatefulWidget { final PatiantInformtion patient; - final String patientType; - final String arrivalType; - final MedicalReportModel medicalReport; + final String?patientType; + final String? arrivalType; + final MedicalReportModel? medicalReport; final PatientMedicalReportViewModel model; - final MedicalReportStatus status; - final String medicalNote; + final MedicalReportStatus? status; + final String? medicalNote; const AddVerifyMedicalReport( {Key? key, - this.patient, + required this.patient, this.patientType, this.arrivalType, this.medicalReport, - this.model, + required this.model, this.status, this.medicalNote}) : super(key: key); @@ -71,11 +71,11 @@ class _AddVerifyMedicalReportState extends State { HtmlRichEditor( initialText: (widget.medicalReport != null ? widget.medicalNote - : widget.model.medicalReportTemplate[0].templateText.length > 0 + : widget.model.medicalReportTemplate[0].templateText!.length > 0 ? widget.model.medicalReportTemplate[0].templateText : ""), hint: "Write the medical report ", - height: MediaQuery.of(context).size.height * 0.75, + height: MediaQuery.of(context).size.height * 0.75, controller: _controller, ), ], ), @@ -101,7 +101,7 @@ class _AddVerifyMedicalReportState extends State { // disabled: progressNoteController.text.isEmpty, fontWeight: FontWeight.w700, onPressed: () async { - txtOfMedicalReport = await HtmlEditor.getText(); + txtOfMedicalReport = await _controller.getText(); if (txtOfMedicalReport.isNotEmpty) { GifLoaderDialogUtils.showMyDialog(context); @@ -109,8 +109,8 @@ class _AddVerifyMedicalReportState extends State { ?await widget.model.updateMedicalReport( widget.patient, txtOfMedicalReport, - widget.medicalReport != null ? widget.medicalReport.lineItemNo : null, - widget.medicalReport != null ? widget.medicalReport.invoiceNo : null) + widget.medicalReport != null ? widget.medicalReport!.lineItemNo : null, + widget.medicalReport != null ? widget.medicalReport!.invoiceNo : null) : await widget.model.addMedicalReport(widget.patient, txtOfMedicalReport); //model.getMedicalReportList(patient); @@ -138,10 +138,10 @@ class _AddVerifyMedicalReportState extends State { color: Color(0xff359846), fontWeight: FontWeight.w700, onPressed: () async { - txtOfMedicalReport = await HtmlEditor.getText(); + txtOfMedicalReport = await _controller.getText(); if (txtOfMedicalReport.isNotEmpty) { GifLoaderDialogUtils.showMyDialog(context); - await widget.model.verifyMedicalReport(widget.patient, widget.medicalReport); + await widget.model.verifyMedicalReport(widget.patient, widget.medicalReport!); GifLoaderDialogUtils.hideDialog(context); Navigator.pop(context); if (widget.model.state == ViewState.ErrorLocal) { diff --git a/lib/screens/patients/profile/notes/note/progress_note_screen.dart b/lib/screens/patients/profile/notes/note/progress_note_screen.dart index 9fae26f4..f17688f5 100644 --- a/lib/screens/patients/profile/notes/note/progress_note_screen.dart +++ b/lib/screens/patients/profile/notes/note/progress_note_screen.dart @@ -87,7 +87,7 @@ class _ProgressNoteState extends State { body: model.patientProgressNoteList == null || model.patientProgressNoteList.length == 0 ? DrAppEmbeddedError( - error: TranslationBase.of(context).errorNoProgressNote) + error: TranslationBase.of(context).errorNoProgressNote!) : Container( color: Colors.grey[200], child: Column( @@ -113,8 +113,8 @@ class _ProgressNoteState extends State { ); }, label: widget.visitType == 3 - ? TranslationBase.of(context).addNewOrderSheet - : TranslationBase.of(context).addProgressNote, + ? TranslationBase.of(context).addNewOrderSheet! + : TranslationBase.of(context).addProgressNote!, ), Expanded( child: Container( @@ -129,7 +129,7 @@ class _ProgressNoteState extends State { .status == 1 && authenticationViewModel - .doctorProfile.doctorID != + .doctorProfile!.doctorID != model .patientProgressNoteList[ index] @@ -156,7 +156,7 @@ class _ProgressNoteState extends State { .status == 1 && authenticationViewModel - .doctorProfile.doctorID != + .doctorProfile!.doctorID != model .patientProgressNoteList[ index] @@ -201,7 +201,7 @@ class _ProgressNoteState extends State { .status != 4 && authenticationViewModel - .doctorProfile.doctorID == + .doctorProfile!.doctorID == model .patientProgressNoteList[ index] 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 09d5381f..6b608073 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 @@ -37,11 +37,11 @@ class NursingProgressNoteScreen extends StatefulWidget { } class _ProgressNoteState extends State { - List notesList; + late List notesList; var filteredNotesList; bool isDischargedPatient = false; - AuthenticationViewModel authenticationViewModel; - ProjectViewModel projectViewModel; + late AuthenticationViewModel authenticationViewModel; + late ProjectViewModel projectViewModel; getProgressNoteList(BuildContext context, PatientViewModel model, {bool isLocalBusy = false}) async { @@ -52,8 +52,8 @@ class _ProgressNoteState extends State { print(type); GetNursingProgressNoteRequestModel getNursingProgressNoteRequestModel = GetNursingProgressNoteRequestModel( - admissionNo: int.parse(patient.admissionNo), - patientTypeID: patient.patientType, + admissionNo: int.parse(patient!.admissionNo!), + patientTypeID: patient!.patientType!, patientID: patient.patientId, setupID: "010266"); model.getNursingProgressNote(getNursingProgressNoteRequestModel); } @@ -79,7 +79,7 @@ class _ProgressNoteState extends State { body: model.patientNursingProgressNoteList == null || model.patientNursingProgressNoteList.length == 0 ? DrAppEmbeddedError( - error: TranslationBase.of(context).errorNoProgressNote) + error: TranslationBase.of(context).errorNoProgressNote!) : Container( color: Colors.grey[200], child: Column( diff --git a/lib/screens/patients/profile/operation_report/operation_report.dart b/lib/screens/patients/profile/operation_report/operation_report.dart index 4bea5b1d..376f8dbb 100644 --- a/lib/screens/patients/profile/operation_report/operation_report.dart +++ b/lib/screens/patients/profile/operation_report/operation_report.dart @@ -31,7 +31,7 @@ import '../../../../widgets/shared/app_texts_widget.dart'; DrAppSharedPreferances sharedPref = new DrAppSharedPreferances(); class OperationReportScreen extends StatefulWidget { - final int visitType; + final int? visitType; const OperationReportScreen({Key? key, this.visitType}) : super(key: key); @@ -40,11 +40,11 @@ class OperationReportScreen extends StatefulWidget { } class _ProgressNoteState extends State { - List notesList; + late List notesList; var filteredNotesList; bool isDischargedPatient = false; - AuthenticationViewModel authenticationViewModel; - ProjectViewModel projectViewModel; + late AuthenticationViewModel authenticationViewModel; + late ProjectViewModel projectViewModel; @override Widget build(BuildContext context) { @@ -55,7 +55,7 @@ class _ProgressNoteState extends State { if (routeArgs.containsKey('isDischargedPatient')) isDischargedPatient = routeArgs['isDischargedPatient']; return BaseView( - onModelReady: (model) => model.getReservations(patient.patientMRN), + onModelReady: (model) => model.getReservations(patient!.patientMRN!), builder: (_, model, w) => AppScaffold( baseViewModel: model, backgroundColor: Theme.of(context).scaffoldBackgroundColor, @@ -71,7 +71,7 @@ class _ProgressNoteState extends State { model.reservationList == null || model.reservationList.length == 0 ? DrAppEmbeddedError( - error: TranslationBase.of(context).errorNoProgressNote) + error: TranslationBase.of(context).errorNoProgressNote!) : Expanded( child: Container( child: ListView.builder( 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 8148e2a9..6ff2b7de 100644 --- a/lib/screens/patients/profile/operation_report/update_operation_report.dart +++ b/lib/screens/patients/profile/operation_report/update_operation_report.dart @@ -36,16 +36,16 @@ class UpdateOperationReport extends StatefulWidget { final GetReservationsResponseModel reservation; // final OperationReportViewModel operationReportViewModel; final PatiantInformtion patient; - final int visitType; + final int? visitType; final bool isUpdate; const UpdateOperationReport( {Key? key, // this.operationReportViewModel, - this.patient, + required this.patient, this.visitType, - this.isUpdate, - this.reservation}) + required this.isUpdate, + required this.reservation}) : super(key: key); @override @@ -53,12 +53,12 @@ class UpdateOperationReport extends StatefulWidget { } class _UpdateOperationReportState extends State { - int selectedType; + late int selectedType; bool isSubmitted = false; stt.SpeechToText speech = stt.SpeechToText(); var reconizedWord; var event = RobotProvider(); - ProjectViewModel projectViewModel; + late ProjectViewModel projectViewModel; TextEditingController preOpDiagmosisController = TextEditingController(); TextEditingController postOpDiagmosisNoteController = TextEditingController(); @@ -135,7 +135,7 @@ class _UpdateOperationReportState extends State { baseViewModel: model, backgroundColor: Theme.of(context).scaffoldBackgroundColor, appBar: BottomSheetTitle( - title: TranslationBase.of(context).operationReports, + title: TranslationBase.of(context).operationReports!, ), body: SingleChildScrollView( child: Container( @@ -540,8 +540,8 @@ class _UpdateOperationReportState extends State { child: AppButton( title: (widget.isUpdate ? TranslationBase.of(context).noteUpdate - : TranslationBase.of(context).noteAdd) + - TranslationBase.of(context).operationReports, + : TranslationBase.of(context).noteAdd)! + + TranslationBase.of(context).operationReports!, color: Color(0xff359846), // disabled: operationReportsController.text.isEmpty, fontWeight: FontWeight.w700, @@ -590,9 +590,9 @@ class _UpdateOperationReportState extends State { bloodLossDetailController.text, patientID: widget.patient.patientId, admissionNo: - int.parse(widget.patient.admissionNo), + int.parse(widget.patient.admissionNo!), createdBy: model - .doctorProfile.doctorID, + .doctorProfile!.doctorID!, setupID: "010266"); await model .updateOperationReport( 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 d2c5139a..c69f3868 100644 --- a/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart +++ b/lib/screens/patients/profile/pending_orders/pending_orders_screen.dart @@ -9,11 +9,11 @@ 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) { - final routeArgs = ModalRoute.of(context)!.settings.arguments as Map; + final routeArgs = ModalRoute.of(context).settings.arguments as Map; PatiantInformtion patient = routeArgs['patient']; patient = routeArgs['patient']; String patientType = routeArgs['patientType']; @@ -24,73 +24,73 @@ class PendingOrdersScreen extends StatelessWidget { admissionNo: int.parse(patient.admissionNo)), builder: (BuildContext context, PendingOrdersViewModel model, Widget child) => - AppScaffold( - appBar: PatientProfileAppBar( - patient, - isInpatient: isInpatient, - ), - isShowAppBar: true, - baseViewModel: model, - appBarTitle: "Pending Orders", - body: model.pendingOrdersList == null || + AppScaffold( + appBar: PatientProfileAppBar( + patient, + isInpatient: isInpatient, + ), + isShowAppBar: true, + baseViewModel: model, + appBarTitle: "Pending Orders", + body: model.pendingOrdersList == null || model.pendingOrdersList.length == 0 - ? DrAppEmbeddedError( + ? DrAppEmbeddedError( error: TranslationBase.of(context).noDataAvailable) - : Column( - children: [ - Padding( - padding: const EdgeInsets.all(8.0), - child: Column( - children: [ - Row( - children: [ - AppText( - TranslationBase.of(context).pending, - fontSize: 15.0, - fontWeight: FontWeight.w600, - fontFamily: 'Poppins', - ), - ], - ), - Row( - children: [ - AppText( - TranslationBase.of(context).orders, - fontSize: 25.0, - fontWeight: FontWeight.w700, - ), - ], - ), - ], - ), + : Column( + children: [ + Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + children: [ + Row( + children: [ + AppText( + TranslationBase.of(context).pending, + fontSize: 15.0, + fontWeight: FontWeight.w600, + fontFamily: 'Poppins', + ), + ], + ), + Row( + children: [ + AppText( + TranslationBase.of(context).orders, + fontSize: 25.0, + fontWeight: FontWeight.w700, + ), + ], + ), + ], ), - Container( - child: ListView.builder( - scrollDirection: Axis.vertical, - shrinkWrap: true, - itemCount: model.pendingOrdersList.length, - itemBuilder: (BuildContext ctxt, int index) { - return Padding( - padding: EdgeInsets.all(8.0), - child: Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.all( - Radius.circular(10.0), - ), - border: Border.all( - color: Color(0xFF707070), width: 0.30), - ), - child: Padding( - padding: EdgeInsets.all(8.0), - child: AppText( - model.pendingOrdersList[index].notes), + ), + Container( + child: ListView.builder( + scrollDirection: Axis.vertical, + shrinkWrap: true, + itemCount: model.pendingOrdersList.length, + itemBuilder: (BuildContext ctxt, int index) { + return Padding( + padding: EdgeInsets.all(8.0), + child: Container( + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(10.0), ), + border: Border.all( + color: Color(0xFF707070), width: 0.30), ), - ); - })), - ], - ), - ), + child: Padding( + padding: EdgeInsets.all(8.0), + child: AppText( + model.pendingOrdersList[index].notes), + ), + ), + ); + })), + ], + ), + ), ); } } diff --git a/lib/screens/patients/register_patient/CustomEditableText.dart b/lib/screens/patients/register_patient/CustomEditableText.dart index 17405829..58713495 100644 --- a/lib/screens/patients/register_patient/CustomEditableText.dart +++ b/lib/screens/patients/register_patient/CustomEditableText.dart @@ -7,7 +7,7 @@ import 'package:flutter/material.dart'; class CustomEditableText extends StatefulWidget { CustomEditableText({ Key key, - @required this.controller, + required this.controller, this.hint, this.isEditable = false, this.isSubmitted, }) : super(key: key); diff --git a/lib/screens/patients/register_patient/VerifyMethodPage.dart b/lib/screens/patients/register_patient/VerifyMethodPage.dart index 8634e76e..f2d0646f 100644 --- a/lib/screens/patients/register_patient/VerifyMethodPage.dart +++ b/lib/screens/patients/register_patient/VerifyMethodPage.dart @@ -501,15 +501,15 @@ class _ActivationPageState extends State { counterText: " ", enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(10)), - borderSide: BorderSide(color: Colors.grey[300]), + borderSide: BorderSide(color: Colors.grey[300]!), ), focusedBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide(color: Colors.grey[300]), + borderSide: BorderSide(color: Colors.grey[300]!), ), errorBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(10.0)), - borderSide: BorderSide(color: Colors.grey[300]), + borderSide: BorderSide(color: Colors.grey[300]!), ), focusedErrorBorder: OutlineInputBorder( borderRadius: BorderRadius.all(Radius.circular(10.0)), diff --git a/lib/screens/procedures/base_add_procedure_tab_page.dart b/lib/screens/procedures/base_add_procedure_tab_page.dart index 8d6a42e3..10bbe773 100644 --- a/lib/screens/procedures/base_add_procedure_tab_page.dart +++ b/lib/screens/procedures/base_add_procedure_tab_page.dart @@ -21,7 +21,7 @@ class BaseAddProcedureTabPage extends StatefulWidget { final ProcedureType? procedureType; const BaseAddProcedureTabPage( - {Key? key, this.model, this.prescriptionModel, this.patient, @required this.procedureType}) + {Key? key, this.model, this.prescriptionModel, this.patient, required this.procedureType}) : super(key: key); @override