HealthKitImpl class

Implementation of HealthKit interface for accessing health data from iOS devices. Handles communication with the native HealthKit API through method channels.

Implemented types

Constructors

HealthKitImpl(MethodChannel methodChannel, HKDataFactory dataFactory, JsonConverter jsonConverter)
Creates a new HealthKit implementation with required dependencies.

Properties

dataFactory HKDataFactory
Factory for creating HealthKit data objects from JSON responses.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
jsonConverter JsonConverter
Utility for safely converting JSON data structures.
getter/setter pair
methodChannel MethodChannel
Channel for communication with native iOS HealthKit API.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkHealthStoreAvailability() Future<HealthKitAvailability>
Checks if HealthKit is available and accessible on the device. Returns an availability status indicating if HealthKit can be used.
override
getData(List<HealthKitHealthMetric> metrics, DateTimeRange<DateTime> timeRange) Future<List<HealthKitData>>
Retrieves health data for specified metrics within the given time range. Returns a list of typed health data objects (heart rate, body temperature, etc.).
override
getPlatformVersion() Future<String>
Retrieves the platform version of the iOS device.
override
getRawData(List<HealthKitHealthMetric> metrics, DateTimeRange<DateTime> timeRange) Future<HealthData>
Retrieves raw health data for specified metrics within the given time range. Returns a HealthData object containing the unprocessed data grouped by metric type.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
redirectToPermissionsSettings() Future<bool>
override
requestPermissions(List<HealthKitHealthMetric> metrics) Future<bool>
Requests permissions for the specified health metrics. Returns a boolean indicating if all permissions were granted.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited