|
1 | 1 | import 'dart:async'; |
2 | 2 | import 'dart:io'; |
3 | 3 |
|
4 | | -import 'package:carp_serializable/carp_serializable.dart'; |
5 | | -import 'package:health_example/util.dart'; |
6 | 4 | import 'package:flutter/material.dart'; |
7 | 5 | import 'package:health/health.dart'; |
| 6 | +import 'package:health_example/util.dart'; |
8 | 7 | import 'package:permission_handler/permission_handler.dart'; |
| 8 | +import 'package:carp_serializable/carp_serializable.dart'; |
9 | 9 |
|
10 | 10 | // Global Health instance |
11 | 11 | final health = Health(); |
12 | 12 |
|
13 | | -void main() => runApp(const HealthApp()); |
| 13 | +void main() => runApp(HealthApp()); |
14 | 14 |
|
15 | 15 | class HealthApp extends StatefulWidget { |
16 | 16 | const HealthApp({super.key}); |
@@ -576,9 +576,8 @@ class HealthAppState extends State<HealthApp> { |
576 | 576 | healthDataResponse.sort((a, b) => b.dateTo.compareTo(a.dateTo)); |
577 | 577 |
|
578 | 578 | _healthDataList.clear(); |
579 | | - _healthDataList.addAll((healthDataResponse.length < 100) |
580 | | - ? healthDataResponse |
581 | | - : healthDataResponse.sublist(0, 100)); |
| 579 | + _healthDataList.addAll( |
| 580 | + (healthDataResponse.length < 100) ? healthDataResponse : healthDataResponse.sublist(0, 100)); |
582 | 581 |
|
583 | 582 | for (var data in _healthDataList) { |
584 | 583 | debugPrint(toJsonString(data)); |
@@ -825,8 +824,7 @@ class HealthAppState extends State<HealthApp> { |
825 | 824 | return ListTile( |
826 | 825 | title: Text("${p.typeString}: ${p.value}"), |
827 | 826 | trailing: Text(p.unitString), |
828 | | - subtitle: |
829 | | - Text('${p.dateFrom} - ${p.dateTo}\n${p.recordingMethod}'), |
| 827 | + subtitle: Text('${p.dateFrom} - ${p.dateTo}\n${p.recordingMethod}'), |
830 | 828 | onTap: () { |
831 | 829 | fetchDataByUUID( |
832 | 830 | context, |
|
0 commit comments