|
|
|
@ -1,7 +1,6 @@
|
|
|
|
import "package:collection/collection.dart";
|
|
|
|
import "package:collection/collection.dart";
|
|
|
|
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/model/my_trakers/blood_sugar/DiabtecPatientResult.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/medical/blood_sugar_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/medical/blood_sugar_view_model.dart';
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/MonthLineChartCurved.dart';
|
|
|
|
import 'package:diplomaticquarterapp/pages/medical/my_trackers/widget/MonthLineChartCurved.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
@ -11,7 +10,6 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class BloodMonthlyPage extends StatelessWidget {
|
|
|
|
class BloodMonthlyPage extends StatelessWidget {
|
|
|
|
final List<DiabtecPatientResult> diabtecPatientResult;
|
|
|
|
final List<DiabtecPatientResult> diabtecPatientResult;
|
|
|
|
@ -24,10 +22,8 @@ class BloodMonthlyPage extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
|
|
|
groupData();
|
|
|
|
groupData();
|
|
|
|
return AppScaffold(
|
|
|
|
return AppScaffold(
|
|
|
|
// baseViewModel: bloodSugarViewMode,
|
|
|
|
|
|
|
|
body: ListView(
|
|
|
|
body: ListView(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
@ -69,7 +65,7 @@ class BloodMonthlyPage extends StatelessWidget {
|
|
|
|
0: FlexColumnWidth(1.8),
|
|
|
|
0: FlexColumnWidth(1.8),
|
|
|
|
2: FlexColumnWidth(1.8),
|
|
|
|
2: FlexColumnWidth(1.8),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
children: fullData(context, projectViewModel, monthly[1]),
|
|
|
|
children: fullData(context, monthly[1]),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
])
|
|
|
|
])
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
@ -79,7 +75,7 @@ class BloodMonthlyPage extends StatelessWidget {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
List<TableRow> fullData(BuildContext context, ProjectViewModel projectViewModel, e) {
|
|
|
|
List<TableRow> fullData(BuildContext context, e) {
|
|
|
|
List<TableRow> tableRow = [];
|
|
|
|
List<TableRow> tableRow = [];
|
|
|
|
tableRow.add(
|
|
|
|
tableRow.add(
|
|
|
|
TableRow(
|
|
|
|
TableRow(
|
|
|
|
@ -88,71 +84,6 @@ class BloodMonthlyPage extends StatelessWidget {
|
|
|
|
Utils.tableColumnTitle(TranslationBase.of(context).time),
|
|
|
|
Utils.tableColumnTitle(TranslationBase.of(context).time),
|
|
|
|
Utils.tableColumnTitle(TranslationBase.of(context).measured),
|
|
|
|
Utils.tableColumnTitle(TranslationBase.of(context).measured),
|
|
|
|
Utils.tableColumnTitle(TranslationBase.of(context).value),
|
|
|
|
Utils.tableColumnTitle(TranslationBase.of(context).value),
|
|
|
|
// 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,
|
|
|
|
|
|
|
|
// fontSize: 15,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// height: 40,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// child: Container(
|
|
|
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
|
|
|
// color: Theme.of(context).primaryColor,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// child: Center(
|
|
|
|
|
|
|
|
// child: Texts(
|
|
|
|
|
|
|
|
// TranslationBase.of(context).time,
|
|
|
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
|
|
|
// fontSize: 15,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// height: 40),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// child: Container(
|
|
|
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
|
|
|
// color: Theme.of(context).primaryColor,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// child: Center(
|
|
|
|
|
|
|
|
// child: Texts(
|
|
|
|
|
|
|
|
// TranslationBase.of(context).measured,
|
|
|
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
|
|
|
// fontSize: 15,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// height: 40),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// child: Container(
|
|
|
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
|
|
|
// color: Theme.of(context).primaryColor,
|
|
|
|
|
|
|
|
// borderRadius: BorderRadius.only(
|
|
|
|
|
|
|
|
// topLeft: projectViewModel.isArabic ? Radius.circular(10.0) : Radius.circular(0.0),
|
|
|
|
|
|
|
|
// topRight: projectViewModel.isArabic ? Radius.circular(0.0) : Radius.circular(10.0),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// child: Center(
|
|
|
|
|
|
|
|
// child: Texts(
|
|
|
|
|
|
|
|
// TranslationBase.of(context).value,
|
|
|
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
|
|
|
// fontSize: 15,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// height: 40),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -161,67 +92,10 @@ class BloodMonthlyPage extends StatelessWidget {
|
|
|
|
tableRow.add(
|
|
|
|
tableRow.add(
|
|
|
|
TableRow(
|
|
|
|
TableRow(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Utils.tableColumnValue(projectViewModel.isArabic ? DateUtil.getMonthDayYearDateFormattedAr(diabtec.dateChart) : DateUtil.getMonthDayYearDateFormatted(diabtec.dateChart),
|
|
|
|
Utils.tableColumnValue(DateUtil.getDayMonthYearDateFormatted(diabtec.dateChart), isCapitable: false),
|
|
|
|
isCapitable: false),
|
|
|
|
|
|
|
|
Utils.tableColumnValue(diabtec.dateChart.hour.toString() + ':' + diabtec.dateChart.minute.toString(), isCapitable: false),
|
|
|
|
Utils.tableColumnValue(diabtec.dateChart.hour.toString() + ':' + diabtec.dateChart.minute.toString(), isCapitable: false),
|
|
|
|
Utils.tableColumnValue(diabtec.measuredDesc, isCapitable: false),
|
|
|
|
Utils.tableColumnValue(diabtec.measuredDesc, isCapitable: false),
|
|
|
|
Utils.tableColumnValue(diabtec.resultValue.toString(), isCapitable: false),
|
|
|
|
Utils.tableColumnValue(diabtec.resultValue.toString(), isCapitable: false),
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// child: Container(
|
|
|
|
|
|
|
|
// height: 70,
|
|
|
|
|
|
|
|
// padding: EdgeInsets.all(10),
|
|
|
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
|
|
|
// child: Center(
|
|
|
|
|
|
|
|
// child: Texts(
|
|
|
|
|
|
|
|
// '${projectViewModel.isArabic ? DateUtil.getMonthDayYearDateFormattedAr(diabtec.dateChart) : DateUtil.getMonthDayYearDateFormatted(diabtec.dateChart)} ',
|
|
|
|
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
|
|
|
|
// fontSize: 12,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// child: Container(
|
|
|
|
|
|
|
|
// height: 70,
|
|
|
|
|
|
|
|
// padding: EdgeInsets.all(10),
|
|
|
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
|
|
|
// child: Center(
|
|
|
|
|
|
|
|
// child: Texts(
|
|
|
|
|
|
|
|
// '${diabtec.dateChart.hour}:${diabtec.dateChart.minute}',
|
|
|
|
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
|
|
|
|
// fontSize: 12,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// child: Container(
|
|
|
|
|
|
|
|
// height: 70,
|
|
|
|
|
|
|
|
// padding: EdgeInsets.all(10),
|
|
|
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
|
|
|
// child: Center(
|
|
|
|
|
|
|
|
// child: Texts(
|
|
|
|
|
|
|
|
// '${diabtec.measuredDesc}',
|
|
|
|
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
|
|
|
|
// fontSize: 12,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// Container(
|
|
|
|
|
|
|
|
// child: Container(
|
|
|
|
|
|
|
|
// height: 70,
|
|
|
|
|
|
|
|
// padding: EdgeInsets.all(10),
|
|
|
|
|
|
|
|
// color: Colors.white,
|
|
|
|
|
|
|
|
// child: Center(
|
|
|
|
|
|
|
|
// child: Texts(
|
|
|
|
|
|
|
|
// '${diabtec.resultValue}',
|
|
|
|
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
|
|
|
|
// fontSize: 12,
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ),
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|