health_kit_reporter
3.0.0, released 6 weeks ago by victorkachalov.com
Flutter wrapper for Apple Health through HealthKit and Swift Package Manager.
What it does
Reads, writes, and observes Apple Health data on iOS by wrapping the Swift library HealthKitReporter. Parses all payloads from JSON into typed Dart models.
AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to read or write Apple Health data in a Flutter iOS application.
- You want to observe data changes or handle clinical records and workouts.
Skip it when
- Your app targets Android or platforms other than iOS where Apple Health is unavailable.
- You want to use CocoaPods instead of Swift Package Manager.
Strengths
- Comprehensive coverage of HealthKit features including clinical records, workouts, and queries.
- Maintains up-to-date parity with the HealthKitReporter Swift library.
Weaknesses
- iOS only, requiring manual configuration of capabilities, entitlements, and usage descriptions.
- Requires Swift Package Manager and iOS 15 or newer.
Setup
- Kind
- Plugin (native code)
- Effort
- High
- Code generation
- No
- Direct dependencies
- 0
Requires enabling Swift Package Manager in Flutter, setting iOS deployment target to 15.0 or newer, configuring HealthKit capabilities and entitlements in Xcode, and adding usage descriptions to Info.plist.
Future<bool> requestAuthorization() async {
final readTypes = QuantityType.values.map((e) => e.identifier).toList();
final writeTypes = <String>[];
for (final identifier in readTypes) {
if (await HealthKitReporter.isWritable(identifier)) {
writeTypes.add(identifier);
}
}
return HealthKitReporter.requestAuthorization(readTypes, writeTypes);
}Alternatives
Packages that do the same job and could replace health_kit_reporter.
- health
Wrapper for Apple HealthKit and Google Health Connect for reading and writing health data.
94Compare - flutter_nfc_kit
NFC functionality plugin for Android, iOS and Web, supporting NDEF records and APDU transceive.
89Compare - open_wearables_health_sdk
Flutter SDK for background health data sync from Apple HealthKit and Samsung/Health Connect.
74Compare - health_connector_hc_android
Android implementation of the health_connector plugin using Health Connect SDK.
74Compare