HKQuantitySample class
Represents a sample of quantitative health data in HealthKit.
Contains a measured quantity with an optional count and inherits common sample attributes from HKSample.
Constructors
-
HKQuantitySample({required String uuid, required DateTime startDate, required DateTime endDate, Map<
String, dynamic> ? metadata, HKDevice? device, Map<String, dynamic> ? sourceRevision, required HKQuantity quantity, required HKSampleType sampleType, int? count}) - Creates a new quantity sample with the specified parameters.
Properties
- count ↔ int?
-
Optional count of measurements combined in this sample.
getter/setter pair
- device ↔ HKDevice?
-
Optional information about the device that recorded this sample.
getter/setter pairinherited
- endDate ↔ DateTime
-
The date and time when this sample ended.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
metadata
↔ Map<
String, dynamic> ? -
Optional additional data associated with this sample.
getter/setter pairinherited
- quantity ↔ HKQuantity
-
The measured health quantity value with its unit.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sampleType ↔ HKSampleType
-
The type of health data this sample contains.
getter/setter pairinherited
-
sourceRevision
↔ Map<
String, dynamic> ? -
Optional information about the source and version that provided this data.
getter/setter pairinherited
- startDate ↔ DateTime
-
The date and time when this sample started or was recorded.
getter/setter pairinherited
- uuid ↔ String
-
Unique identifier for this sample.
getter/setter pairinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
Returns a string representation of this quantity sample.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited