Skip to content

Requirements ​

Version floors for the current release, and what each one is actually for.

Toolchain ​

ComponentRequirement
Flutter≥ 3.38.0 (declared as flutter: '>=3.38.0')
Dart^3.10.0 (declared in the package's pubspec.yaml); Flutter 3.38.0 ships Dart 3.10.0
Android OSAPI 26+ (Android 8.0) at build time
Kotlin2.1.0
Java17
iOS15.0+
Swift5.9

The Flutter floor is enforced by pub, not advisory

The package declares flutter: '>=3.38.0', so pub get fails outright on Flutter 3.35.x and older — there is no way to use this package on an older Flutter.

The Dart constraint ^3.10.0 moves with it: Flutter 3.38.0 is the first stable release that ships Dart 3.10.0, so upgrading Flutter satisfies both floors at once. Swift 5.9 accepts Swift 5.0 code and Kotlin 2.1 accepts Kotlin 2.0, so the native side is a version bump in your build files.

Android build configuration ​

SettingValueWhy
minSdkVersion26Compile floor of the Health Connect client library
compileSdkExtension19Required by Health Connect 1.2.0-alpha03, which Health Connector SDK v3.9.0+ builds against
android.useAndroidXtrueHealth Connect is built on AndroidX
android.enableJetifieromitDeprecated; only needed for legacy support-library dependencies
MainActivity base classFlutterFragmentActivityPermission requests use registerForActivityResult, which needs a FragmentActivity host
groovy
android {
    compileSdkExtension 19

    defaultConfig {
        minSdkVersion 26
    }
}

compileSdkExtension 19 is not the same as SDK Extension 21

Extension 19 satisfies the build. Writing ExerciseSessionSegmentEvent.weight, .setIndex, or .rateOfPerceivedExertion separately requires the device's Health Connect Mainline module to be at Extension 21, checked at runtime. Details.

iOS build configuration ​

SettingValueWhy
Minimum Deployments15.0SDK floor
HealthKit capabilityEnabledRequired entitlement
NSHealthShareUsageDescriptionSpecific stringShown when requesting read access
NSHealthUpdateUsageDescriptionSpecific stringShown when requesting write access

Some data types require newer iOS versions than 15.0. Their healthPlatformRequirements expose the exact floor and operations throw below it.

Runtime availability ​

Meeting the build requirements does not guarantee a usable health store. Always check first:

dart
final status = await HealthConnector.getHealthPlatformStatus();
SituationPlatformResult
Health Connect missing or outdatedAndroidUnavailable — call launchHealthAppPageInAppStore()
Device policy restricts health dataBothUnavailable — no code fix
iPadiOSHealthKit not present

Released under the MIT License.