Speed enum

Represents units of speed.

Enums:

  • ms - meters per second
  • mph - miles per hour
  • kph or km/h - kilometers per hour
Inheritance
Mixed in types

Constructors

Speed(String name, String abbr)
const

Values

ms → const Speed
const Speed('meters per second', 'm/s')
mph → const Speed
const Speed('miles per hour', 'mph')
kph → const Speed
const Speed('kilometers per hour', 'km/h')

Properties

abbr String
Abbreviation.
final
hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String
Full name.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
value(double value, [int precision = 1]) double
Translating speed from meter/sec to another.
override
valueToString(double value, [int precision = 0]) String
Converts value to the minimum number of decimal places. Default to 0.
inherited

Operators

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

Constants

values → const List<Speed>
A constant List of the values in this enum, in order of their declaration.