Unit<T extends Unit<T>> class abstract final

Implemented types
Implementers

Constructors

Unit([num value = 0])
const

Properties

anchor → T
no setter
displayName String
no setter
hashCode int
The hash code for this object.
no setteroverride
majorName String
no setter
minorName String
no setter
ratio num
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
symbol String
no setter
units List<T>
no setter
unitsAsMap EnumValues<T>
no setter
value num
final
valueShift num
no setter

Methods

compareTo(T other) int
Compares this object to another object.
override
convertTo<E extends Unit<T>>(E to) → T
Convert this unit to another unit under same category, the value of to is ignored
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
override
withPrecision([Precision precision = Precision.two]) → T
Get the exact precision on value calculation
withValue(num val) → T

Operators

operator +(T other) → T
operator -(T other) → T
operator <(T other) bool
operator <=(T other) bool
operator ==(Object other) bool
The equality operator.
override
operator >(T other) bool
operator >=(T other) bool