DurationExtension extension

Provides convenient methods and properties for Duration.

on

Methods

add(Duration other) Duration

Available on Duration, provided by the DurationExtension extension

Returns a new Duration that is the sum of this duration and other.
delay([FutureOr<void> callback()?]) Future<void>

Available on Duration, provided by the DurationExtension extension

Creates a Future that completes after this duration. An optional callback can be executed when the future completes.
divideBy(double factor) Duration

Available on Duration, provided by the DurationExtension extension

Returns a new Duration that is this duration divided by factor.
isEqualTo(Duration other) bool

Available on Duration, provided by the DurationExtension extension

Returns true if this duration is equal to other.
isLongerThan(Duration other) bool

Available on Duration, provided by the DurationExtension extension

Returns true if this duration is longer than other.
isShorterThan(Duration other) bool

Available on Duration, provided by the DurationExtension extension

Returns true if this duration is shorter than other.
multiplyBy(int factor) Duration

Available on Duration, provided by the DurationExtension extension

Returns a new Duration that is this duration multiplied by factor.
subtract(Duration other) Duration

Available on Duration, provided by the DurationExtension extension

Returns a new Duration that is the difference between this duration and other.