SpeedUnit enum
Represents units of speed.
This enum implements the Unit interface to provide conversion capabilities and a display symbol for each speed unit. All conversion factors are pre-calculated in the constructor relative to Meter per Second (m/s).
Values
- meterPerSecond → const SpeedUnit
-
Meter per second (m/s), the SI derived unit of speed.
const SpeedUnit(1, 'm/s') - kilometerPerSecond → const SpeedUnit
-
Kilometer per second (km/s), a common unit in scientific contexts like astronomy.
const SpeedUnit(SpeedFactors.mpsPerKps, 'km/s') - kilometerPerHour → const SpeedUnit
-
Kilometer per hour (km/h), a common unit for road vehicle speed.
const SpeedUnit(SpeedFactors.mpsPerKmh, 'km/h') - milePerHour → const SpeedUnit
-
Mile per hour (mph), a common unit for road vehicle speed in some countries.
const SpeedUnit(SpeedFactors.mpsPerMph, 'mph') - knot → const SpeedUnit
-
Knot (kn), a unit of speed equal to one nautical mile per hour. Commonly used in maritime and aviation contexts.
const SpeedUnit(SpeedFactors.mpsPerKnot, 'kn') - footPerSecond → const SpeedUnit
-
Foot per second (ft/s), used in some engineering contexts.
const SpeedUnit(SpeedFactors.mpsPerFps, 'ft/s')
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- 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
-
A human-readable symbol or abbreviation for the unit.
final
Methods
-
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