HealthData class

A Data object that holds health data from a HealthDataPoint.

Inheritance
  • Object
  • Serializable
  • Data
  • HealthData
Annotations
  • @JsonSerializable(fieldRename: FieldRename.snake, includeIfNull: false)

Constructors

HealthData(String uuid, HealthValue value, String unit, String dataType, DateTime dateFrom, DateTime dateTo, String platform, String deviceId, String sourceId, String sourceName)
Create a HealthData object.
HealthData.fromHealthDataPoint(HealthDataPoint healthDataPoint)
Create a HealthData from a HealthDataPoint health data object.
factory
HealthData.fromJson(Map<String, dynamic> json)
factory

Properties

$type String?
The runtime class name (type) of this object. Used for deserialization from JSON objects.
getter/setter pairinherited
dataType String
The type of health data -- see HealthDataType. Note that the uppercase version is used, e.g. STEPS.
getter/setter pair
dateFrom DateTime
Start date-time for this health data.
getter/setter pair
dateTo DateTime
End date-time for this health data.
getter/setter pair
deviceId String
The device id of the phone.
getter/setter pair
format → DataType
The format of this data as a DataType.
no setterinherited
fromJsonFunction Function
The function which can convert a JSON string to an object of this type.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
jsonType String
The json type of this health data is dk.cachet.carp.health.<healthdatatype>, where <healthdatatype> is the lowercase version of the dataType.
no setteroverride
platform String
The platform from which this health data point came from (ANDROID, IOS).
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
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
unit String
Unit of health data.
getter/setter pair
uuid String
A unique UUID of this data point.
getter/setter pair
value ↔ HealthValue
The value of the health data.
getter/setter pair

Methods

equivalentTo(Data other) bool
Is this data equivalent to other?
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Return a JSON encoding of this object.
override
toString() String
A string representation of this object.
override

Operators

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