更新睡眠报告
This commit is contained in:
@@ -8,6 +8,7 @@ import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/component/tool/ClickableContainer.dart';
|
||||
import 'package:vbvs_app/pages/device_bind/componnet/bind_dialog.dart';
|
||||
import 'package:vbvs_app/pages/sleep_report/chart/SleepRadarChart.dart';
|
||||
import 'package:EasyDartModule/EasyDartModule.dart' as es;
|
||||
|
||||
class CompareSleepWidget extends StatefulWidget {
|
||||
var sleepReport;
|
||||
@@ -35,29 +36,15 @@ class _CompareSleepWidgetState extends State<CompareSleepWidget> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (widget.sleepReport == null ||
|
||||
try {
|
||||
if (widget.sleepReport == null ||
|
||||
widget.sleepReport['yc'] == null ||
|
||||
widget.sleepReport['yc'].isEmpty) {
|
||||
return Container();
|
||||
}
|
||||
List<Map<String, dynamic>> data = (widget.sleepReport['yc'] as List)
|
||||
.map((e) => e as Map<String, dynamic>)
|
||||
.toList();
|
||||
|
||||
// var today = {
|
||||
// "type1": 40.0,
|
||||
// "type2": 80.0,
|
||||
// "type3": 60.0,
|
||||
// "type4": 70.0,
|
||||
// "type5": 100.0
|
||||
// };
|
||||
// var yesterday = {
|
||||
// "type1": 40.0,
|
||||
// "type2": 90.0,
|
||||
// "type3": 50.0,
|
||||
// "type4": 70.0,
|
||||
// "type5": 30.0
|
||||
// };
|
||||
.toList();
|
||||
Map<String, double> today = {};
|
||||
Map<String, double> yesterday = {};
|
||||
|
||||
@@ -210,5 +197,10 @@ class _CompareSleepWidgetState extends State<CompareSleepWidget> {
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
} catch (e) {
|
||||
es.EasyDartModule.logger.error("打鼾监测绘制异常${e}");
|
||||
return Container();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user