UnitValue class

Represents a generic value with its unit as defined by IEEE 1752 mHealth standard.

Extends Ieee1752Schema to provide a standardized representation of numeric measurements with their associated units. This class is used for measurements where specialized unit value classes (like TemperatureUnitValue) are not required.

Inheritance

Constructors

UnitValue({required num value, required String unit})
Creates a new unit value with the specified value and unit.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
unit String
The unit of measurement as a string (e.g., "beatsPerMinute", "steps").
final
value num
The numeric value of the measurement.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts this unit value to its JSON representation.
override
toString() String
A string representation of this object.
inherited

Operators

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