UnitOfLength class

Unit of length (meter, feet, etc.).

The predefined values are:

Inheritance
Annotations
  • @sealed

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).
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shortName String
Short name such as "m" or "m²".
finalinherited

Methods

compareTo(UnitOfMeasurement other) int
Compares this object to another object.
inherited
convertDecimal(Decimal value, {required UnitOfLength to}) Decimal
Converts a Decimal value to another unit.
inherited
convertDouble(double value, {required UnitOfLength to}) double
Converts a floating-point to another unit.
inherited
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

Static Properties

values List<UnitOfLength>
All predefined values.
final

Constants

centimeters → const UnitOfLength
Centimeters (cm).
feet → const UnitOfLength
Feet (ft).
inches → const UnitOfLength
Inches (in).
kilometers → const UnitOfLength
Kilometers (km).
meters → const UnitOfLength
Meters (m).
miles → const UnitOfLength
Miles (mi).
millimeters → const UnitOfLength
Millimeters (mm).
nauticalMiles → const UnitOfLength
Nautical miles (nmi).