Skip to content

Commit be9f0a2

Browse files
committed
Clean up
1 parent aa9eec8 commit be9f0a2

12 files changed

Lines changed: 26 additions & 744 deletions

File tree

packages/health/example/.metadata

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ migration:
4141
#
4242
# Files that are not part of the templates will be ignored by default.
4343
unmanaged_files:
44-
- "lib/main.dart"
45-
- "ios/Runner.xcodeproj/project.pbxproj"
44+
- 'lib/main.dart'
45+
- 'ios/Runner.xcodeproj/project.pbxproj'

packages/health/example/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# example_new
1+
# health_example
22

3-
A new Flutter project.
3+
Demonstrates how to use the health plugin.
44

55
## Getting Started
66

77
This project is a starting point for a Flutter application.
88

99
A few resources to get you started if this is your first Flutter project:
1010

11-
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12-
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
11+
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12+
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
1313

14-
For help getting started with Flutter development, view the
15-
[online documentation](https://docs.flutter.dev/), which offers tutorials,
14+
For help getting started with Flutter, view our
15+
[online documentation](https://flutter.dev/docs), which offers tutorials,
1616
samples, guidance on mobile development, and a full API reference.

packages/health/example/analysis_options.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@ linter:
2323
rules:
2424
# avoid_print: false # Uncomment to disable the `avoid_print` rule
2525
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26+
2627
# Additional information about this file can be found at
2728
# https://dart.dev/guides/language/analysis-options

packages/health/example/android/app/build.gradle

Lines changed: 0 additions & 44 deletions
This file was deleted.

packages/health/example/android/app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@
8888
<action android:name="androidx.health.ACTION_SHOW_PERMISSIONS_RATIONALE" />
8989
</intent-filter>
9090
</activity>
91-
9291
<activity-alias
9392
android:name="ViewPermissionUsageActivity"
9493
android:exported="true"

packages/health/example/android/app/src/main/kotlin/cachet/plugins/health/health_example/MainActivity.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package cachet.plugins.health.health_example
22

3+
import android.os.Bundle
4+
35
import io.flutter.embedding.android.FlutterFragmentActivity
46

57
class MainActivity: FlutterFragmentActivity() {

packages/health/example/android/build.gradle

Lines changed: 0 additions & 18 deletions
This file was deleted.

packages/health/example/android/settings.gradle

Lines changed: 0 additions & 25 deletions
This file was deleted.

packages/health/example/lib/main.dart

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import 'dart:async';
22
import 'dart:io';
33

4-
import 'package:carp_serializable/carp_serializable.dart';
5-
import 'package:health_example/util.dart';
64
import 'package:flutter/material.dart';
75
import 'package:health/health.dart';
6+
import 'package:health_example/util.dart';
87
import 'package:permission_handler/permission_handler.dart';
8+
import 'package:carp_serializable/carp_serializable.dart';
99

1010
// Global Health instance
1111
final health = Health();
1212

13-
void main() => runApp(const HealthApp());
13+
void main() => runApp(HealthApp());
1414

1515
class HealthApp extends StatefulWidget {
1616
const HealthApp({super.key});
@@ -576,9 +576,8 @@ class HealthAppState extends State<HealthApp> {
576576
healthDataResponse.sort((a, b) => b.dateTo.compareTo(a.dateTo));
577577

578578
_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));
582581

583582
for (var data in _healthDataList) {
584583
debugPrint(toJsonString(data));
@@ -825,8 +824,7 @@ class HealthAppState extends State<HealthApp> {
825824
return ListTile(
826825
title: Text("${p.typeString}: ${p.value}"),
827826
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}'),
830828
onTap: () {
831829
fetchDataByUUID(
832830
context,

0 commit comments

Comments
 (0)