|
|
|
|
@ -1,8 +1,10 @@
|
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/model/labs/LabOrderResult.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/date-utils.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/Text.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
|
|
|
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
@ -25,21 +27,59 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
return Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
/* decoration: BoxDecoration(
|
|
|
|
|
color: Colors.transparent,
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
topLeft: Radius.circular(10.0), topRight: Radius.circular(10.0)),
|
|
|
|
|
border: Border.all(color: Colors.grey, width: 1),
|
|
|
|
|
),
|
|
|
|
|
margin: EdgeInsets.all(20),
|
|
|
|
|
),*/
|
|
|
|
|
margin: EdgeInsets.all(0),
|
|
|
|
|
child: Container(
|
|
|
|
|
color: Colors.transparent,
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.all(8),
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).date,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.6,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
backGroundcolor: Colors.black,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.all(8),
|
|
|
|
|
child: Container(
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).labResult,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.6,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
backGroundcolor: Colors.black,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
),
|
|
|
|
|
// height: 60
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
const Divider(
|
|
|
|
|
height: 1,
|
|
|
|
|
thickness: 1,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
),
|
|
|
|
|
Table(
|
|
|
|
|
border: TableBorder.symmetric(
|
|
|
|
|
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
|
|
|
|
|
inside: BorderSide(width: 1.0, color: Colors.grey[300]),
|
|
|
|
|
),
|
|
|
|
|
children: fullData(projectViewModel),
|
|
|
|
|
),
|
|
|
|
|
@ -51,64 +91,32 @@ class _VitalSignDetailsWidgetState extends State<LabResultDetailsWidget> {
|
|
|
|
|
|
|
|
|
|
List<TableRow> fullData(ProjectViewModel projectViewModel) {
|
|
|
|
|
List<TableRow> tableRow = [];
|
|
|
|
|
tableRow.add(TableRow(children: [
|
|
|
|
|
Container(
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Theme.of(context).primaryColor,
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
topLeft: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
|
|
|
|
|
topRight: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Texts(
|
|
|
|
|
TranslationBase.of(context).date,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
height: 60,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Theme.of(context).primaryColor,
|
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
|
topRight: projectViewModel.isArabic? Radius.circular(0.0):Radius.circular(10.0),
|
|
|
|
|
topLeft: projectViewModel.isArabic? Radius.circular(10.0):Radius.circular(0.0),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Texts(TranslationBase.of(context).labResult, color: Colors.white),
|
|
|
|
|
),
|
|
|
|
|
height: 60),
|
|
|
|
|
)
|
|
|
|
|
]));
|
|
|
|
|
widget.labResult.forEach((vital) {
|
|
|
|
|
var date = DateUtils.convertStringToDate(vital.verifiedOnDateTime);
|
|
|
|
|
tableRow.add(TableRow(children: [
|
|
|
|
|
Container(
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
padding: EdgeInsets.all(8),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Texts(
|
|
|
|
|
'${projectViewModel.isArabic? DateUtils.getWeekDayArabic(date.weekday): DateUtils.getWeekDay(date.weekday)} ,${date.day} ${projectViewModel.isArabic? DateUtils.getMonthArabic(date.month) : DateUtils.getMonth(date.month)} ${date.year}',
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
child: AppText(
|
|
|
|
|
'${projectViewModel.isArabic? DateUtils.getWeekDayArabic(date.weekday): DateUtils.getWeekDay(date.weekday)} ,${date.day} ${projectViewModel.isArabic? DateUtils.getMonthArabic(date.month) : DateUtils.getMonth(date.month)} ${date.year}',
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
backGroundcolor: Colors.black,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
padding: EdgeInsets.all(8),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Texts(
|
|
|
|
|
'${vital.resultValue}',
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
child: AppText(
|
|
|
|
|
'${vital.resultValue}',
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
backGroundcolor: Colors.black,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|