HealthData class
A Data object that holds health data from a HealthDataPoint.
- Inheritance
-
- Object
- Serializable
- Data
- HealthData
- Annotations
-
- @JsonSerializable.new(includeIfNull: false, explicitToJson: true)
Constructors
- HealthData({required String uuid, required HealthValue value, required String unit, required String healthDataType, required DateTime dateFrom, required DateTime dateTo, required HealthPlatform platform, String? deviceId, String? sourceId, String? sourceName})
- Create a HealthData object.
- HealthData.fromHealthDataPoint(HealthDataPoint healthDataPoint)
-
Create a HealthData from a
HealthDataPointhealth 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 → DataType
-
The type of this data as a
DataType.no setterinherited - 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
- fromJsonFunction → Function
-
The function which can convert a JSON string to an object of this type.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- healthDataType ↔ String
-
The type of health data -- see HealthDataType.
Note that the uppercase version is used, e.g.
STEPS.getter/setter pair - jsonType → String
-
The json type of this health data is
dk.cachet.carp.health.<healthdatatype>, where<healthdatatype>is the lowercase version of the healthDataType.no setteroverride - platform ↔ HealthPlatform
-
The platform from which this health data point came from
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