DurationUnit enum

Enum representing units of time for prettyDuration. Each unit has a short, long, and plural representation.

Inheritance
Available extensions

Values

days → const DurationUnit
const DurationUnit(short: 'd', long: 'day', plural: 'days')
hours → const DurationUnit
const DurationUnit(short: 'h', long: 'hour', plural: 'hours')
minutes → const DurationUnit
const DurationUnit(short: 'm', long: 'minute', plural: 'minutes')
seconds → const DurationUnit
const DurationUnit(short: 's', long: 'second', plural: 'seconds')

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
long String
Singular long representation (e.g., 'hour', 'minute', 'second').
final
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
plural String
Plural long representation (e.g., 'hours', 'minutes', 'seconds').
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
short String
Short representation (e.g., 'h', 'm', 's').
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

Constants

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