ConvertibleUnitOfMeasure<T extends ConvertibleUnitOfMeasure> class
abstract
Superclass for units that DO have fixed conversion formulas.
For example, Currency instances DO NOT have fixed conversion rates.
- Inheritance
-
- Object
- UnitOfMeasurement
- ConvertibleUnitOfMeasure
- Implementers
Constructors
- ConvertibleUnitOfMeasure.specify({required String identifier, required String shortName, required double inStandardUnit})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- identifier → String
-
Identifier of the constant.
finalinherited
- inStandardUnit → double
-
Conversion rate to the standard unit (SI or other).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shortName → String
-
Short name such as "m" or "m²".
final
Methods
-
compareTo(
UnitOfMeasurement other) → int -
Compares this object to another object.
inherited
-
convertDecimal(
Decimal value, {required T to}) → Decimal - Converts a Decimal value to another unit.
-
convertDouble(
double value, {required T to}) → double - Converts a floating-point to another unit.
-
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