Distance class

The Distance structure keeps the distance value.

Inheritance

Constructors

Distance.new(double value, DistanceUnit unit, {bool convert = true})
Distance.zero()

Properties

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

Methods

convertToDefault(double value) double
inherited
getAccuracy() int
Returns the accuracy for the given units.
into(DistanceUnit units) double
inherited
inUnits(DistanceUnit units) ValueWithUnit<DistanceUnit>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
unitName() String
override
valueFromDefault(double value, DistanceUnit units) double
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getUnitName(DistanceUnit units) String
Returns the unit name for the given units.