health_connector
3.14.1, released 10 days ago by phamtunglam.com
Flutter health SDK for iOS HealthKit and Android Health Connect integration.
What it does
Provides an interface to read, write, delete, update, aggregate, and synchronize health and fitness data across iOS and Android health platforms. Offers type safety for typed health data types.
AI-written summary of version 3.14.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to integrate Apple HealthKit in an iOS app.
- You need to integrate Android Health Connect in an Android app.
- Your app requires reading or writing typed health records such as steps, heart rate, or sleep.
Skip it when
- Your app does not require health or fitness data integration.
- You require cross-platform health user profile features that must work identically on Android (which does not provide a user health profile API here).
Strengths
- Supports 143 typed health data types with compile-time type safety.
- Handles incremental data synchronization and privacy-first architecture.
- Covers both iOS HealthKit and Android Health Connect natively.
Weaknesses
- Requires manual platform configuration on both Android (Manifest changes, custom MainActivity, Gradle settings) and iOS (Capabilities, Info.plist usage descriptions).
- Some features like user characteristic reads are restricted to iOS.
Setup
- Kind
- Flutter widgets
- Effort
- High
- Code generation
- No
- Direct dependencies
- 5
Requires setting minimum SDK versions, enabling AndroidX and Jetifier, configuring compileSdkExtension 19, updating AndroidManifest.xml and MainActivity, plus enabling HealthKit capability and adding usage descriptions in iOS Info.plist.
import 'package:health_connector/health_connector.dart';
Future<void> quickStart() async {
final status = await HealthConnector.getHealthPlatformStatus();
if (status != HealthPlatformStatus.available) return;
final connector = await HealthConnector.create(
const HealthConnectorConfig(
loggerConfig: HealthConnectorLoggerConfig(
logProcessors: [PrintLogProcessor()],
),
),
);
final results = await connector.requestPermissions([
HealthDataType.steps.readPermission,
HealthDataType.steps.writePermission,
]);
}Alternatives
Packages that do the same job and could replace health_connector.
- health
Wrapper for Apple HealthKit and Google Health Connect for reading and writing health data.
94Compare - inappstory_plugin
A Flutter plugin to use InAppStory SDK. Supports Android and iOS platforms.
75Compare - open_wearables_health_sdk
Flutter SDK for background health data sync from Apple HealthKit and Samsung/Health Connect.
74Compare - flutter_rustore_update
Flutter RuStore Update SDK.
75Compare
Works with
Packages commonly used together with health_connector: ones it builds on, ones built on it, and its own family.