health library

Properties

canEnableBackgroundSyncNoninteractively bool
no setter
isBackgroundSyncEnabled Future<bool>
Experimental API On iOS, this property always returns true. iOS HealthKit Background Delivery is an app-level entitlement, and does not require explicit user consent.
no setter
pauseSynchronization Future<bool>
Whether health data sync is paused at the moment.
no setter
syncStatus Stream<SyncStatus>
Health Data sync status. Note that this stream does not replay any status already emitted.
no setter

Functions

askForPermission(List<HealthResource> readResources, List<HealthResourceWrite> writeResources) Future<PermissionOutcome>
cleanUp() Future<void>
configure({HealthConfig config = const HealthConfig()}) Future<void>
disableBackgroundSync() Future<void>
Experimental API On iOS, this method is a no-op. iOS HealthKit Background Delivery is an app-level entitlement, and does not require explicit user consent.
enableBackgroundSync() Future<bool>
Experimental API On iOS, this method is a no-op returning true. iOS HealthKit Background Delivery is an app-level entitlement, and does not require explicit user consent.
hasAskedForPermission(HealthResource resource) Future<bool>
isAvailable() Future<bool>
Android: Whether Health Connect is available on the current device. iOS: Always return true.
read(HealthResource resource, DateTime startDate, DateTime endDate) Future<ProcessedData?>
setPauseSynchronization(bool paused) Future<void>
Pause or unpause health data sync.
setSyncNotificationContent(SyncNotificationContent content) Future<void>
Experimental API On iOS, this method is a no-op. iOS does not require apps to show a user-visible notification when performing extended work in background.
syncData({List<HealthResource>? resources}) Future<void>
writeHealthData(HealthResourceWrite writeResource, DateTime startDate, DateTime endDate, double value) Future<void>