HealthConnect class abstract
Defines interface for interacting with Android's Health Connect API. Provides methods for permission management and health data retrieval.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkHealthStoreAvailability(
) → Future< HealthConnectAvailability> - Checks if Health Connect is available on the device. Returns an availability status indicating if and how Health Connect can be accessed.
-
checkPermissions(
) → Future< List< HealthConnectHealthMetric> > - Checks current permissions for Health Connect metrics. Returns a list of metrics that the app is authorized to access.
-
getData(
List< HealthConnectHealthMetric> metrics, DateTimeRange<DateTime> timeRange) → Future<List< HealthConnectData> > - Retrieves health data for the specified metrics within a time range. Returns a list of health data records that match the criteria.
-
getPlatformVersion(
) → Future< String> - Gets the Android platform version. Useful for compatibility checks.
-
getRawData(
List< HealthConnectHealthMetric> metrics, DateTimeRange<DateTime> timeRange) → Future<HealthData> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
redirectToPermissionsSettings(
) → Future< bool> -
requestPermissions(
List< HealthConnectHealthMetric> metrics) → Future<List< HealthConnectHealthMetric> > - Requests permissions for specific health metrics. Prompts the user with a permission dialog and returns granted permissions.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited