From 05355662327c50c9994f6d5a27ea15d62ee6ecee Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Mon, 23 Aug 2021 16:31:38 +0300 Subject: [PATCH] lab result & railogy fix --- .../profile/lab_result/LabResultWidget.dart | 63 +++++++++---------- .../lab_result/laboratory_result_widget.dart | 35 +++-------- 2 files changed, 38 insertions(+), 60 deletions(-) diff --git a/lib/screens/patients/profile/lab_result/LabResultWidget.dart b/lib/screens/patients/profile/lab_result/LabResultWidget.dart index 0d059000..81b61c42 100644 --- a/lib/screens/patients/profile/lab_result/LabResultWidget.dart +++ b/lib/screens/patients/profile/lab_result/LabResultWidget.dart @@ -18,12 +18,7 @@ class LabResultWidget extends StatelessWidget { final bool isInpatient; LabResultWidget( - {Key key, - this.filterName, - this.patientLabResultList, - this.patientLabOrder, - this.patient, - this.isInpatient}) + {Key key, this.filterName, this.patientLabResultList, this.patientLabOrder, this.patient, this.isInpatient}) : super(key: key); ProjectViewModel projectViewModel; @@ -37,32 +32,32 @@ class LabResultWidget extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ // if (!isInpatient) - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - AppText(filterName), - InkWell( - onTap: () { - Navigator.push( - context, - FadePage( - page: FlowChartPage( - filterName: filterName, - patientLabOrder: patientLabOrder, - patient: patient, - isInpatient: isInpatient, - ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + AppText(filterName), + InkWell( + onTap: () { + Navigator.push( + context, + FadePage( + page: FlowChartPage( + filterName: filterName, + patientLabOrder: patientLabOrder, + patient: patient, + isInpatient: isInpatient, ), - ); - }, - child: AppText( - TranslationBase.of(context).showMoreBtn, - textDecoration: TextDecoration.underline, - color: Colors.blue, - ), + ), + ); + }, + child: AppText( + TranslationBase.of(context).showMoreBtn, + textDecoration: TextDecoration.underline, + color: Colors.blue, ), - ], - ), + ), + ], + ), Row( children: [ Expanded( @@ -122,8 +117,7 @@ class LabResultWidget extends StatelessWidget { color: Colors.white, child: Center( child: AppText( - '${patientLabResultList[index].testCode}\n' + - patientLabResultList[index].description, + '${patientLabResultList[index].testCode}\n' + patientLabResultList[index].description, textAlign: TextAlign.center, ), ), @@ -135,9 +129,8 @@ class LabResultWidget extends StatelessWidget { color: Colors.white, child: Center( child: AppText( - patientLabResultList[index].resultValue ??""+ - " " + - "${patientLabResultList[index].uOM ?? ""}", + patientLabResultList[index].resultValue ?? + "" + " " + "${patientLabResultList[index].uOM ?? ""}", textAlign: TextAlign.center, ), ), 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 08c247ee..5130f7ab 100644 --- a/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart @@ -88,20 +88,16 @@ class _LaboratoryResultWidgetState extends State { children: [ Expanded( child: Container( - margin: EdgeInsets.only( - left: 10, right: 10), + margin: EdgeInsets.only(left: 10, right: 10), child: AppText( - TranslationBase.of(context) - .generalResult, + TranslationBase.of(context).generalResult, bold: true, ))), Container( width: 25, height: 25, child: Icon( - _isShowMoreGeneral - ? Icons.keyboard_arrow_up - : Icons.keyboard_arrow_down, + _isShowMoreGeneral ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, color: Colors.grey[800], size: 22, ), @@ -132,11 +128,8 @@ class _LaboratoryResultWidgetState extends State { model.labResultLists.length, (index) => LabResultWidget( patientLabOrder: widget.patientLabOrder, - filterName: model - .labResultLists[index].filterName, - patientLabResultList: model - .labResultLists[index] - .patientLabResultList, + filterName: model.labResultLists[index].filterName, + patientLabResultList: model.labResultLists[index].patientLabResultList, patient: widget.patient, isInpatient: widget.isInpatient, ), @@ -173,20 +166,16 @@ class _LaboratoryResultWidgetState extends State { children: [ Expanded( child: Container( - margin: EdgeInsets.only( - left: 10, right: 10), + margin: EdgeInsets.only(left: 10, right: 10), child: AppText( - TranslationBase.of(context) - .specialResult, + TranslationBase.of(context).specialResult, bold: true, ))), Container( width: 25, height: 25, child: Icon( - _isShowMore - ? Icons.keyboard_arrow_up - : Icons.keyboard_arrow_down, + _isShowMore ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, color: Colors.grey[800], size: 22, ), @@ -211,14 +200,10 @@ class _LaboratoryResultWidgetState extends State { width: double.infinity, child: !Helpers.isTextHtml(widget.details) ? AppText( - widget.details ?? - TranslationBase.of(context) - .noDataAvailable, + widget.details ?? TranslationBase.of(context).noDataAvailable, ) : Html( - data: widget.details ?? - TranslationBase.of(context) - .noDataAvailable, + data: widget.details ?? TranslationBase.of(context).noDataAvailable, ), ), ),