fix lap result design issue

merge-requests/810/head
mosazaid 5 years ago
parent 632e930c6b
commit 2acad4e5dc

@ -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/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.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/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:doctor_app_flutter/widgets/shared/network_base_view.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -88,16 +89,20 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Container( child: Container(
margin: EdgeInsets.only(left: 10, right: 10), margin: EdgeInsets.only(
left: 10, right: 10),
child: AppText( child: AppText(
TranslationBase.of(context).generalResult, TranslationBase.of(context)
.generalResult,
bold: true, bold: true,
))), ))),
Container( Container(
width: 25, width: 25,
height: 25, height: 25,
child: Icon( child: Icon(
_isShowMoreGeneral ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, _isShowMoreGeneral
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down,
color: Colors.grey[800], color: Colors.grey[800],
size: 22, size: 22,
), ),
@ -128,8 +133,11 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
model.labResultLists.length, model.labResultLists.length,
(index) => LabResultWidget( (index) => LabResultWidget(
patientLabOrder: widget.patientLabOrder, patientLabOrder: widget.patientLabOrder,
filterName: model.labResultLists[index].filterName, filterName: model
patientLabResultList: model.labResultLists[index].patientLabResultList, .labResultLists[index].filterName,
patientLabResultList: model
.labResultLists[index]
.patientLabResultList,
patient: widget.patient, patient: widget.patient,
isInpatient: widget.isInpatient, isInpatient: widget.isInpatient,
), ),
@ -140,6 +148,12 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
), ),
], ],
), ),
)
else
Container(
child: ErrorMessage(
error: TranslationBase.of(context).noDataAvailable,
),
), ),
SizedBox( SizedBox(
height: 15, height: 15,
@ -166,16 +180,20 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Container( child: Container(
margin: EdgeInsets.only(left: 10, right: 10), margin: EdgeInsets.only(
left: 10, right: 10),
child: AppText( child: AppText(
TranslationBase.of(context).specialResult, TranslationBase.of(context)
.specialResult,
bold: true, bold: true,
))), ))),
Container( Container(
width: 25, width: 25,
height: 25, height: 25,
child: Icon( child: Icon(
_isShowMore ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down, _isShowMore
? Icons.keyboard_arrow_up
: Icons.keyboard_arrow_down,
color: Colors.grey[800], color: Colors.grey[800],
size: 22, size: 22,
), ),
@ -200,10 +218,14 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
width: double.infinity, width: double.infinity,
child: !Helpers.isTextHtml(widget.details) child: !Helpers.isTextHtml(widget.details)
? AppText( ? AppText(
widget.details ?? TranslationBase.of(context).noDataAvailable, widget.details ??
TranslationBase.of(context)
.noDataAvailable,
) )
: Html( : Html(
data: widget.details ?? TranslationBase.of(context).noDataAvailable, data: widget.details ??
TranslationBase.of(context)
.noDataAvailable,
), ),
), ),
), ),

Loading…
Cancel
Save