week property

Duration get week

Converts this number to a Duration in weeks.

Fractional values are truncated with toInt(). Example: 2.week -> Duration(days: 14) for news cache TTL.

Implementation

Duration get week => Duration(days: toInt() * 7);