Quantity class

A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.

Constructors

Quantity({num? value, String? unit, Uri? system, String? code})
Constructs a new Quantity
Quantity.fromJson(JsonObject _json)
Constructs a new Quantity instance from the provided JSON object.

Properties

code String?
A computer processable form of the unit in some unit representation system.
no setter
hashCode int
The hash code for this object.
no setteroverride
json → JsonObject
Converts this Quantity instance to a JSON object.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
system Uri?
The identification of the system that provides the coded form of the unit.
no setter
unit String?
A human-readable form of the unit.
no setter
value num?
The value of the measured amount. The value includes an implicit precision in the presentation of the value.
no setter

Methods

copyWith({num? value, String? unit, Uri? system, String? code}) Quantity
Makes a deep copy of this Quantity.
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.
override

Constants

codeField → const FieldDefinition<String>
Field definition for code
fieldDefinitions → const List<FieldDefinition<Object>>
All field definitions for Quantity
systemField → const FieldDefinition<Uri>
Field definition for system
unitField → const FieldDefinition<String>
Field definition for unit
valueField → const FieldDefinition<num>
Field definition for value