Length class

A distance, stored canonically in metres.

Implemented types
Annotations

Constructors

Length.centimetres(double cm)
Creates a length from centimetres.
const
Length.feet(double feet)
Creates a length from feet.
const
Length.kilometres(double km)
Creates a length from kilometres.
const
Length.metres(double metres)
Creates a length from metres.
const
Length.miles(double miles)
Creates a length from miles.
const

Properties

centimetres → double
In centimetres.
no setter
feet → double
In feet.
no setter
hashCode → int
The hash code for this object.
no setteroverride
kilometres → double
In kilometres.
no setter
metres → double
The canonical value.
final
miles → double
In miles.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

compareTo(Length other) → int
Compares this object to another object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override