From 780fa11e83740fa992a7d32e8eb537c90e4124e7 Mon Sep 17 00:00:00 2001
From: Alireza Hajebrahimi <6937697+iarata@users.noreply.github.com>
Date: Wed, 4 Feb 2026 14:58:08 +0100
Subject: [PATCH] Health package moved to its own repo
---
packages/health/.metadata | 10 -
packages/health/CHANGELOG.md | 470 -----
packages/health/LICENSE | 9 -
packages/health/README.md | 550 ------
packages/health/analysis_options.yaml | 19 -
packages/health/android/build.gradle | 61 -
packages/health/android/gradle.properties | 3 -
.../gradle/wrapper/gradle-wrapper.properties | 6 -
packages/health/android/settings.gradle | 1 -
.../android/src/main/AndroidManifest.xml | 2 -
.../cachet/plugins/health/HealthConstants.kt | 241 ---
.../plugins/health/HealthDataConverter.kt | 258 ---
.../plugins/health/HealthDataOperations.kt | 332 ----
.../cachet/plugins/health/HealthDataReader.kt | 522 -----
.../cachet/plugins/health/HealthDataWriter.kt | 867 ---------
.../cachet/plugins/health/HealthPlugin.kt | 366 ----
.../plugins/health/HealthRecordingFilter.kt | 43 -
.../.flutter-plugins-dependencies~master | 1 -
packages/health/example/.gitignore | 45 -
packages/health/example/.metadata | 45 -
packages/health/example/README.md | 16 -
packages/health/example/analysis_options.yaml | 28 -
packages/health/example/android/.gitignore | 14 -
.../example/android/app/build.gradle.kts | 44 -
.../android/app/src/debug/AndroidManifest.xml | 7 -
.../android/app/src/main/AndroidManifest.xml | 122 --
.../health/health_example/MainActivity.kt | 8 -
.../res/drawable-v21/launch_background.xml | 12 -
.../main/res/drawable/launch_background.xml | 12 -
.../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 544 -> 0 bytes
.../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 442 -> 0 bytes
.../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 721 -> 0 bytes
.../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 1031 -> 0 bytes
.../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 1443 -> 0 bytes
.../app/src/main/res/values-night/styles.xml | 18 -
.../app/src/main/res/values/styles.xml | 18 -
.../app/src/profile/AndroidManifest.xml | 7 -
.../health/example/android/build.gradle.kts | 21 -
.../health/example/android/gradle.properties | 3 -
.../gradle/wrapper/gradle-wrapper.properties | 5 -
.../example/android/settings.gradle.kts | 25 -
packages/health/example/ios/.gitignore | 34 -
.../ios/Flutter/AppFrameworkInfo.plist | 26 -
.../health/example/ios/Flutter/Debug.xcconfig | 2 -
.../example/ios/Flutter/Release.xcconfig | 2 -
packages/health/example/ios/Podfile | 43 -
.../ios/Runner.xcodeproj/project.pbxproj | 794 --------
.../contents.xcworkspacedata | 7 -
.../xcshareddata/IDEWorkspaceChecks.plist | 8 -
.../xcshareddata/WorkspaceSettings.xcsettings | 8 -
.../xcshareddata/xcschemes/Runner.xcscheme | 119 --
.../contents.xcworkspacedata | 10 -
.../xcshareddata/IDEWorkspaceChecks.plist | 8 -
.../xcshareddata/WorkspaceSettings.xcsettings | 8 -
.../example/ios/Runner/AppDelegate.swift | 13 -
.../AppIcon.appiconset/Contents.json | 122 --
.../Icon-App-1024x1024@1x.png | Bin 10932 -> 0 bytes
.../AppIcon.appiconset/Icon-App-20x20@1x.png | Bin 295 -> 0 bytes
.../AppIcon.appiconset/Icon-App-20x20@2x.png | Bin 406 -> 0 bytes
.../AppIcon.appiconset/Icon-App-20x20@3x.png | Bin 450 -> 0 bytes
.../AppIcon.appiconset/Icon-App-29x29@1x.png | Bin 282 -> 0 bytes
.../AppIcon.appiconset/Icon-App-29x29@2x.png | Bin 462 -> 0 bytes
.../AppIcon.appiconset/Icon-App-29x29@3x.png | Bin 704 -> 0 bytes
.../AppIcon.appiconset/Icon-App-40x40@1x.png | Bin 406 -> 0 bytes
.../AppIcon.appiconset/Icon-App-40x40@2x.png | Bin 586 -> 0 bytes
.../AppIcon.appiconset/Icon-App-40x40@3x.png | Bin 862 -> 0 bytes
.../AppIcon.appiconset/Icon-App-60x60@2x.png | Bin 862 -> 0 bytes
.../AppIcon.appiconset/Icon-App-60x60@3x.png | Bin 1674 -> 0 bytes
.../AppIcon.appiconset/Icon-App-76x76@1x.png | Bin 762 -> 0 bytes
.../AppIcon.appiconset/Icon-App-76x76@2x.png | Bin 1226 -> 0 bytes
.../Icon-App-83.5x83.5@2x.png | Bin 1418 -> 0 bytes
.../LaunchImage.imageset/Contents.json | 23 -
.../LaunchImage.imageset/LaunchImage.png | Bin 68 -> 0 bytes
.../LaunchImage.imageset/LaunchImage@2x.png | Bin 68 -> 0 bytes
.../LaunchImage.imageset/LaunchImage@3x.png | Bin 68 -> 0 bytes
.../LaunchImage.imageset/README.md | 5 -
.../Runner/Base.lproj/LaunchScreen.storyboard | 37 -
.../ios/Runner/Base.lproj/Main.storyboard | 26 -
packages/health/example/ios/Runner/Info.plist | 53 -
.../ios/Runner/Runner-Bridging-Header.h | 1 -
.../example/ios/Runner/Runner.entitlements | 8 -
.../example/ios/RunnerTests/RunnerTests.swift | 12 -
packages/health/example/lib/main.dart | 1003 ----------
packages/health/example/lib/util.dart | 109 --
packages/health/example/pubspec.yaml | 25 -
packages/health/ios/Assets/.gitkeep | 0
.../health/ios/Classes/HealthConstants.swift | 216 ---
.../ios/Classes/HealthDataOperations.swift | 323 ----
.../health/ios/Classes/HealthDataReader.swift | 925 ---------
.../health/ios/Classes/HealthDataWriter.swift | 440 -----
packages/health/ios/Classes/HealthPlugin.h | 4 -
packages/health/ios/Classes/HealthPlugin.m | 8 -
.../health/ios/Classes/HealthUtilities.swift | 153 --
.../ios/Classes/SwiftHealthPlugin.swift | 635 ------
packages/health/ios/health.podspec | 23 -
packages/health/lib/health.dart | 21 -
packages/health/lib/health.g.dart | 631 ------
packages/health/lib/health.json.dart | 30 -
packages/health/lib/src/functions.dart | 46 -
.../health/lib/src/health_data_point.dart | 225 ---
packages/health/lib/src/health_plugin.dart | 1709 -----------------
.../health/lib/src/health_value_types.dart | 976 ----------
packages/health/lib/src/heath_data_types.dart | 630 ------
packages/health/lib/src/workout_summary.dart | 52 -
packages/health/pubspec.yaml | 39 -
packages/health/test/health_test.dart | 337 ----
.../health/test/mocks/device_info_mock.dart | 60 -
packages/health/test/swift_test.dart | 174 --
108 files changed, 14374 deletions(-)
delete mode 100644 packages/health/.metadata
delete mode 100644 packages/health/CHANGELOG.md
delete mode 100644 packages/health/LICENSE
delete mode 100644 packages/health/README.md
delete mode 100644 packages/health/analysis_options.yaml
delete mode 100644 packages/health/android/build.gradle
delete mode 100644 packages/health/android/gradle.properties
delete mode 100644 packages/health/android/gradle/wrapper/gradle-wrapper.properties
delete mode 100644 packages/health/android/settings.gradle
delete mode 100644 packages/health/android/src/main/AndroidManifest.xml
delete mode 100644 packages/health/android/src/main/kotlin/cachet/plugins/health/HealthConstants.kt
delete mode 100644 packages/health/android/src/main/kotlin/cachet/plugins/health/HealthDataConverter.kt
delete mode 100644 packages/health/android/src/main/kotlin/cachet/plugins/health/HealthDataOperations.kt
delete mode 100644 packages/health/android/src/main/kotlin/cachet/plugins/health/HealthDataReader.kt
delete mode 100644 packages/health/android/src/main/kotlin/cachet/plugins/health/HealthDataWriter.kt
delete mode 100644 packages/health/android/src/main/kotlin/cachet/plugins/health/HealthPlugin.kt
delete mode 100644 packages/health/android/src/main/kotlin/cachet/plugins/health/HealthRecordingFilter.kt
delete mode 100644 packages/health/example/.flutter-plugins-dependencies~master
delete mode 100644 packages/health/example/.gitignore
delete mode 100644 packages/health/example/.metadata
delete mode 100644 packages/health/example/README.md
delete mode 100644 packages/health/example/analysis_options.yaml
delete mode 100644 packages/health/example/android/.gitignore
delete mode 100644 packages/health/example/android/app/build.gradle.kts
delete mode 100644 packages/health/example/android/app/src/debug/AndroidManifest.xml
delete mode 100644 packages/health/example/android/app/src/main/AndroidManifest.xml
delete mode 100644 packages/health/example/android/app/src/main/kotlin/cachet/plugins/health/health_example/MainActivity.kt
delete mode 100644 packages/health/example/android/app/src/main/res/drawable-v21/launch_background.xml
delete mode 100644 packages/health/example/android/app/src/main/res/drawable/launch_background.xml
delete mode 100644 packages/health/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
delete mode 100644 packages/health/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
delete mode 100644 packages/health/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
delete mode 100644 packages/health/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
delete mode 100644 packages/health/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
delete mode 100644 packages/health/example/android/app/src/main/res/values-night/styles.xml
delete mode 100644 packages/health/example/android/app/src/main/res/values/styles.xml
delete mode 100644 packages/health/example/android/app/src/profile/AndroidManifest.xml
delete mode 100644 packages/health/example/android/build.gradle.kts
delete mode 100644 packages/health/example/android/gradle.properties
delete mode 100644 packages/health/example/android/gradle/wrapper/gradle-wrapper.properties
delete mode 100644 packages/health/example/android/settings.gradle.kts
delete mode 100644 packages/health/example/ios/.gitignore
delete mode 100644 packages/health/example/ios/Flutter/AppFrameworkInfo.plist
delete mode 100644 packages/health/example/ios/Flutter/Debug.xcconfig
delete mode 100644 packages/health/example/ios/Flutter/Release.xcconfig
delete mode 100644 packages/health/example/ios/Podfile
delete mode 100644 packages/health/example/ios/Runner.xcodeproj/project.pbxproj
delete mode 100644 packages/health/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
delete mode 100644 packages/health/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
delete mode 100644 packages/health/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
delete mode 100644 packages/health/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
delete mode 100644 packages/health/example/ios/Runner.xcworkspace/contents.xcworkspacedata
delete mode 100644 packages/health/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
delete mode 100644 packages/health/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
delete mode 100644 packages/health/example/ios/Runner/AppDelegate.swift
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
delete mode 100644 packages/health/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
delete mode 100644 packages/health/example/ios/Runner/Base.lproj/LaunchScreen.storyboard
delete mode 100644 packages/health/example/ios/Runner/Base.lproj/Main.storyboard
delete mode 100644 packages/health/example/ios/Runner/Info.plist
delete mode 100644 packages/health/example/ios/Runner/Runner-Bridging-Header.h
delete mode 100644 packages/health/example/ios/Runner/Runner.entitlements
delete mode 100644 packages/health/example/ios/RunnerTests/RunnerTests.swift
delete mode 100644 packages/health/example/lib/main.dart
delete mode 100644 packages/health/example/lib/util.dart
delete mode 100644 packages/health/example/pubspec.yaml
delete mode 100644 packages/health/ios/Assets/.gitkeep
delete mode 100644 packages/health/ios/Classes/HealthConstants.swift
delete mode 100644 packages/health/ios/Classes/HealthDataOperations.swift
delete mode 100644 packages/health/ios/Classes/HealthDataReader.swift
delete mode 100644 packages/health/ios/Classes/HealthDataWriter.swift
delete mode 100644 packages/health/ios/Classes/HealthPlugin.h
delete mode 100644 packages/health/ios/Classes/HealthPlugin.m
delete mode 100644 packages/health/ios/Classes/HealthUtilities.swift
delete mode 100644 packages/health/ios/Classes/SwiftHealthPlugin.swift
delete mode 100644 packages/health/ios/health.podspec
delete mode 100644 packages/health/lib/health.dart
delete mode 100644 packages/health/lib/health.g.dart
delete mode 100644 packages/health/lib/health.json.dart
delete mode 100644 packages/health/lib/src/functions.dart
delete mode 100644 packages/health/lib/src/health_data_point.dart
delete mode 100644 packages/health/lib/src/health_plugin.dart
delete mode 100644 packages/health/lib/src/health_value_types.dart
delete mode 100644 packages/health/lib/src/heath_data_types.dart
delete mode 100644 packages/health/lib/src/workout_summary.dart
delete mode 100644 packages/health/pubspec.yaml
delete mode 100644 packages/health/test/health_test.dart
delete mode 100644 packages/health/test/mocks/device_info_mock.dart
delete mode 100644 packages/health/test/swift_test.dart
diff --git a/packages/health/.metadata b/packages/health/.metadata
deleted file mode 100644
index 969bc2761..000000000
--- a/packages/health/.metadata
+++ /dev/null
@@ -1,10 +0,0 @@
-# This file tracks properties of this Flutter project.
-# Used by Flutter tool to assess capabilities and perform upgrades etc.
-#
-# This file should be version controlled and should not be manually edited.
-
-version:
- revision: cc949a8e8b9cf394b9290a8e80f87af3e207dce5
- channel: beta
-
-project_type: plugin
diff --git a/packages/health/CHANGELOG.md b/packages/health/CHANGELOG.md
deleted file mode 100644
index 44de9d899..000000000
--- a/packages/health/CHANGELOG.md
+++ /dev/null
@@ -1,470 +0,0 @@
-## 13.2.0
-
-* Add get health data by UUID (see `getHealthDataByUUID()`) - PR [#1193](https://github.com/carp-dk/flutter-plugins/pull/1193), [#1194](https://github.com/carp-dk/flutter-plugins/pull/1194)
-* Add delete by UUID (`deleteByUUID()`)
-* Add support for unit conversion in `WeightRecord`, `HeightRecord`, `BodyTemperatureRecord`, and `BloodGlucoseRecord` - PR [#1212](https://github.com/carp-dk/flutter-plugins/pull/1223)
-* Update `compileSDK` to 36 - Fix [#1261](https://github.com/carp-dk/flutter-plugins/issues/1261)
-* Update Gradle to 8.9.1
-* Update `org.jetbrains.kotlin.android` to 2.1.0
-* Update `androidx.health.connect:connect-client` to 1.1.0-rc03
-* Update `device_info_plus` to 12.1.0 - Fix [#1264](https://github.com/carp-dk/flutter-plugins/issues/1264)
-
-## 13.1.4
-
-* Fix adding mindfulness resulted in crash in iOS
-* Support SPM for iOS
-
-## 13.1.3
-
-* Fix permissions issues with iOS
-* Fix [#1231](https://github.com/cph-cachet/flutter-plugins/issues/1231)
-
-## 13.1.2
-
-* Fix [#1250](https://github.com/cph-cachet/flutter-plugins/issues/1250)
-* Fix [#1233](https://github.com/cph-cachet/flutter-plugins/issues/1233)
-
-## 13.1.1
-
-* Fix [#1207](https://github.com/cph-cachet/flutter-plugins/issues/1207) - (**Important**: Some property names might have changed compared to before for `Nutrition`)
-* Fix [#1201](https://github.com/cph-cachet/flutter-plugins/issues/1201)
-* iOS: Add `APPLE_STAND_TIME`, `APPLE_STAND_HOUR`, and `APPLE_MOVE_TIME` health data types (READ ONLY) [#1190](https://github.com/cph-cachet/flutter-plugins/issues/1190)
-
-## 13.1.0
-
-* Refactored Android native implementation (No Flutter API changes)
-* Android: Add `SPEED` health data type - PR [#1183](https://github.com/cph-cachet/flutter-plugins/pull/1183)
-* iOS: Add `WALKING_SPEED` health data type - PR [#1183](https://github.com/cph-cachet/flutter-plugins/pull/1183)
-* Add `METER_PER_SECOND` health data unit
-
-## 13.0.1
-
-* Refactored Swift native implementation - See PR [#1175](https://github.com/cph-cachet/flutter-plugins/pull/1175) and [#1208](https://github.com/cph-cachet/flutter-plugins/pull/1208) for more information:
-
-```
-SwiftHealthPlugin (Main Plugin Class)
-├── HealthDataReader (Reading health data)
-├── HealthDataWriter (Writing health data)
-├── HealthDataOperations (Permissions and deletion)
-├── HealthUtilities (Helper functions)
-└── HealthConstants (Constants and enums)
-```
-
-## 13.0.0
-
-* Refactored Swift native implementation
-
-## 12.2.1
-
-* iOS: Add `swift_version` for add-to-app implementations - PR [#1205](https://github.com/cph-cachet/flutter-plugins/pull/1205)
-
-## 12.2.0
-
-* iOS: Add `deviceModel` in returned Health data to identify the device that generated the data of the receiver. (in iOS `source_name` represents the revision of the source responsible for saving the receiver.)
-* Android: Add read health data in background - PR [#1184](https://github.com/cph-cachet/flutter-plugins/pull/1184)
-* Fix [#1169](https://github.com/cph-cachet/flutter-plugins/issues/1169) where `meal_type` property in `Nutrition` was null always
-* iOS: Add `CARDIO_DANCE` HealthDataType - [#1146](https://github.com/cph-cachet/flutter-plugins/pull/1146)
-
-## 12.1.0
-
-* Add delete record by UUID method. See function `deleteByUUID(required String uuid, HealthDataType? type)`
-* iOS: Parse metadata to remove unsupported types - PR [#1120](https://github.com/cph-cachet/flutter-plugins/pull/1120)
-* iOS: Add UV Index Types
-* Android: Add request access to historic data [#1126](https://github.com/cph-cachet/flutter-plugins/issues/1126) - PR [#1127](https://github.com/cph-cachet/flutter-plugins/pull/1127)
-
-```XML
-
-
-```
-
-* Android:
- * Update `androidx.compose:compose-bom` to `2025.02.00`
- * Update `androidx.health.connect:connect-client` to `1.1.0-alpha11`
- * Update `androidx.fragment:fragment-ktx` to `1.8.6`
- * Update to Java 11
-* Update example apps
-
-## 12.0.1
-
-* Update of API and README doc
-* Fix [#1118](https://github.com/cph-cachet/flutter-plugins/issues/1118)
-
-## 12.0.0
-
-* **BREAKING** This release introduces a significant architectural change to the `health` plugin by removing the `singleton` pattern.
- * **Dependency Injection for `DeviceInfoPlugin`**:
- * The `Health` class is no longer a singleton.
- * The `Health()` factory constructor is removed.
- * The `Health` class now accepts an (optional) `DeviceInfoPlugin` dependency through its constructor, this change was introduced to provide easy mocking of the `DeviceInfo` class during unit tests.
- * This architectural change means that, for the application to work correctly, the `Health` class *MUST* be initialized correctly as a global instance.
- * **Impact**:
- * For most users, **no immediate code changes are required** but it is paramount to initialize the `Health` class as a global instance (i.e. do not call `Health()` every time but rather define an instance `final health = Health();`).
-* **BREAKING** (Android) Remove automatic permission request of `DISTANCE_DELTA` and `TOTAL_CALORIES_BURNED` data types when requesting permission for `WORKOUT` health data type.
- * For `WORKOUT`s that require above permissions, now those need to be requested manually.
- * Fix [#984](https://github.com/cph-cachet/flutter-plugins/issues/984) - PR [#1055](https://github.com/cph-cachet/flutter-plugins/pull/1055)
-* Add `LEAN_BODY_MASS` data type [#1078](https://github.com/cph-cachet/flutter-plugins/issues/1078) - PR [#1097](https://github.com/cph-cachet/flutter-plugins/pull/1097)
- * The following AndroidManifest values are required to READ/WRITE `LEAN_BODY_MASS`:
-
- ```XML
-
-
- ```
-
-* iOS: Add `WATER_TEMPERATURE` and `UNDERWATER_DEPTH` health values [#1096](https://github.com/cph-cachet/flutter-plugins/issues/1096)
-* iOS: Add support for `Underwater Diving` workout [#1096](https://github.com/cph-cachet/flutter-plugins/issues/1096)
-* Fix [#1072](https://github.com/cph-cachet/flutter-plugins/issues/1072) and [#1074](https://github.com/cph-cachet/flutter-plugins/issues/1074)
-* Fix issue where iOS delete not deleting own records - PR [#1104](https://github.com/cph-cachet/flutter-plugins/pull/1104)
-* Fix [#950](https://github.com/cph-cachet/flutter-plugins/issues/950) - PR [#1103](https://github.com/cph-cachet/flutter-plugins/pull/1103)
-* Fix [#1047](https://github.com/cph-cachet/flutter-plugins/issues/1047) and [#939](https://github.com/cph-cachet/flutter-plugins/issues/939) - PR [#1091](https://github.com/cph-cachet/flutter-plugins/pull/1091)
-* Fix issue where `SLEEP_LIGHT` type was not aligned correctly - PR [#1086](https://github.com/cph-cachet/flutter-plugins/pull/1086)
-* Fix [#1051](https://github.com/cph-cachet/flutter-plugins/issues/1051) - PR [#1052](https://github.com/cph-cachet/flutter-plugins/pull/1052)
-* Updated `intl` to ^0.20.1 [#1092](https://github.com/cph-cachet/flutter-plugins/issues/1092)
-* Updated `device_info_plus` to ^11.2.0
-* Example app: Updated `permission_handler` to ^11.3.1
-
-## 11.1.1
-
-* Fix of [#1059](https://github.com/cph-cachet/flutter-plugins/issues/1059)
-
-## 11.1.0
-
-* Fix of [#1043](https://github.com/cph-cachet/flutter-plugins/issues/1043)
-* Type-safe JSON deserialization using carp_serializable v. 2.0
-
-## 11.0.0
-
-* **BREAKING** Remove Google Fit support in the Android code, as well as Google FIt related dependencies and references throughout the documentation
- * Remove `useHealthConnectIfAvailable` from the parameters of `Health().configure()`
- * Remove the `disconnect` method which was previously used to disconnect from Google Fit.
- * Remove the `flowRate` value from `writeBloodOxygen` as this is not supported by Health Connect.
- * Remove support for various `HealthWorkoutActivityType`s which were supported by Google Fit. Some of these do not have suitable alternatives in Google Health Connect (and are not supported on iOS). The list of removed types can be found in PR [#1014](https://github.com/cph-cachet/flutter-plugins/pull/1014)
-* **BREAKING** introduce a new `RecordingMethod` enum
- * This can be used to filter records by automatic or manual entries when fetching data
- * You can also specify the recording method to write in the metadata
- * Remove `isManualEntry` from `HealthDataPoint` in favor of `recordingMethod`, of which the value is an enum `RecordingMethod`
- * Remove `includeManualEntry` (previously a boolean) from some of the querying methods in favor of `recordingMethodsToFilter`.
- * For complete details on relevant changes, see the description of PR [#1023](https://github.com/cph-cachet/flutter-plugins/pull/1023)
-* Add support for all sleep stages across iOS and Android
- * Clean up relevant documentation
- * Remove undocumented sleep stages
- * **BREAKING** certain sleep stages were removed/combined into other related stages see PR [#1026](https://github.com/cph-cachet/flutter-plugins/pull/1026) for the complete list of changes and a discussion of the motivation in issue [#985](https://github.com/cph-cachet/flutter-plugins/issues/985)
-* Android: Add support for `OTHER` workout type
-* Cleaned up workout activity types for consistency across iOS and Android, see PR [#1020](https://github.com/cph-cachet/flutter-plugins/pull/1020) for a complete list of changes
-* iOS: add support for menstruation flow, PR [#1008](https://github.com/cph-cachet/flutter-plugins/pull/1008)
-* Android: Add support for heart rate variability, PR [#1009](https://github.com/cph-cachet/flutter-plugins/pull/1009)
-* iOS: add support for atrial fibrillation burden, PR [#1031](https://github.com/cph-cachet/flutter-plugins/pull/1031)
-* Add support for UUIDs in health records for both HealthKit and Health Connect, PR [#1019](https://github.com/cph-cachet/flutter-plugins/pull/1019)
-* Fix an issue when querying workouts, the native code could respond with an activity that is not supported in the Health package, causing an error - this will fallback to `HealthWorkoutActivityType.other` - PR [#1016](https://github.com/cph-cachet/flutter-plugins/pull/1016)
-* Remove deprecated Android v1 embeddings, PR [#1021](https://github.com/cph-cachet/flutter-plugins/pull/1021)
-
-## 10.2.0
-
-* Using named parameters in most methods for consistency.
-* Added a `HealthPlatformType` to save which health platform the data originates from (Apple Health, Google Fit, or Google Health Connect).
-* Android: Improved support for Google Health Connect
- * getHealthConnectSdkStatus, PR [#941](https://github.com/cph-cachet/flutter-plugins/pull/941)
- * installHealthConnect, PR [#943](https://github.com/cph-cachet/flutter-plugins/pull/943)
- * workout title, PR [#938](https://github.com/cph-cachet/flutter-plugins/pull/938)
-* iOS: Add support for saving blood pressure as a correlation, PR [#919](https://github.com/cph-cachet/flutter-plugins/pull/919)
-
-## 10.1.1
-
-* Fix of error in `WorkoutSummary` JSON serialization.
-* Fix of [#934](https://github.com/cph-cachet/flutter-plugins/issues/934)
-* Empty value check for calories nutrition, PR [#926](https://github.com/cph-cachet/flutter-plugins/pull/926)
-
-## 10.0.0
-
-* **BREAKING** The plugin now works as a singleton using `Health()` to access it (instead of creating an instance of `HealthFactory`).
- * This entails that the plugin now need to be configured using the `configure()` method before use.
- * The example app has been update to demonstrate this new singleton model.
-* Support for new data types:
- * body water mass, PR [#917](https://github.com/cph-cachet/flutter-plugins/pull/917)
- * caffeine, PR [#924](https://github.com/cph-cachet/flutter-plugins/pull/924)
- * workout summary, manual entry and new health data types, PR [#920](https://github.com/cph-cachet/flutter-plugins/pull/920)
-* Fixed `SleepSessionRecord`, PR [#928](https://github.com/cph-cachet/flutter-plugins/pull/928)
-* Update to API and README docs
-* Upgrade to Dart 3.2 and Flutter 3.
-* Added Dart linter and fixed a series of type casting issues.
-* Using carp_serializable for consistent camel_case and type-safe generation of JSON serialization methods for polymorphic health data type classes.
-
-## 9.0.0
-
-* Updated HC to comply with Android 14, PR [#834](https://github.com/cph-cachet/flutter-plugins/pull/834) and [#882](https://github.com/cph-cachet/flutter-plugins/pull/882)
-* Added checks for NullPointerException, closes issue [#878](https://github.com/cph-cachet/flutter-plugins/issues/878)
-* Updated intl to ^0.19.0
-* Upgrade to AGP 8, PR [#868](https://github.com/cph-cachet/flutter-plugins/pull/868)
-* Added missing google fit workout types, PR [#836](https://github.com/cph-cachet/flutter-plugins/pull/836)
-* Added pagination in HC, PR [#862](https://github.com/cph-cachet/flutter-plugins/pull/862)
-* Fix of permission in example app + improvements to doc, PR [#875](https://github.com/cph-cachet/flutter-plugins/pull/875)
-
-## 8.1.0
-
-* Fixed sleep stages on iOS, Issue [#803](https://github.com/cph-cachet/flutter-plugins/issues/803)
-* Added Nutrition data type, includes PR [#679](https://github.com/cph-cachet/flutter-plugins/pull/679)
-* Lowered minSDK, Issue [#809](https://github.com/cph-cachet/flutter-plugins/issues/809)
-
-## 8.0.0
-
-* Fixed issue [#774](https://github.com/cph-cachet/flutter-plugins/issues/774), [#779](https://github.com/cph-cachet/flutter-plugins/issues/779)
-* Merged PR [#579](https://github.com/cph-cachet/flutter-plugins/pull/579), [#717](https://github.com/cph-cachet/flutter-plugins/pull/717), [#770](https://github.com/cph-cachet/flutter-plugins/pull/770)
-* Upgraded to mavenCentral, upgraded minSDK, compileSDK, targetSDK
-* Updated health connect client to 1.1.0
-* Added respiratory rate and peripheral perfusion index to HealthConnect
-* Minor fixes to requestAuthorization, sleep stage filtering
-
-## 7.0.1
-
-* Updated dart doc
-
-## 7.0.0
-
-* Merged PR #722
-* Added deep, light, REM, and out of bed sleep to iOS and Android HealthConnect
-
-## 6.0.0
-
-* Fixed issues #[694](https://github.com/cph-cachet/flutter-plugins/issues/694), #[696](https://github.com/cph-cachet/flutter-plugins/issues/696), #[697](https://github.com/cph-cachet/flutter-plugins/issues/697), #[698](https://github.com/cph-cachet/flutter-plugins/issues/698)
-* added totalSteps for HealthConnect
-* added supplemental oxygen flow rate for blood oxygen saturation on Android
-
-## 5.0.0
-
-* Added initial support for the new Health Connect API, as Google Fit is being deprecated.
- * Does not yet support `revokePermissions`, `getTotalStepsInInterval`.
-* Changed Intl package version dependency to `^0.17.0` to work with flutter stable version.
-* Updated the example app to handle more buttons.
-
-## 4.6.0
-
-* Added method for revoking permissions. On Android it uses `disableFit()` to remove access to Google Fit - `revokePermissions`. Documented lack of methods for iOS.
-
-## 4.5.0
-
-* Updated android sdk, gradle
-* Updated `enumToString` to native `.name`
-* Update and fixed JSON serialization of HealthDataPoints
-* Removed auth request in `writeWorkoutData` to avoid bug when denying the auth.
-* Merged pull requests [#653](https://github.com/cph-cachet/flutter-plugins/pull/653), [#652](https://github.com/cph-cachet/flutter-plugins/pull/652), [#639](https://github.com/cph-cachet/flutter-plugins/pull/639), [#644](https://github.com/cph-cachet/flutter-plugins/pull/644), [#668](https://github.com/cph-cachet/flutter-plugins/pull/668)
-* Further developed [#644](https://github.com/cph-cachet/flutter-plugins/pull/644) on android to accommodate having the `writeBloodPressure` api.
-* Small bug fixes
-
-## 4.4.0
-
-* Merged pull request #[566](https://github.com/cph-cachet/flutter-plugins/pull/566), [#578](https://github.com/cph-cachet/flutter-plugins/pull/578), [#596](https://github.com/cph-cachet/flutter-plugins/pull/596), [#623](https://github.com/cph-cachet/flutter-plugins/pull/623), [#632](https://github.com/cph-cachet/flutter-plugins/pull/632)
-* ECG added as part of [#566](https://github.com/cph-cachet/flutter-plugins/pull/566)
-* Small fixes
-
-## 4.3.0
-
-* upgrade to `device_info_plus: ^8.0.0`
-
-## 4.2.0
-
-* upgrade to `device_info_plus: ^7.0.0`
-
-## 4.1.1
-
-* fix of [#572](https://github.com/cph-cachet/flutter-plugins/issues/572).
-
-## 4.1.0
-
-* update of `device_info_plus: ^4.0.0`
-* upgraded to Dart 2.17 and Flutter 3.0
-
-## 4.0.0
-
-* Large refactor of the `HealthDataPoint` value into generic `HealthValue` and added `NumericHealthValue`, `AudiogramHealthValue` and `WorkoutHealthValue`
-* Added support for Audiograms with `writeAudiogram` and in `getHealthDataFromTypes`
-* Added support for Workouts with `writeWorkout` and in `getHealthDataFromTypes`
-* Added all `HealthWorkoutActivityType`s
-* Added more `HealthDataUnit` types
-* Fix of [#432](https://github.com/cph-cachet/flutter-plugins/issues/532)
-* updated documentation in code
-* updated documentation in README.md
-* updated example app
-* cleaned up code
-* removed `requestPermissions` as it was essentially a duplicate of `requestAuthorization`
-
-## 3.4.4
-
-* Fix of [#500](https://github.com/cph-cachet/flutter-plugins/issues/500).
-* Added Headache-types to HealthDataTypes on iOS
-
-## 3.4.3
-
-* fix of [#401](https://github.com/cph-cachet/flutter-plugins/issues/401).
-
-## 3.4.2
-
-* Resolved concurrent issues with native threads [PR#483](https://github.com/cph-cachet/flutter-plugins/pull/483).
-* HealthKit CategorySample [PR#485](https://github.com/cph-cachet/flutter-plugins/pull/485).
-* update of API documentation.
-
-## 3.4.0
-
-* Add sleep in bed to android [PR#457](https://github.com/cph-cachet/flutter-plugins/pull/457).
-* Add the android.permission.ACTIVITY_RECOGNITION setup to the README [PR#458](https://github.com/cph-cachet/flutter-plugins/pull/458).
-* Fixed (regression) issues with metric and permissions [PR#462](https://github.com/cph-cachet/flutter-plugins/pull/462).
-* Get total steps [PR#471](https://github.com/cph-cachet/flutter-plugins/pull/471).
-* update of example app to reflect new features.
-* update of API documentation.
-
-## 3.3.1
-
-* DISTANCE_DELTA is for Android, not iOS [PR#428](https://github.com/cph-cachet/flutter-plugins/pull/428).
-* added missing READ_ACCESS [PR#454](https://github.com/cph-cachet/flutter-plugins/pull/454).
-
-## 3.3.0
-
-* Write support on Google Fit and HealthKit [PR#430](https://github.com/cph-cachet/flutter-plugins/pull/430).
-
-## 3.2.1
-
-* Updated `device_info_plus` version dependency
-
-## 3.2.0
-
-* added simple `HKWorkout` and `ExerciseTime` support [PR#421](https://github.com/cph-cachet/flutter-plugins/pull/421).
-
-## 3.1.1+1
-
-* added functions to request authorization [PR#394](https://github.com/cph-cachet/flutter-plugins/pull/394)
-
-## 3.1.0
-
-* added sleep data to Android + fix of permissions and initialization [PR#372](https://github.com/cph-cachet/flutter-plugins/pull/372)
-* testability of HealthDataPoint [PR#388](https://github.com/cph-cachet/flutter-plugins/pull/388).
-* update to using the `device_info_plus` plugin
-
-## 3.0.6
-
-* Added two new fields to the `HealthDataPoint` - `SourceId` and `SourceName` and populate when data is read. This allows data points to be disambiguous and in some cases allows us to get more accurate data. For example the number of steps can be reported from Apple Health and Watch and without source data they are aggregated into just "steps" producing an inaccurate result [PR#281](https://github.com/cph-cachet/flutter-plugins/pull/281).
-
-## 3.0.5
-
-* Null safety in Dart has been implemented
-* The plugin supports the Android v2 embedding
-
-## 3.0.4
-
-* Upgrade to `device_info` version 2.0.0
-
-## 3.0.3
-
-* Merged various PRs, mostly smaller fixes
-
-## 3.0.2
-
-* Upgrade to `device_info` version 1.0.0
-
-## 3.0.1+1
-
-* Bugfix regarding BMI from
-
-## 3.0.0
-
-* Changed the flow for requesting access and reading data
- * Access must be requested manually before reading
- * This simplifies the data flow and makes it easier to reason about when debugging
-* Data read access is no longer checked for each individual type, but rather on the set of types specified.
-
-## 2.0.9
-
-* Now handles the case when asking for BMI on Android when no height data has been collected.
-
-## 2.0.8
-
-* Fixed a merge issue which had deleted the data types added in 2.0.4.
-
-## 2.0.7
-
-* Fixed a Google sign-in issue, and a type issue on Android ()
-
-## 2.0.6
-
-* Fixed a Google sign-in issue. ()
-
-## 2.0.5
-
-* Now uses 'device_info' rather than 'device_id' for getting device information
-
-## 2.0.4+1
-
-* Static analysis, formatting etc.
-
-## 2.0.4
-
-* Added Sleep data, Water, and Mindfulness.
-
-## 2.0.3
-
-* The method `requestAuthorization` is now public again.
-
-## 2.0.2
-
-* Updated the API to take a list of types rather than a single type, when requesting health data.
-
-## 2.0.1+1
-
-* Removed the need for try-catch on the programmer's end
-
-## 2.0.1
-
-* Removed UUID and instead introduced a comparison operator
-
-## 2.0.0
-
-* Changed the API substantially to allow for granular Data Type permissions
-
-## 1.1.6
-
-Added the following Health Types as per PR #147
-
-* DISTANCE_WALKING_RUNNING
-* FLIGHTS_CLIMBED
-* MOVE_MINUTES
-* DISTANCE_DELTA
-
-## 1.1.5
-
-* Fixed an issue with google authorization
-* See
-
-## 1.1.4
-
-* Corrected table of units
-
-## 1.1.3
-
-* Updated table with units
-
-## 1.1.2
-
-* Now supports the data type `HEART_RATE_VARIABILITY_SDNN` on iOS
-
-## 1.1.1
-
-* Fixed issue #88 ()
-
-## 1.1.0
-
-* Introduced UUID to the HealthDataPoint class
-* Re-did the example application
-
-## 1.0.6
-
-* Fixed a null-check warning in the obj-c code (issue #87)
-
-## 1.0.5
-
-* Updated gradle-wrapper distribution url `gradle-5.4.1-all.zip`
-* Updated docs
-
-## 1.0.2
-
-* Updated documentation for Android and Google Fit.
-
-## 1.0.1
-
-* Streamlined DataType units in Flutter.
diff --git a/packages/health/LICENSE b/packages/health/LICENSE
deleted file mode 100644
index 0edc55d82..000000000
--- a/packages/health/LICENSE
+++ /dev/null
@@ -1,9 +0,0 @@
-MIT License.
-
-Copyright 2020 the Technical University of Denmark (DTU).
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ”Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED ”AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/packages/health/README.md b/packages/health/README.md
deleted file mode 100644
index f090b744e..000000000
--- a/packages/health/README.md
+++ /dev/null
@@ -1,550 +0,0 @@
-# Health
-
-Enables reading and writing health data from/to [Apple Health](https://www.apple.com/health/) and [Google Health Connect](https://health.google/health-connect-android/).
-
-> **NOTE:** Google has deprecated the Google Fit API. According to the [documentation](https://developers.google.com/fit/android), as of **May 1st 2024** developers cannot sign up for using the API. As such, this package has removed support for Google Fit as of version 11.0.0 and users are urged to upgrade as soon as possible.
-
-The plugin supports:
-
-- handling permissions to access health data using the `hasPermissions`, `requestAuthorization`, `revokePermissions` methods.
-- reading health data using the `getHealthDataFromTypes` method.
-- writing health data using the `writeHealthData` method.
-- writing workouts using the `writeWorkout` method.
-- writing meals on iOS (Apple Health) & Android using the `writeMeal` method.
-- writing audiograms on iOS using the `writeAudiogram` method.
-- writing blood pressure data using the `writeBloodPressure` method.
-- accessing total step counts using the `getTotalStepsInInterval` method.
-- cleaning up duplicate data points via the `removeDuplicates` method.
-- removing data of a given type in a selected period of time using the `delete` method.
-
-Note that for Android, the target phone **needs** to have the [Health Connect](https://play.google.com/store/apps/details?id=com.google.android.apps.healthdata&hl=en) app installed (which is currently in beta) and have access to the internet.
-
-See the tables below for supported health and workout data types.
-
-## Setup
-
-### Apple Health (iOS)
-
-First, add the following 2 entries to the `Info.plist`:
-
-```xml
-NSHealthShareUsageDescription
-We will sync your data with the Apple Health app to give you better insights
-NSHealthUpdateUsageDescription
-We will sync your data with the Apple Health app to give you better insights
-```
-
-Then, open your Flutter project in Xcode by right clicking on the "ios" folder and selecting "Open in Xcode". Next, enable "HealthKit" by adding a capability inside the "Signing & Capabilities" tab of the Runner target's settings.
-
-### Google Health Connect (Android)
-
-Health Connect requires the following lines in the `AndroidManifest.xml` file (see also the example app):
-
-```xml
-
-
-
-
-
-
-
-```
-
-In the Health Connect permissions activity there is a link to your privacy policy. You need to grant the Health Connect app access in order to link back to your privacy policy. In the example below, you should either replace `.MainActivity` with an activity that presents the privacy policy or have the Main Activity route the user to the policy. This step may be required to pass Google app review when requesting access to sensitive permissions.
-
-```xml
-
-
-
-
-
-
-```
-
-For each data type you want to access, the READ and WRITE permissions need to be added to the `AndroidManifest.xml` file. The list of [permissions](https://developer.android.com/health-and-fitness/guides/health-connect/plan/data-types#permissions) can be found here on the [data types](https://developer.android.com/health-and-fitness/guides/health-connect/plan/data-types) page.
-
-An example of asking for permission to read and write heart rate data is shown below and more examples can also be found in the example app.
-
-```xml
-
-
-```
-
-By default, Health Connect restricts read data to 30 days from when permission has been granted.
-
-You can check and request access to historical data using the `isHealthDataHistoryAuthorized` and `requestHealthDataHistoryAuthorization` methods, respectively.
-
-The above methods require the following permission to be declared:
-
-```xml
-
-```
-
-Accessing fitness data (e.g. Steps) requires permission to access the "Activity Recognition" API. To set it add the following line to your `AndroidManifest.xml` file.
-
-```xml
-
-```
-
-Additionally, for workouts, if the distance of a workout is requested then the location permissions below are needed.
-
-```xml
-
-
-```
-
-Because this is labeled as a `dangerous` protection level, the permission system will not grant it automatically and it requires the user's action.
-You can prompt the user for it using the [permission_handler](https://pub.dev/packages/permission_handler) plugin.
-Follow the plugin setup instructions and add the following line before requesting the data:
-
-```dart
-await Permission.activityRecognition.request();
-await Permission.location.request();
-```
-
-Finally, an `intent-filter` needs to be added to the `.MainActivity` activity.
-
-```xml
-
-
-
-
-
-```
-
-There's a `debug`, `main` and `profile` version which are chosen depending on how you start your app. In general, it's sufficient to add permission only to the `main` version.
-
-#### Android 14
-
-This plugin uses the new `registerForActivityResult` when requesting permissions from Health Connect.
-In order for that to work, the Main app's activity should extend `FlutterFragmentActivity` instead of `FlutterActivity`.
-This adjustment allows casting from `Activity` to `ComponentActivity` for accessing `registerForActivityResult`.
-
-In your MainActivity.kt file, update the `MainActivity` class so that it extends `FlutterFragmentActivity` instead of the default `FlutterActivity`:
-
-```kotlin
-...
-import io.flutter.embedding.android.FlutterFragmentActivity
-...
-
-class MainActivity: FlutterFragmentActivity() {
-...
-}
-```
-
-#### Android X
-
-Replace the content of the `android/gradle.properties` file with the following lines:
-
-```bash
-org.gradle.jvmargs=-Xmx1536M
-android.enableJetifier=true
-android.useAndroidX=true
-```
-
-## Usage
-
-See the example app for detailed examples of how to use the Health API.
-
-A instance of the Health plugin is create using the `Health()` constructor and is subsequently configured calling the `configure` method. Once configured, the plugin can be used for handling permissions and getting and adding data to Apple Health or Google Health Connect.
-Below is a simplified flow of how to use the plugin.
-
-```dart
-
- // Global Health instance
- final health = Health();
-
- // configure the health plugin before use.
- await health.configure();
-
-
- // define the types to get
- var types = [
- HealthDataType.STEPS,
- HealthDataType.BLOOD_GLUCOSE,
- ];
-
- // requesting access to the data types before reading them
- bool requested = await health.requestAuthorization(types);
-
- var now = DateTime.now();
-
- // fetch health data from the last 24 hours
- List healthData = await health.getHealthDataFromTypes(
- now.subtract(Duration(days: 1)), now, types);
-
- // request permissions to write steps and blood glucose
- types = [HealthDataType.STEPS, HealthDataType.BLOOD_GLUCOSE];
- var permissions = [
- HealthDataAccess.READ_WRITE,
- HealthDataAccess.READ_WRITE
- ];
- await health.requestAuthorization(types, permissions: permissions);
-
- // write steps and blood glucose
- bool success = await health.writeHealthData(10, HealthDataType.STEPS, now, now);
- success = await health.writeHealthData(3.1, HealthDataType.BLOOD_GLUCOSE, now, now);
-
- // you can also specify the recording method to store in the metadata (default is RecordingMethod.automatic)
- // on iOS only `RecordingMethod.automatic` and `RecordingMethod.manual` are supported
- // Android additionally supports `RecordingMethod.active` and `RecordingMethod.unknown`
- success &= await health.writeHealthData(10, HealthDataType.STEPS, now, now, recordingMethod: RecordingMethod.manual);
-
- // get the number of steps for today
- var midnight = DateTime(now.year, now.month, now.day);
- int? steps = await health.getTotalStepsInInterval(midnight, now);
-```
-
-### Health Data
-
-A [`HealthDataPoint`](https://pub.dev/documentation/health/latest/health/HealthDataPoint-class.html) object contains the following data fields:
-
-```dart
-String uuid;
-HealthValue value;
-HealthDataType type;
-HealthDataUnit unit;
-DateTime dateFrom;
-DateTime dateTo;
-HealthPlatformType sourcePlatform;
-String sourceDeviceId;
-String sourceId;
-String sourceName;
-RecordingMethod recordingMethod;
-WorkoutSummary? workoutSummary;
-```
-
-where a [`HealthValue`](https://pub.dev/documentation/health/latest/health/HealthValue-class.html) can be any type of `AudiogramHealthValue`, `ElectrocardiogramHealthValue`, `ElectrocardiogramVoltageValue`, `NumericHealthValue`, `NutritionHealthValue`, or `WorkoutHealthValue`.
-
-A `HealthDataPoint` object can be serialized to and from JSON using the `toJson()` and `fromJson()` methods. JSON serialization is using camel_case notation. Null values are not serialized. For example;
-
-```json
-{
- "value": {
- "__type": "NumericHealthValue",
- "numeric_value": 141.0
- },
- "type": "STEPS",
- "unit": "COUNT",
- "date_from": "2024-04-03T10:06:57.736",
- "date_to": "2024-04-03T10:12:51.724",
- "source_platform": "appleHealth",
- "source_device_id": "F74938B9-C011-4DE4-AA5E-CF41B60B96E7",
- "source_id": "com.apple.health.81AE7156-EC05-47E3-AC93-2D6F65C717DF",
- "source_name": "iPhone12.bardram.net",
- "recording_method": 3
- "value": {
- "__type": "NumericHealthValue",
- "numeric_value": 141.0
- },
- "type": "STEPS",
- "unit": "COUNT",
- "date_from": "2024-04-03T10:06:57.736",
- "date_to": "2024-04-03T10:12:51.724",
- "source_platform": "appleHealth",
- "source_device_id": "F74938B9-C011-4DE4-AA5E-CF41B60B96E7",
- "source_id": "com.apple.health.81AE7156-EC05-47E3-AC93-2D6F65C717DF",
- "source_name": "iPhone12.bardram.net",
- "recording_method": 2
-}
-```
-
-### Fetch health data
-
-See the example app for a showcasing of how it's done.
-
-**Note** On iOS the device must be unlocked before health data can be requested. Otherwise an error will be thrown:
-
-```bash
-flutter: Health Plugin Error:
-flutter: PlatformException(FlutterHealth, Results are null, Optional(Error Domain=com.apple.healthkit Code=6 "Protected health data is inaccessible" UserInfo={NSLocalizedDescription=Protected health data is inaccessible}))
-```
-
-### Fetch single health data by UUID
-
-In order to retrieve a single record, it is required to provide `String uuid` and `HealthDataType type`.
-
-Please see example below:
-```dart
-HealthDataPoint? healthPoint = await health.getHealthDataByUUID(
- uuid: 'random-uuid-string',
- type: HealthDataType.STEPS,
-);
-```
-```
-I/FLUTTER_HEALTH( 9161): Success: {uuid=random-uuid-string, value=12, date_from=1742259061009, date_to=1742259092888, source_id=, source_name=com.google.android.apps.fitness, recording_method=0}
-```
-> Assuming that the `uuid` and `type` are coming from your database.
-
-### Filtering by recording method
-
-Google Health Connect and Apple HealthKit both provide ways to distinguish samples collected "automatically" and manually entered data by the user.
-
-- Android provides an enum with 4 variations:
-- iOS has a boolean value:
-
-As such, when fetching data you have the option to filter the fetched data by recording method as such:
-
-```dart
-List healthData = await health.getHealthDataFromTypes(
- types: types,
- startTime: yesterday,
- endTime: now,
- recordingMethodsToFilter: [RecordingMethod.manual, RecordingMethod.unknown],
-);
-```
-
-**Note that for this to work, the information needs to have been provided when writing the data to Health Connect or Apple Health**. For example, steps added manually through the Apple Health App will set `HKWasUserEntered` to true (corresponding to `RecordingMethod.manual`), however it seems that adding steps manually to Google Fit does not write the data with the `RecordingMethod.manual` in the metadata, instead it shows up as `RecordingMethod.unknown`. This is an open issue, and as such filtering manual entries when querying step count on Android with `getTotalStepsInInterval(includeManualEntries: false)` does not necessarily filter out manual steps.
-
-**NOTE**: On iOS, you can only filter by `RecordingMethod.automatic` and `RecordingMethod.manual` as it is stored `HKMetadataKeyWasUserEntered` is a boolean value in the metadata.
-
-### Filtering out duplicates
-
-If the same data is requested multiple times and saved in the same array duplicates will occur.
-
-A single data point can be compared to each other with the == operator, i.e.
-
-```dart
-HealthDataPoint p1 = ...;
-HealthDataPoint p2 = ...;
-bool same = p1 == p2;
-```
-
-If you have a list of data points, duplicates can be removed with:
-
-```dart
-List points = ...;
-points = health.removeDuplicates(points);
-```
-
-### Android: Reading Health Data in Background
-Currently health connect allows apps to read health data in the background. In order to achieve this add the following permission to your `AndroidManifest.XML`:
-```XML
-
-
-```
-Furthermore, the plugin now exposes three new functions to help you check and request access to read data in the background:
-1. `isHealthDataInBackgroundAvailable()`: Checks if the Health Data in Background feature is available
-2. `isHealthDataInBackgroundAuthorized()`: Checks the current status of the Health Data in Background permission
-3. `requestHealthDataInBackgroundAuthorization()`: Requests the Health Data in Background permission.
-
-### Fetch single health data by UUID
-
-In order to retrieve a single record, it is required to provide `String uuid` and `HealthDataType type`.
-
-Please see example below:
-```dart
-HealthDataPoint? healthPoint = await health.getHealthDataByUUID(
- uuid: 'E9F2EEAD-8FC5-4CE5-9FF5-7C4E535FB8B8',
- type: HealthDataType.WORKOUT,
-);
-```
-```
-data by UUID: HealthDataPoint -
- uuid: E9F2EEAD-8FC5-4CE5-9FF5-7C4E535FB8B8,
- value: WorkoutHealthValue - workoutActivityType: RUNNING,
- totalEnergyBurned: null,
- totalEnergyBurnedUnit: KILOCALORIE,
- totalDistance: 2400,
- totalDistanceUnit: METER
- totalSteps: null,
- totalStepsUnit: null,
- unit: NO_UNIT,
- dateFrom: 2025-05-02 07:31:00.000,
- dateTo: 2025-05-02 08:25:00.000,
- dataType: WORKOUT,
- platform: HealthPlatformType.appleHealth,
- deviceId: unknown,
- sourceId: com.apple.Health,
- sourceName: Health
- recordingMethod: RecordingMethod.manual
- workoutSummary: WorkoutSummary - workoutType: runningtotalDistance: 2400, totalEnergyBurned: 0, totalSteps: 0
- metadata: null
- deviceModel: null
-```
-> Assuming that the `uuid` and `type` are coming from your database.
-
-
-## Data Types
-
-The plugin supports the following [`HealthDataType`](https://pub.dev/documentation/health/latest/health/HealthDataType.html).
-
-| **Data Type** | **Unit** | **Apple Health** | **Google Health Connect** | **Comments** |
-| ---------------------------- | ----------------------- | ---------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
-| ACTIVE_ENERGY_BURNED | CALORIES | yes | yes | |
-| ATRIAL_FIBRILLATION_BURDEN | PERCENTAGE | yes | | |
-| BASAL_ENERGY_BURNED | CALORIES | yes | yes | |
-| BLOOD_GLUCOSE | MILLIGRAM_PER_DECILITER | yes | yes | |
-| BLOOD_OXYGEN | PERCENTAGE | yes | yes | |
-| BLOOD_PRESSURE_DIASTOLIC | MILLIMETER_OF_MERCURY | yes | yes | |
-| BLOOD_PRESSURE_SYSTOLIC | MILLIMETER_OF_MERCURY | yes | yes | |
-| BODY_FAT_PERCENTAGE | PERCENTAGE | yes | yes | |
-| BODY_MASS_INDEX | NO_UNIT | yes | yes | |
-| BODY_TEMPERATURE | DEGREE_CELSIUS | yes | yes | |
-| BODY_WATER_MASS | KILOGRAMS | | yes | |
-| ELECTRODERMAL_ACTIVITY | SIEMENS | yes | | |
-| HEART_RATE | BEATS_PER_MINUTE | yes | yes | |
-| HEIGHT | METERS | yes | yes | |
-| RESTING_HEART_RATE | BEATS_PER_MINUTE | yes | yes | |
-| RESPIRATORY_RATE | RESPIRATIONS_PER_MINUTE | yes | yes | |
-| PERIPHERAL_PERFUSION_INDEX | PERCENTAGE | yes | | |
-| STEPS | COUNT | yes | yes | |
-| WAIST_CIRCUMFERENCE | METERS | yes | | |
-| WALKING_HEART_RATE | BEATS_PER_MINUTE | yes | | |
-| WEIGHT | KILOGRAMS | yes | yes | |
-| DISTANCE_WALKING_RUNNING | METERS | yes | | |
-| FLIGHTS_CLIMBED | COUNT | yes | yes | |
-| DISTANCE_DELTA | METERS | | yes | |
-| MINDFULNESS | MINUTES | yes | | |
-| SLEEP_ASLEEP | MINUTES | yes | yes | on iOS, this refers to asleepUnspecified, and on Android this refers to STAGE_TYPE_SLEEPING (asleep but specific stage is unknown) |
-| SLEEP_AWAKE | MINUTES | yes | yes | |
-| SLEEP_AWAKE_IN_BED | MINUTES | | yes | |
-| SLEEP_DEEP | MINUTES | yes | yes | |
-| SLEEP_IN_BED | MINUTES | yes | | |
-| SLEEP_LIGHT | MINUTES | yes | yes | on iOS, this refers to asleepCore |
-| SLEEP_OUT_OF_BED | MINUTES | | yes | |
-| SLEEP_REM | MINUTES | yes | yes | |
-| SLEEP_UNKNOWN | MINUTES | | yes | |
-| SLEEP_SESSION | MINUTES | | yes | |
-| WATER | LITER | yes | yes | |
-| EXERCISE_TIME | MINUTES | yes | | |
-| WORKOUT | NO_UNIT | yes | yes | See table below |
-| HIGH_HEART_RATE_EVENT | NO_UNIT | yes | | Requires Apple Watch to write the data |
-| LOW_HEART_RATE_EVENT | NO_UNIT | yes | | Requires Apple Watch to write the data |
-| IRREGULAR_HEART_RATE_EVENT | NO_UNIT | yes | | Requires Apple Watch to write the data |
-| HEART_RATE_VARIABILITY_RMSSD | MILLISECONDS | | yes | |
-| HEART_RATE_VARIABILITY_SDNN | MILLISECONDS | yes | | Requires Apple Watch to write the data |
-| HEADACHE_NOT_PRESENT | MINUTES | yes | | |
-| HEADACHE_MILD | MINUTES | yes | | |
-| HEADACHE_MODERATE | MINUTES | yes | | |
-| HEADACHE_SEVERE | MINUTES | yes | | |
-| HEADACHE_UNSPECIFIED | MINUTES | yes | | |
-| AUDIOGRAM | DECIBEL_HEARING_LEVEL | yes | | |
-| ELECTROCARDIOGRAM | VOLT | yes | | Requires Apple Watch to write the data |
-| NUTRITION | NO_UNIT | yes | yes | |
-| INSULIN_DELIVERY | INTERNATIONAL_UNIT | yes | | |
-| MENSTRUATION_FLOW | NO_UNIT | yes | yes | |
-| WATER_TEMPERATURE | DEGREE_CELSIUS | yes | | Related to/Requires Apple Watch Ultra's Underwater Diving Workout |
-| UNDERWATER_DEPTH | METER | yes | | Related to/Requires Apple Watch Ultra's Underwater Diving Workout |
-| UV_INDEX | COUNT | yes | | |
-| LEAN_BODY_MASS | KILOGRAMS | yes | yes | |
-| WALKING_SPEED | METER_PER_SECOND | yes | (yes) | On Android this will be recorded as `SPEED` with similar unit |
-| APPLE_MOVE_TIME | SECOND | yes | | READ Only |
-| APPLE_STAND_HOUR | HOUR | yes | | READ Only |
-| APPLE_MOVE_TIME | SECOND | yes | | READ Only |
-
-## Workout Types
-
-The plugin supports the following [`HealthWorkoutActivityType`](https://pub.dev/documentation/health/latest/health/HealthWorkoutActivityType.html).
-
-| **Workout Type** | **Apple Health** | **Google Health Connect** | **Comments** |
-| -------------------------------- | ---------------- | ------------------------- | ----------------------------------------------------------------------------------------------- |
-| AMERICAN_FOOTBALL | yes | yes | |
-| ARCHERY | yes | | |
-| AUSTRALIAN_FOOTBALL | yes | yes | |
-| BADMINTON | yes | yes | |
-| BARRE | yes | | |
-| BASEBALL | yes | yes | |
-| BASKETBALL | yes | yes | |
-| BIKING | yes | yes | on iOS this is CYCLING, but name changed here to fit with Android |
-| BOWLING | yes | | |
-| BOXING | yes | yes | |
-| CALISTHENICS | | yes | |
-| CARDIO_DANCE | yes | (yes) | on Android this will be stored as DANCING |
-| CLIMBING | yes | | |
-| COOLDOWN | yes | | |
-| CORE_TRAINING | yes | | |
-| CRICKET | yes | yes | |
-| CROSS_COUNTRY_SKIING | yes | (yes) | on Android this will be stored as SKIING |
-| CROSS_TRAINING | yes | | |
-| CURLING | yes | | |
-| DANCING | yes | yes | on iOS this is DANCE, but name changed here to fit with Android |
-| DISC_SPORTS | yes | | |
-| DOWNHILL_SKIING | yes | (yes) | on Android this will be stored as SKIING |
-| ELLIPTICAL | yes | yes | |
-| EQUESTRIAN_SPORTS | yes | | |
-| FENCING | yes | yes | |
-| FISHING | yes | | |
-| FITNESS_GAMING | yes | | |
-| FLEXIBILITY | yes | | |
-| FRISBEE_DISC | | yes | |
-| FUNCTIONAL_STRENGTH_TRAINING | yes | (yes) | on Android this will be stored as STRENGTH_TRAINING |
-| GOLF | yes | yes | |
-| GUIDED_BREATHING | | yes | |
-| GYMNASTICS | yes | yes | |
-| HAND_CYCLING | yes | | |
-| HANDBALL | yes | yes | |
-| HIGH_INTENSITY_INTERVAL_TRAINING | yes | yes | |
-| HIKING | yes | yes | |
-| HOCKEY | yes | | |
-| HUNTING | yes | | |
-| JUMP_ROPE | yes | | |
-| KICKBOXING | yes | | |
-| LACROSSE | yes | | |
-| MARTIAL_ARTS | yes | yes | |
-| MIND_AND_BODY | yes | | |
-| MIXED_CARDIO | yes | | |
-| PADDLE_SPORTS | yes | | |
-| PARAGLIDING | | yes | |
-| PICKLEBALL | yes | | |
-| PILATES | yes | yes | |
-| PLAY | yes | | |
-| PREPARATION_AND_RECOVERY | yes | | |
-| RACQUETBALL | yes | yes | |
-| ROCK_CLIMBING | (yes) | yes | on iOS this will be stored as CLIMBING |
-| ROWING | yes | yes | |
-| RUGBY | yes | yes | |
-| RUNNING | yes | yes | |
-| RUNNING_TREADMILL | (yes) | yes | on iOS this will be stored as RUNNING |
-| SAILING | yes | yes | |
-| SCUBA_DIVING | | yes | |
-| SKATING | yes | yes | On iOS this will be stored as SKATING_SPORTS |
-| SKIING | (yes) | yes | on iOS you have to choose between CROSS_COUNTRY_SKIING and DOWNHILL_SKIING |
-| SNOW_SPORTS | yes | | |
-| SNOWBOARDING | yes | yes | |
-| SOCCER | yes | | |
-| SOCIAL_DANCE | yes | (yes) | on Android this will be stored as DANCING |
-| SOFTBALL | yes | yes | |
-| SQUASH | yes | yes | |
-| STAIR_CLIMBING | yes | yes | |
-| STAIR_CLIMBING_MACHINE | | yes | |
-| STAIRS | yes | | |
-| STEP_TRAINING | yes | | |
-| STRENGTH_TRAINING | (yes) | yes | on iOS you have to choose between FUNCTIONAL_STRENGTH_TRAINING or TRADITIONAL_STRENGTH_TRAINING |
-| SURFING | yes | yes | on iOS this is SURFING_SPORTS, but name changed here to fit with Android |
-| SWIMMING | yes | (yes) | on Android you have to choose between SWIMMING_OPEN_WATER and SWIMMING_POOL |
-| SWIMMING_OPEN_WATER | (yes) | yes | on iOS this will be stored as SWIMMING |
-| SWIMMING_POOL | (yes) | yes | on iOS this will be stored as SWIMMING |
-| TABLE_TENNIS | yes | yes | |
-| TAI_CHI | yes | | |
-| TENNIS | yes | yes | |
-| TRACK_AND_FIELD | yes | | |
-| TRADITIONAL_STRENGTH_TRAINING | yes | (yes) | on Android this will be stored as STRENGTH_TRAINING |
-| UNDERWATER_DIVING | yes | | |
-| VOLLEYBALL | yes | yes | |
-| WALKING | yes | yes | |
-| WATER_FITNESS | yes | | |
-| WATER_POLO | yes | yes | |
-| WATER_SPORTS | yes | | |
-| WEIGHTLIFTING | | yes | |
-| WHEELCHAIR | (yes) | yes | on iOS you have to choose between WHEELCHAIR_RUN_PACE or WHEELCHAIR_WALK_PACE |
-| WHEELCHAIR_RUN_PACE | yes | (yes) | on Android this will be stored as WHEELCHAIR |
-| WHEELCHAIR_WALK_PACE | yes | (yes) | on Android this will be stored as WHEELCHAIR |
-| WRESTLING | yes | | |
-| YOGA | yes | yes | |
-| OTHER | yes | yes | |
-
-## License
-
-This software is copyright (c) the [Technical University of Denmark (DTU)](https://www.dtu.dk) and is part of the [Copenhagen Research Platform](https://carp.cachet.dk/).
-This software is available 'as-is' under a [MIT license](LICENSE).
diff --git a/packages/health/analysis_options.yaml b/packages/health/analysis_options.yaml
deleted file mode 100644
index 9565468ca..000000000
--- a/packages/health/analysis_options.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
-# Additional information about this file can be found at
-# https://dart.dev/guides/language/analysis-options
-
-include: package:flutter_lints/flutter.yaml
-
-analyzer:
- exclude: [build/**]
- language:
- strict-casts: true
- strict-inference: true
- strict-raw-types: true
-
-linter:
- rules:
- cancel_subscriptions: true
- constant_identifier_names: false
- depend_on_referenced_packages: true
- avoid_print: true
- use_string_in_part_of_directives: true
diff --git a/packages/health/android/build.gradle b/packages/health/android/build.gradle
deleted file mode 100644
index b4194b9dc..000000000
--- a/packages/health/android/build.gradle
+++ /dev/null
@@ -1,61 +0,0 @@
-group 'cachet.plugins.health'
-version '1.2'
-
-buildscript {
- ext.kotlin_version = '1.9.22'
- repositories {
- google()
- mavenCentral()
- }
-
- dependencies {
- classpath 'com.android.tools.build:gradle:8.13.0'
- classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
- }
-}
-
-rootProject.allprojects {
- repositories {
- google()
- mavenCentral()
- }
-}
-
-apply plugin: 'com.android.library'
-apply plugin: 'kotlin-android'
-
-android {
- compileSdk 36
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_11
- targetCompatibility JavaVersion.VERSION_11
- }
-
- kotlinOptions {
- jvmTarget = '11'
- }
-
- sourceSets {
- main.java.srcDirs += 'src/main/kotlin'
- }
- defaultConfig {
- minSdkVersion 26
- targetSdkVersion 36
- testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
- }
- lintOptions {
- disable 'InvalidPackage'
- }
- namespace "cachet.plugins.health"
-}
-
-dependencies {
- def composeBom = platform('androidx.compose:compose-bom:2025.09.00')
- implementation(composeBom)
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:2.2.10"
-
- implementation("androidx.health.connect:connect-client:1.1.0-rc03")
- implementation "androidx.fragment:fragment-ktx:1.8.9"
-
-}
diff --git a/packages/health/android/gradle.properties b/packages/health/android/gradle.properties
deleted file mode 100644
index 678cd6244..000000000
--- a/packages/health/android/gradle.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-org.gradle.jvmargs=-Xmx1536M
-android.enableJetifier=true
-android.useAndroidX=true
\ No newline at end of file
diff --git a/packages/health/android/gradle/wrapper/gradle-wrapper.properties b/packages/health/android/gradle/wrapper/gradle-wrapper.properties
deleted file mode 100644
index cb3cdef9c..000000000
--- a/packages/health/android/gradle/wrapper/gradle-wrapper.properties
+++ /dev/null
@@ -1,6 +0,0 @@
-#Tue Sep 16 09:25:00 CEST 2025
-distributionBase=GRADLE_USER_HOME
-distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
-zipStoreBase=GRADLE_USER_HOME
-zipStorePath=wrapper/dists
diff --git a/packages/health/android/settings.gradle b/packages/health/android/settings.gradle
deleted file mode 100644
index aa2aa6bd5..000000000
--- a/packages/health/android/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-rootProject.name = 'health'
diff --git a/packages/health/android/src/main/AndroidManifest.xml b/packages/health/android/src/main/AndroidManifest.xml
deleted file mode 100644
index a2f47b605..000000000
--- a/packages/health/android/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/packages/health/android/src/main/kotlin/cachet/plugins/health/HealthConstants.kt b/packages/health/android/src/main/kotlin/cachet/plugins/health/HealthConstants.kt
deleted file mode 100644
index 697f33ae5..000000000
--- a/packages/health/android/src/main/kotlin/cachet/plugins/health/HealthConstants.kt
+++ /dev/null
@@ -1,241 +0,0 @@
-package cachet.plugins.health
-
-import kotlin.reflect.KClass
-import androidx.health.connect.client.records.*
-import androidx.health.connect.client.records.MealType
-
-/**
- * Contains all data type mappings, health record classifications, and type conversions
- * used throughout the Health Connect integration.
- */
-object HealthConstants {
- // Channel name
- const val CHANNEL_NAME = "flutter_health"
-
- // Data type constants
- const val ACTIVE_ENERGY_BURNED = "ACTIVE_ENERGY_BURNED"
- const val AGGREGATE_STEP_COUNT = "AGGREGATE_STEP_COUNT"
- const val BASAL_ENERGY_BURNED = "BASAL_ENERGY_BURNED"
- const val BLOOD_GLUCOSE = "BLOOD_GLUCOSE"
- const val BLOOD_OXYGEN = "BLOOD_OXYGEN"
- const val BLOOD_PRESSURE_DIASTOLIC = "BLOOD_PRESSURE_DIASTOLIC"
- const val BLOOD_PRESSURE_SYSTOLIC = "BLOOD_PRESSURE_SYSTOLIC"
- const val BODY_FAT_PERCENTAGE = "BODY_FAT_PERCENTAGE"
- const val LEAN_BODY_MASS = "LEAN_BODY_MASS"
- const val BODY_TEMPERATURE = "BODY_TEMPERATURE"
- const val BODY_WATER_MASS = "BODY_WATER_MASS"
- const val DISTANCE_DELTA = "DISTANCE_DELTA"
- const val FLIGHTS_CLIMBED = "FLIGHTS_CLIMBED"
- const val HEART_RATE = "HEART_RATE"
- const val HEART_RATE_VARIABILITY_RMSSD = "HEART_RATE_VARIABILITY_RMSSD"
- const val HEIGHT = "HEIGHT"
- const val MENSTRUATION_FLOW = "MENSTRUATION_FLOW"
- const val RESPIRATORY_RATE = "RESPIRATORY_RATE"
- const val RESTING_HEART_RATE = "RESTING_HEART_RATE"
- const val STEPS = "STEPS"
- const val WATER = "WATER"
- const val WEIGHT = "WEIGHT"
- const val TOTAL_CALORIES_BURNED = "TOTAL_CALORIES_BURNED"
- const val SPEED = "SPEED"
-
- // Meal types
- const val BREAKFAST = "BREAKFAST"
- const val DINNER = "DINNER"
- const val LUNCH = "LUNCH"
- const val MEAL_UNKNOWN = "UNKNOWN"
- const val NUTRITION = "NUTRITION"
- const val SNACK = "SNACK"
-
- // Sleep types
- const val SLEEP_ASLEEP = "SLEEP_ASLEEP"
- const val SLEEP_AWAKE = "SLEEP_AWAKE"
- const val SLEEP_AWAKE_IN_BED = "SLEEP_AWAKE_IN_BED"
- const val SLEEP_DEEP = "SLEEP_DEEP"
- const val SLEEP_IN_BED = "SLEEP_IN_BED"
- const val SLEEP_LIGHT = "SLEEP_LIGHT"
- const val SLEEP_OUT_OF_BED = "SLEEP_OUT_OF_BED"
- const val SLEEP_REM = "SLEEP_REM"
- const val SLEEP_SESSION = "SLEEP_SESSION"
- const val SLEEP_UNKNOWN = "SLEEP_UNKNOWN"
-
- // Activity type
- const val WORKOUT = "WORKOUT"
-
- /**
- * Maps Flutter health data type strings to their corresponding Health Connect Record classes.
- * This mapping enables dynamic type resolution for reading and writing health data.
- *
- * @return Map> Mapping of type strings to Health Connect record classes
- */
- val mapToType: Map> = hashMapOf(
- BODY_FAT_PERCENTAGE to BodyFatRecord::class,
- LEAN_BODY_MASS to LeanBodyMassRecord::class,
- HEIGHT to HeightRecord::class,
- WEIGHT to WeightRecord::class,
- STEPS to StepsRecord::class,
- AGGREGATE_STEP_COUNT to StepsRecord::class,
- ACTIVE_ENERGY_BURNED to ActiveCaloriesBurnedRecord::class,
- HEART_RATE to HeartRateRecord::class,
- BODY_TEMPERATURE to BodyTemperatureRecord::class,
- BODY_WATER_MASS to BodyWaterMassRecord::class,
- BLOOD_PRESSURE_SYSTOLIC to BloodPressureRecord::class,
- BLOOD_PRESSURE_DIASTOLIC to BloodPressureRecord::class,
- BLOOD_OXYGEN to OxygenSaturationRecord::class,
- BLOOD_GLUCOSE to BloodGlucoseRecord::class,
- HEART_RATE_VARIABILITY_RMSSD to HeartRateVariabilityRmssdRecord::class,
- DISTANCE_DELTA to DistanceRecord::class,
- WATER to HydrationRecord::class,
- SLEEP_ASLEEP to SleepSessionRecord::class,
- SLEEP_AWAKE to SleepSessionRecord::class,
- SLEEP_AWAKE_IN_BED to SleepSessionRecord::class,
- SLEEP_LIGHT to SleepSessionRecord::class,
- SLEEP_DEEP to SleepSessionRecord::class,
- SLEEP_REM to SleepSessionRecord::class,
- SLEEP_OUT_OF_BED to SleepSessionRecord::class,
- SLEEP_SESSION to SleepSessionRecord::class,
- SLEEP_UNKNOWN to SleepSessionRecord::class,
- WORKOUT to ExerciseSessionRecord::class,
- NUTRITION to NutritionRecord::class,
- RESTING_HEART_RATE to RestingHeartRateRecord::class,
- BASAL_ENERGY_BURNED to BasalMetabolicRateRecord::class,
- FLIGHTS_CLIMBED to FloorsClimbedRecord::class,
- RESPIRATORY_RATE to RespiratoryRateRecord::class,
- TOTAL_CALORIES_BURNED to TotalCaloriesBurnedRecord::class,
- MENSTRUATION_FLOW to MenstruationFlowRecord::class,
- SPEED to SpeedRecord::class,
- )
-
- /**
- * Maps health data types to their corresponding aggregate metric types for batch operations.
- * Used when requesting aggregated data over time periods.
- *
- * @return Map Mapping for aggregate data queries
- */
- val mapToAggregateMetric = hashMapOf(
- HEIGHT to HeightRecord.HEIGHT_AVG,
- WEIGHT to WeightRecord.WEIGHT_AVG,
- STEPS to StepsRecord.COUNT_TOTAL,
- AGGREGATE_STEP_COUNT to StepsRecord.COUNT_TOTAL,
- ACTIVE_ENERGY_BURNED to ActiveCaloriesBurnedRecord.ACTIVE_CALORIES_TOTAL,
- HEART_RATE to HeartRateRecord.MEASUREMENTS_COUNT,
- DISTANCE_DELTA to DistanceRecord.DISTANCE_TOTAL,
- WATER to HydrationRecord.VOLUME_TOTAL,
- SLEEP_ASLEEP to SleepSessionRecord.SLEEP_DURATION_TOTAL,
- SLEEP_AWAKE to SleepSessionRecord.SLEEP_DURATION_TOTAL,
- SLEEP_IN_BED to SleepSessionRecord.SLEEP_DURATION_TOTAL,
- TOTAL_CALORIES_BURNED to TotalCaloriesBurnedRecord.ENERGY_TOTAL
- )
-
- /**
- * Maps integer sleep stage values to their corresponding data type strings.
- * Converts Health Connect sleep stage enumeration to Flutter-friendly string constants.
- *
- * @return Map Sleep stage integer to type string mapping
- */
- val mapSleepStageToType = hashMapOf(
- 0 to SLEEP_UNKNOWN,
- 1 to SLEEP_AWAKE,
- 2 to SLEEP_ASLEEP,
- 3 to SLEEP_OUT_OF_BED,
- 4 to SLEEP_LIGHT,
- 5 to SLEEP_DEEP,
- 6 to SLEEP_REM,
- 7 to SLEEP_AWAKE_IN_BED
- )
-
- /**
- * Maps meal type strings to Health Connect MealType enumeration values.
- * Enables conversion from Flutter meal type strings to Health Connect types.
- *
- * @return Map Meal type string to enum mapping
- */
- val mapMealTypeToType = hashMapOf(
- BREAKFAST to MealType.MEAL_TYPE_BREAKFAST,
- LUNCH to MealType.MEAL_TYPE_LUNCH,
- DINNER to MealType.MEAL_TYPE_DINNER,
- SNACK to MealType.MEAL_TYPE_SNACK,
- MEAL_UNKNOWN to MealType.MEAL_TYPE_UNKNOWN,
- )
-
- /**
- * Maps Health Connect MealType enumeration values back to Flutter string constants.
- * Used for converting Health Connect meal types to Flutter-compatible format.
- *
- * @return Map Enum to string mapping for meal types
- */
- val mapTypeToMealType = hashMapOf(
- MealType.MEAL_TYPE_BREAKFAST to BREAKFAST,
- MealType.MEAL_TYPE_LUNCH to LUNCH,
- MealType.MEAL_TYPE_DINNER to DINNER,
- MealType.MEAL_TYPE_SNACK to SNACK,
- MealType.MEAL_TYPE_UNKNOWN to MEAL_UNKNOWN,
- )
-
- /**
- * Maps workout/exercise type strings to Health Connect ExerciseSessionRecord types.
- * Comprehensive mapping of all supported exercise activities for workout tracking.
- *
- * @return Map Workout type strings to Health Connect exercise type constants
- */
- val workoutTypeMap = mapOf(
- "AMERICAN_FOOTBALL" to ExerciseSessionRecord.EXERCISE_TYPE_FOOTBALL_AMERICAN,
- "AUSTRALIAN_FOOTBALL" to ExerciseSessionRecord.EXERCISE_TYPE_FOOTBALL_AUSTRALIAN,
- "BADMINTON" to ExerciseSessionRecord.EXERCISE_TYPE_BADMINTON,
- "BASEBALL" to ExerciseSessionRecord.EXERCISE_TYPE_BASEBALL,
- "BASKETBALL" to ExerciseSessionRecord.EXERCISE_TYPE_BASKETBALL,
- "BIKING" to ExerciseSessionRecord.EXERCISE_TYPE_BIKING,
- "BOXING" to ExerciseSessionRecord.EXERCISE_TYPE_BOXING,
- "CALISTHENICS" to ExerciseSessionRecord.EXERCISE_TYPE_CALISTHENICS,
- "CARDIO_DANCE" to ExerciseSessionRecord.EXERCISE_TYPE_DANCING,
- "CRICKET" to ExerciseSessionRecord.EXERCISE_TYPE_CRICKET,
- "CROSS_COUNTRY_SKIING" to ExerciseSessionRecord.EXERCISE_TYPE_SKIING,
- "DANCING" to ExerciseSessionRecord.EXERCISE_TYPE_DANCING,
- "DOWNHILL_SKIING" to ExerciseSessionRecord.EXERCISE_TYPE_SKIING,
- "ELLIPTICAL" to ExerciseSessionRecord.EXERCISE_TYPE_ELLIPTICAL,
- "FENCING" to ExerciseSessionRecord.EXERCISE_TYPE_FENCING,
- "FRISBEE_DISC" to ExerciseSessionRecord.EXERCISE_TYPE_FRISBEE_DISC,
- "GOLF" to ExerciseSessionRecord.EXERCISE_TYPE_GOLF,
- "GUIDED_BREATHING" to ExerciseSessionRecord.EXERCISE_TYPE_GUIDED_BREATHING,
- "GYMNASTICS" to ExerciseSessionRecord.EXERCISE_TYPE_GYMNASTICS,
- "HANDBALL" to ExerciseSessionRecord.EXERCISE_TYPE_HANDBALL,
- "HIGH_INTENSITY_INTERVAL_TRAINING" to ExerciseSessionRecord.EXERCISE_TYPE_HIGH_INTENSITY_INTERVAL_TRAINING,
- "HIKING" to ExerciseSessionRecord.EXERCISE_TYPE_HIKING,
- "ICE_SKATING" to ExerciseSessionRecord.EXERCISE_TYPE_ICE_SKATING,
- "MARTIAL_ARTS" to ExerciseSessionRecord.EXERCISE_TYPE_MARTIAL_ARTS,
- "PARAGLIDING" to ExerciseSessionRecord.EXERCISE_TYPE_PARAGLIDING,
- "PILATES" to ExerciseSessionRecord.EXERCISE_TYPE_PILATES,
- "RACQUETBALL" to ExerciseSessionRecord.EXERCISE_TYPE_RACQUETBALL,
- "ROCK_CLIMBING" to ExerciseSessionRecord.EXERCISE_TYPE_ROCK_CLIMBING,
- "ROWING" to ExerciseSessionRecord.EXERCISE_TYPE_ROWING,
- "ROWING_MACHINE" to ExerciseSessionRecord.EXERCISE_TYPE_ROWING_MACHINE,
- "RUGBY" to ExerciseSessionRecord.EXERCISE_TYPE_RUGBY,
- "RUNNING_TREADMILL" to ExerciseSessionRecord.EXERCISE_TYPE_RUNNING_TREADMILL,
- "RUNNING" to ExerciseSessionRecord.EXERCISE_TYPE_RUNNING,
- "SAILING" to ExerciseSessionRecord.EXERCISE_TYPE_SAILING,
- "SCUBA_DIVING" to ExerciseSessionRecord.EXERCISE_TYPE_SCUBA_DIVING,
- "SKATING" to ExerciseSessionRecord.EXERCISE_TYPE_SKATING,
- "SKIING" to ExerciseSessionRecord.EXERCISE_TYPE_SKIING,
- "SNOWBOARDING" to ExerciseSessionRecord.EXERCISE_TYPE_SNOWBOARDING,
- "SNOWSHOEING" to ExerciseSessionRecord.EXERCISE_TYPE_SNOWSHOEING,
- "SOCIAL_DANCE" to ExerciseSessionRecord.EXERCISE_TYPE_DANCING,
- "SOFTBALL" to ExerciseSessionRecord.EXERCISE_TYPE_SOFTBALL,
- "SQUASH" to ExerciseSessionRecord.EXERCISE_TYPE_SQUASH,
- "STAIR_CLIMBING_MACHINE" to ExerciseSessionRecord.EXERCISE_TYPE_STAIR_CLIMBING_MACHINE,
- "STAIR_CLIMBING" to ExerciseSessionRecord.EXERCISE_TYPE_STAIR_CLIMBING,
- "STRENGTH_TRAINING" to ExerciseSessionRecord.EXERCISE_TYPE_STRENGTH_TRAINING,
- "SURFING" to ExerciseSessionRecord.EXERCISE_TYPE_SURFING,
- "SWIMMING_OPEN_WATER" to ExerciseSessionRecord.EXERCISE_TYPE_SWIMMING_OPEN_WATER,
- "SWIMMING_POOL" to ExerciseSessionRecord.EXERCISE_TYPE_SWIMMING_POOL,
- "TABLE_TENNIS" to ExerciseSessionRecord.EXERCISE_TYPE_TABLE_TENNIS,
- "TENNIS" to ExerciseSessionRecord.EXERCISE_TYPE_TENNIS,
- "VOLLEYBALL" to ExerciseSessionRecord.EXERCISE_TYPE_VOLLEYBALL,
- "WALKING" to ExerciseSessionRecord.EXERCISE_TYPE_WALKING,
- "WATER_POLO" to ExerciseSessionRecord.EXERCISE_TYPE_WATER_POLO,
- "WEIGHTLIFTING" to ExerciseSessionRecord.EXERCISE_TYPE_WEIGHTLIFTING,
- "WHEELCHAIR" to ExerciseSessionRecord.EXERCISE_TYPE_WHEELCHAIR,
- "WHEELCHAIR_RUN_PACE" to ExerciseSessionRecord.EXERCISE_TYPE_WHEELCHAIR,
- "WHEELCHAIR_WALK_PACE" to ExerciseSessionRecord.EXERCISE_TYPE_WHEELCHAIR,
- "YOGA" to ExerciseSessionRecord.EXERCISE_TYPE_YOGA,
- "OTHER" to ExerciseSessionRecord.EXERCISE_TYPE_OTHER_WORKOUT,
- )
-}
\ No newline at end of file
diff --git a/packages/health/android/src/main/kotlin/cachet/plugins/health/HealthDataConverter.kt b/packages/health/android/src/main/kotlin/cachet/plugins/health/HealthDataConverter.kt
deleted file mode 100644
index 6d288170b..000000000
--- a/packages/health/android/src/main/kotlin/cachet/plugins/health/HealthDataConverter.kt
+++ /dev/null
@@ -1,258 +0,0 @@
-package cachet.plugins.health
-
-import java.time.Instant
-import java.time.temporal.ChronoUnit
-import androidx.health.connect.client.records.*
-import androidx.health.connect.client.records.metadata.Metadata
-
-/**
- * Converts Health Connect records to Flutter-compatible data structures.
- * Handles the transformation of strongly-typed Health Connect data into generic maps
- * that can be serialized and passed to the Flutter layer.
- */
-class HealthDataConverter {
-
- /**
- * Converts a Health Connect record to a list of Flutter-compatible maps.
- * Handles various record types including instant records, interval records, and complex types.
- *
- * @param record The Health Connect record to convert
- * @param dataType The string identifier for the data type being converted
- * @return List