TimeUnitDuration class

Specifies a custom time unit using familiar TimeUnits and an amount to establish the duration period. Returns 0 TimeUnit.milliseconds if the parsing fails

Constructors

TimeUnitDuration(int amount, TimeUnit timeUnit)
TimeUnitDuration.fromString(String str)

Properties

amount ↔ int
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timeUnit ↔ TimeUnit
getter/setter pair

Methods

asMs() → double
Returns the TimeUnitDuration in milliseconds
isZero() → bool
Check if the TimeUnitDuration is 0
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
Returns the TimeUnitDuration as a string
override

Operators

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