HealthDataPoint class

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

Annotations
  • @JsonSerializable(fieldRename: FieldRename.snake, includeIfNull: false)

Constructors

HealthDataPoint({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, bool isManualEntry = false, WorkoutSummary? workoutSummary})
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
isManualEntry bool
The user entered state of the data point.
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
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