From 2acad4e5dce54d0d0f1ff6af705c00b84dc21068 Mon Sep 17 00:00:00 2001 From: mosazaid Date: Mon, 30 Aug 2021 14:52:40 +0300 Subject: [PATCH] fix lap result design issue --- .../lab_result/laboratory_result_widget.dart | 42 ++++++++++++++----- 1 file changed, 32 insertions(+), 10 deletions(-) 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 5130f7ab..ff6752ff 100644 --- a/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart +++ b/lib/screens/patients/profile/lab_result/laboratory_result_widget.dart @@ -7,6 +7,7 @@ import 'package:doctor_app_flutter/screens/patients/profile/lab_result/LabResult import 'package:doctor_app_flutter/util/helpers.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart'; +import 'package:doctor_app_flutter/widgets/shared/errors/error_message.dart'; import 'package:doctor_app_flutter/widgets/shared/network_base_view.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -88,16 +89,20 @@ 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, ), @@ -128,8 +133,11 @@ 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, ), @@ -140,6 +148,12 @@ class _LaboratoryResultWidgetState extends State { ), ], ), + ) + else + Container( + child: ErrorMessage( + error: TranslationBase.of(context).noDataAvailable, + ), ), SizedBox( height: 15, @@ -166,16 +180,20 @@ 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, ), @@ -200,10 +218,14 @@ 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, ), ), ),