HealthConnectImpl class

Implementation of HealthConnect interface for accessing health data from Android devices. Handles communication with the native Health Connect API through method channels.

Implemented types

Constructors

HealthConnectImpl(MethodChannel methodChannel, HCDataFactory dataFactory, JsonConverter jsonConverter)
Creates a new HealthConnect implementation with required dependencies.

Properties

dataFactory HCDataFactory
Factory for creating Health Connect 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 Android Health Connect API.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkHealthStoreAvailability() Future<HealthConnectAvailability>
Checks if Health Connect is available and accessible on the device. Returns an availability status indicating if Health Connect can be used.
override
checkPermissions() Future<List<HealthConnectHealthMetric>>
Queries current permission status for Health Connect metrics. Returns a list of metrics that are currently permitted.
override
getData(List<HealthConnectHealthMetric> metrics, DateTimeRange<DateTime> timeRange) Future<List<HealthConnectData>>
Retrieves health data for specified metrics within the given time range. Returns a list of typed health data objects (heart rate, skin temperature, etc.).
override
getPlatformVersion() Future<String>
Retrieves the platform version of the Android device.
override
getRawData(List<HealthConnectHealthMetric> 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<HealthConnectHealthMetric> metrics) Future<List<HealthConnectHealthMetric>>
Requests permissions for the specified health metrics. Returns a list of metrics that were granted permission.
override
toString() String
A string representation of this object.
inherited

Operators

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