Quantity class

Implemented types
Annotations
  • @immutable

Constructors

Quantity(double value, [Unit unit = Unit.unity])
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
unit Unit
final
value double
final

Methods

abs() Quantity
compareTo(Quantity quantity) int
Compares this object to another object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
to(Unit newUnit) double
toCelsius() double
toDuration() Duration
toFahrenheit() double
toString() String
A string representation of this object.
override

Operators

operator *(Quantity that) Quantity
operator +(Quantity that) Quantity
operator -(Quantity that) Quantity
operator /(Quantity that) Quantity
operator <(Quantity that) bool
operator <=(Quantity that) bool
operator ==(Object that) bool
The equality operator.
override
operator >(Quantity that) bool
operator >=(Quantity that) bool
operator unary-() Quantity