DistanceUnit enum
Distance unit options
Values
- millimeters → const DistanceUnit
-
Millimeters unit
const DistanceUnit(isMetric: true, size: _UnitSize.xxs) - centimeters → const DistanceUnit
-
Centimeters unit
const DistanceUnit(isMetric: true, size: _UnitSize.xs) - meters → const DistanceUnit
-
Meters unit
const DistanceUnit(isMetric: true, size: _UnitSize.m) - kilometers → const DistanceUnit
-
Kilometers unit
const DistanceUnit(isMetric: true, size: _UnitSize.l) - inches → const DistanceUnit
-
Inches unit
const DistanceUnit(isMetric: false, size: _UnitSize.xs) - feet → const DistanceUnit
-
Feet unit
const DistanceUnit(isMetric: false, size: _UnitSize.s) - yards → const DistanceUnit
-
Yards unit
const DistanceUnit(isMetric: false, size: _UnitSize.m) - miles → const DistanceUnit
-
Miles unit
const DistanceUnit(isMetric: false, size: _UnitSize.l)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- isMetric → bool
-
Whether this unit is part of the metric system
final
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- symbol → String
-
Symbol representation of the unit
no setter
Methods
-
calculateFrom(
Distance distance, {required bool useMetric}) → ({DistanceUnit unit, double value}) - Converts the given Distance to a unit of this type.
-
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
Constants
-
values
→ const List<
DistanceUnit> - A constant List of the values in this enum, in order of their declaration.