HealthDataPoint class

A HealthDataPoint object corresponds to a data point capture from Apple HealthKit or Google Health Connect with a HealthValue as value.

Annotations
  • @JsonSerializable(includeIfNull: false, explicitToJson: true)

Constructors

HealthDataPoint({required String uuid, required HealthValue value, required HealthDataType type, required HealthDataUnit unit, required DateTime dateFrom, required DateTime dateTo, required HealthPlatformType sourcePlatform, required String sourceDeviceId, required String sourceId, required String sourceName, RecordingMethod recordingMethod = RecordingMethod.unknown, WorkoutSummary? workoutSummary, Map<String, dynamic>? metadata})
HealthDataPoint.fromHealthDataPoint(HealthDataType dataType, dynamic dataPoint)
Create a HealthDataPoint based on a health data point from native data format.
factory
HealthDataPoint.fromJson(Map<String, dynamic> json)
Create a HealthDataPoint from json.
factory

Properties

dateFrom DateTime
The start of the time interval.
getter/setter pair
dateTo DateTime
The end of the time interval.
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
metadata Map<String, dynamic>?
The metadata for this data point.
getter/setter pair
recordingMethod RecordingMethod
How the data point was recorded (on Android: https://developer.android.com/reference/kotlin/androidx/health/connect/client/records/metadata/Metadata#summary) on iOS: either user entered or manual https://developer.apple.com/documentation/healthkit/hkmetadatakeywasuserentered)
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceDeviceId String
The id of the device from which the data point was fetched.
getter/setter pair
sourceId String
The id of the source from which the data point was fetched.
getter/setter pair
sourceName String
The name of the source from which the data point was fetched.
getter/setter pair
sourcePlatform HealthPlatformType
The health platform that this data point was fetched.
getter/setter pair
type HealthDataType
The type of the data point.
getter/setter pair
typeString String
The data point type as a string.
no setter
unit HealthDataUnit
The unit of the data point.
getter/setter pair
unitString String
The data point unit as a string.
no setter
uuid String
UUID of the data point.
getter/setter pair
value HealthValue
The quantity value of the data point
getter/setter pair
workoutSummary WorkoutSummary?
The summary of the workout data point, if available.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Convert this HealthDataPoint to json.
toString() String
A string representation of this object.
override

Operators

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