DurationExtensions extension
- on
Methods
-
countDownDays(
) → Duration - count down this duration with 1 day
-
countDownHours(
) → Duration - count down this duration with 1 hour
-
countDownMicroseconds(
) → Duration - count down this duration with 1 microsecond
-
countDownMilliseconds(
) → Duration - count down this duration with 1 millisecond
-
countDownMinutes(
) → Duration - count down this duration with 1 minute
-
countDownSeconds(
) → Duration - count down this duration with 1 seconds
-
countUpHours(
) → Duration - count up this duration with 1 hour
-
countUpMicroseconds(
) → Duration - count up this duration with 1 microsecond
-
countUpMilliseconds(
) → Duration - count up this duration with 1 millisecond
-
countUpMinutes(
) → Duration - count up this duration with 1 minute
-
countUpnDays(
) → Duration - count up this duration with 1 day
-
countUpSeconds(
) → Duration - count up this duration with 1 seconds
-
format(
{int maxParts = 2, int secondsToShowNow = 0, DurationFormatter formatter = const DefaultDurationFormatter()}) → String -
Format duration to readable string
you can choose one of our formatters
DefaultDurationFormatter
orTranslatedDurationFormatter
or you can implementDurationFormatter
and create your own