Sample<Harmonized> class
abstract
Equivalent of Sample from HealthKitReporter https://cocoapods.org/pods/HealthKitReporter
Supports map representation.
Has a Sample.from constructor to create instances from JSON payload coming from iOS native code and a generic Harmonized object.
Has a factory method for creating a specific instance of types:
- Quantity
- Category
- Workout
- Correlation
- Electrocardiogram
Every type conforms the requirement
to have an associated type
Harmonized
implemented.
Depending on request, requires permissions provided from available types:
The method parsed is used for mapping values
to save data in HealthKit
- Implementers
Constructors
- Sample(String uuid, String identifier, num startTimestamp, num endTimestamp, Device? device, SourceRevision sourceRevision, Harmonized harmonized)
-
const
-
Sample.from(Map<
String, dynamic> json, Harmonized harmonized) - General constructor from JSON payload
Properties
- device → Device?
-
final
- endTimestamp → num
-
final
- harmonized → Harmonized
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- identifier → String
-
final
-
map
→ Map<
String, dynamic> -
General map representation
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sourceRevision → SourceRevision
-
final
- startTimestamp → num
-
final
- uuid → String
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parsed(
) → Map< String, dynamic> - For saving data, prepares appropriate map for HealthKitReporter.save
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
factory(
Map< String, dynamic> json) → Sample? - Factory method to create instances as a result of HealthKitReporter.sampleQuery