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 andother
. -
delay(
[FutureOr< void> callback()?]) → Future<void> -
Available on Duration, provided by the DurationExtension extension
Creates a Future that completes after this duration. An optionalcallback
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 byfactor
. -
isEqualTo(
Duration other) → bool -
Available on Duration, provided by the DurationExtension extension
Returns true if this duration is equal toother
. -
isLongerThan(
Duration other) → bool -
Available on Duration, provided by the DurationExtension extension
Returns true if this duration is longer thanother
. -
isShorterThan(
Duration other) → bool -
Available on Duration, provided by the DurationExtension extension
Returns true if this duration is shorter thanother
. -
multiplyBy(
int factor) → Duration -
Available on Duration, provided by the DurationExtension extension
Returns a new Duration that is this duration multiplied byfactor
. -
subtract(
Duration other) → Duration -
Available on Duration, provided by the DurationExtension extension
Returns a new Duration that is the difference between this duration andother
.