|
|
|
@ -11,6 +11,7 @@ import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.d
|
|
|
|
|
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/network_base_view.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter_html/flutter_html.dart';
|
|
|
|
@ -20,6 +21,7 @@ import 'package:provider/provider.dart';
|
|
|
|
|
import 'package:rating_bar/rating_bar.dart';
|
|
|
|
|
|
|
|
|
|
import '../../text.dart';
|
|
|
|
|
import 'FlowChartPage.dart';
|
|
|
|
|
import 'LabResultWidget.dart';
|
|
|
|
|
|
|
|
|
|
class LaboratoryResultWidget extends StatefulWidget {
|
|
|
|
@ -44,14 +46,14 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
projectViewModel = Provider.of(context);
|
|
|
|
|
return BaseView<LabsViewModel>(
|
|
|
|
|
// onModelReady: (model) => model.getPatientLabResult(patientLabOrder: widget.patientLabOrder),
|
|
|
|
|
onModelReady: (model) => model.getPatientLabResult(patientLabOrder: widget.patientLabOrder),
|
|
|
|
|
builder: (_, model, w) => NetworkBaseView(
|
|
|
|
|
baseViewModel: model,
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
DoctorHeader(
|
|
|
|
|
headerModel: new HeaderModel(
|
|
|
|
|
headerModel: HeaderModel(
|
|
|
|
|
widget.patientLabOrder.doctorName,
|
|
|
|
|
widget.patientLabOrder.doctorImageURL,
|
|
|
|
|
widget.patientLabOrder.speciality,
|
|
|
|
@ -78,7 +80,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.only(left: 17, top: 14, right: 13, bottom: 10),
|
|
|
|
|
padding: EdgeInsets.only(left: 17, top: 12, right: 13, bottom: 12),
|
|
|
|
|
margin: EdgeInsets.only(left: 21, right: 21, top: 12),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
@ -95,41 +97,27 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(child: Texts(TranslationBase.of(context).generalResult)),
|
|
|
|
|
Container(
|
|
|
|
|
width: 25,
|
|
|
|
|
height: 25,
|
|
|
|
|
decoration: BoxDecoration(shape: BoxShape.circle, color: Theme.of(context).primaryColor),
|
|
|
|
|
child: Icon(
|
|
|
|
|
_isShowMoreGeneral ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
size: 22,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (_isShowMoreGeneral)
|
|
|
|
|
AnimatedContainer(
|
|
|
|
|
padding: EdgeInsets.all(10.0),
|
|
|
|
|
margin: EdgeInsets.only(left: 5, right: 5),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
bottomLeft: Radius.circular(5.0),
|
|
|
|
|
bottomRight: Radius.circular(5.0),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
duration: Duration(milliseconds: 7000),
|
|
|
|
|
child: Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context).generalResult,
|
|
|
|
|
style: TextStyle(fontSize: 16, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Icon(
|
|
|
|
|
_isShowMoreGeneral ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down,
|
|
|
|
|
color: Color(0xff575757),
|
|
|
|
|
size: 22,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
if (_isShowMoreGeneral)
|
|
|
|
|
...List.generate(
|
|
|
|
|
model.labResultLists.length,
|
|
|
|
|
(index) => LabResultWidget(
|
|
|
|
@ -138,10 +126,10 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
|
|
|
|
|
patientLabResultList: model.labResultLists[index].patientLabResultList,
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -169,41 +157,34 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(child: Texts(TranslationBase.of(context).specialResult)),
|
|
|
|
|
Container(
|
|
|
|
|
width: 25,
|
|
|
|
|
height: 25,
|
|
|
|
|
decoration: BoxDecoration(shape: BoxShape.circle, color: Theme.of(context).primaryColor),
|
|
|
|
|
child: Icon(
|
|
|
|
|
_isShowMore ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
size: 22,
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context).specialResult,
|
|
|
|
|
style: TextStyle(fontSize: 16, fontFamily: "Poppins", fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Icon(
|
|
|
|
|
_isShowMore ? Icons.keyboard_arrow_up : Icons.keyboard_arrow_down,
|
|
|
|
|
color: Color(0xff575757),
|
|
|
|
|
size: 22,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
if (_isShowMore)
|
|
|
|
|
Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Html(
|
|
|
|
|
data: widget.details ?? TranslationBase.of(context).noDataAvailable,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (_isShowMore)
|
|
|
|
|
AnimatedContainer(
|
|
|
|
|
padding: EdgeInsets.all(10.0),
|
|
|
|
|
margin: EdgeInsets.only(left: 5, right: 5),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
shape: BoxShape.rectangle,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
bottomLeft: Radius.circular(5.0),
|
|
|
|
|
bottomRight: Radius.circular(5.0),
|
|
|
|
|
)),
|
|
|
|
|
duration: Duration(milliseconds: 7000),
|
|
|
|
|
child: Container(
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
child: Html(
|
|
|
|
|
data: widget.details ?? TranslationBase.of(context).noDataAvailable,
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|