|
|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
import 'package:doctor_app_flutter/config/size_config.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-data.dart';
|
|
|
|
|
import 'package:doctor_app_flutter/models/patient/vital_sign/patient-vital-sign-history.dart';
|
|
|
|
|
@ -17,7 +18,13 @@ class VitalSignBloodPressureWidget extends StatefulWidget {
|
|
|
|
|
final String viewKey2;
|
|
|
|
|
|
|
|
|
|
VitalSignBloodPressureWidget(
|
|
|
|
|
{Key key, this.vitalList, this.title1, this.title2, this.viewKey1, this.title3, this.viewKey2});
|
|
|
|
|
{Key key,
|
|
|
|
|
this.vitalList,
|
|
|
|
|
this.title1,
|
|
|
|
|
this.title2,
|
|
|
|
|
this.viewKey1,
|
|
|
|
|
this.title3,
|
|
|
|
|
this.viewKey2});
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
_VitalSignDetailsWidgetState createState() => _VitalSignDetailsWidgetState();
|
|
|
|
|
@ -28,62 +35,108 @@ class _VitalSignDetailsWidgetState extends State<VitalSignBloodPressureWidget> {
|
|
|
|
|
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>[
|
|
|
|
|
Table(
|
|
|
|
|
border: TableBorder.symmetric(
|
|
|
|
|
inside: BorderSide(width: 2.0, color: Colors.grey[300]),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.all(8),
|
|
|
|
|
/*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)
|
|
|
|
|
),
|
|
|
|
|
children: fullData(projectViewModel),
|
|
|
|
|
),*/
|
|
|
|
|
child: AppText(
|
|
|
|
|
TranslationBase.of(context).date,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
backGroundcolor: Colors.black,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
// height: 60,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<TableRow> fullData(ProjectViewModel projectViewModel) {
|
|
|
|
|
List<TableRow> tableRow = [];
|
|
|
|
|
tableRow.add(TableRow(children: [
|
|
|
|
|
Container(
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
padding: EdgeInsets.all(8),
|
|
|
|
|
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)
|
|
|
|
|
),
|
|
|
|
|
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: AppText(
|
|
|
|
|
TranslationBase.of(context).date,
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
widget.title2,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
backGroundcolor: Colors.black,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
),
|
|
|
|
|
// height: 60
|
|
|
|
|
),
|
|
|
|
|
height: 60,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
padding: EdgeInsets.all(8),
|
|
|
|
|
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: AppText(widget.title2, color: Colors.white),
|
|
|
|
|
),*/
|
|
|
|
|
child: AppText(
|
|
|
|
|
widget.title3,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 2.0,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
backGroundcolor: Colors.black,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
),
|
|
|
|
|
// height: 60
|
|
|
|
|
),
|
|
|
|
|
height: 60),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
const Divider(
|
|
|
|
|
height: 1,
|
|
|
|
|
thickness: 1,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
),
|
|
|
|
|
Table(
|
|
|
|
|
border: TableBorder.symmetric(
|
|
|
|
|
inside: BorderSide(width: 1.0, color: Colors.grey[300]),
|
|
|
|
|
),
|
|
|
|
|
children: fullData(projectViewModel),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<TableRow> fullData(ProjectViewModel projectViewModel) {
|
|
|
|
|
List<TableRow> tableRow = [];
|
|
|
|
|
/* tableRow.add(TableRow(children: [
|
|
|
|
|
Container(
|
|
|
|
|
child: Container(
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
@ -98,7 +151,7 @@ class _VitalSignDetailsWidgetState extends State<VitalSignBloodPressureWidget> {
|
|
|
|
|
),
|
|
|
|
|
height: 60),
|
|
|
|
|
),
|
|
|
|
|
]));
|
|
|
|
|
]));*/
|
|
|
|
|
widget.vitalList.forEach((vital) {
|
|
|
|
|
var data = vital.toJson()[widget.viewKey1];
|
|
|
|
|
DateTime elementDate =
|
|
|
|
|
@ -109,11 +162,13 @@ class _VitalSignDetailsWidgetState extends State<VitalSignBloodPressureWidget> {
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: AppText(
|
|
|
|
|
'${projectViewModel.isArabic ? DateUtils.getWeekDayArabic(elementDate.weekday) : DateUtils.getWeekDay(elementDate.weekday)}, ${elementDate.day} ${projectViewModel.isArabic ? DateUtils.getMonthArabic(elementDate.month) : DateUtils.getMonth(elementDate.month)}, ${elementDate.year} ',
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
backGroundcolor: Colors.black,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -121,11 +176,13 @@ class _VitalSignDetailsWidgetState extends State<VitalSignBloodPressureWidget> {
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: AppText(
|
|
|
|
|
'${vital.toJson()[widget.viewKey1]}',
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
backGroundcolor: Colors.black,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -133,11 +190,13 @@ class _VitalSignDetailsWidgetState extends State<VitalSignBloodPressureWidget> {
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
child: Center(
|
|
|
|
|
child: AppText(
|
|
|
|
|
'${vital.toJson()[widget.viewKey2]}',
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
|
fontSize: SizeConfig.textMultiplier * 1.8,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
backGroundcolor: Colors.black,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|