HKSample class

Base class for health data samples in HealthKit.

Represents a single health data record with timestamps and associated metadata. Specific types of health data extend this class with additional properties.

Implementers

Constructors

HKSample({required String uuid, required DateTime startDate, required DateTime endDate, required HKSampleType sampleType, Map<String, dynamic>? metadata, HKDevice? device, Map<String, dynamic>? sourceRevision})
Creates a new sample with the specified parameters.

Properties

device HKDevice?
Optional information about the device that recorded this sample.
getter/setter pair
endDate DateTime
The date and time when this sample ended.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
metadata Map<String, dynamic>?
Optional additional data associated with this sample.
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 pair
sourceRevision Map<String, dynamic>?
Optional information about the source and version that provided this data.
getter/setter pair
startDate DateTime
The date and time when this sample started or was recorded.
getter/setter pair
uuid String
Unique identifier for this sample.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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