Our Flutter Health package, available on pub.dev, allows developers to integrate health and fitness data from multiple platforms in their apps, such as Apple HealthKit on iOS, Google Health Connect, and – previously – Google Fit. It provides a unified API for reading and writing various types of health data, including workouts, heart rate, sleep stages, blood oxygen levels, and more.
The Health package has recently undergone significant updates, improving cross-platform health data integration while introducing breaking changes. In this post, we’ll walk through the key updates from the latest release.
Google Fit Support has been Removed
Following Google’s announcement that Google Fit APIs will be turned down in June 2025, we previously announced our intention to remove support for it in our package. This is the most major breaking change in the new release, and below we break down some of the changes that were made:
- Google Fit-related dependencies have been entirely removed. We have removed some functionality which is no longer relevant, including the
useHealthConnectIfAvailable
option when initializing the client, thedisconnect
method which was used to disconnect from Google Fit - Google Fit-specific health workout activities that don’t have suitable alternatives in Health Connect have also been removed. The full list of removed activities can be found in PR #1014.
Improved Support for Recording Methods
iOS and Android both provide metadata in their health records on how the record was recorded, i.e. automatically or passively detected (such as the step count feature found on both iOS and Android), or manually added by the user. Health Connect provides two additional recording methods: “actively recorded” and “unknown”.
The Health package update introduces a new RecordingMethod
enum, bringing more flexibility in how health data is recorded and queried.
- You can now filter records by automatic or manual entries when fetching data.
- You can also specify the recording method when writing data.
- The
isManualEntry
field has been replaced byrecordingMethod
in theHealthDataPoint
, and includes the metadata across all records on Health Connect and HealthKit (when available). - The
includeManualEntry
boolean has been removed and replaced withrecordingMethodsToFilter
, and developers can provide a list ofRecordingMethods
they don’t want to query.
For full details, you can check the corresponding PR #1023.
Expanded Sleep Stage Support
The latest version adds support for all sleep stages across both iOS and Android platforms. This ensures developers can track and analyze sleep data more accurately. Along with this, some undocumented sleep stages were cleaned up or removed to simplify the API.
However, note that certain sleep stages have been removed or combined into other related stages for consistency. The full breakdown of these changes can be found in PR #1026.
Miscellaneous Enhancements
The update also brings additional quality of life improvements, such as:
- Improved support for workout types, such as
OTHER
workout type on Android, and where possible, certain workout types were combined to provide a consistent API when querying on both iOS and Android. (PR #1020) - Menstruation Flow: iOS now supports menstruation flow tracking.
- Heart Rate Variability: On Android, the package now supports heart rate variability tracking. (PR #1009)
- Atrial Fibrillation Burden: iOS now supports tracking of atrial fibrillation burden. (PR #1031)
- Platform-generated UUIDs are now supported in health records for both HealthKit and Health Connect, making it easier to track unique records across platforms.
- The Android code has undergone a significant cleanup, and we hope that this encourages contributions from the community.
These changes mark a significant evolution of the Flutter Health package, with a cleaned up API, better support for sleep tracking, and additional health metrics, and we recommend upgrading to take advantage of the added functionality.
We’d like to give a big thank you to everyone who opened issues, submitted pull requests, and helped shape the package—your input continues to play a crucial role in making this project better for everyone!
The complete changelog can be found here.