timeUnitMessage method
Implementation
String timeUnitMessage(String? timeUnit, bool single) {
if (single) {
return timeUnit == 'd'
? 'day'
: timeUnit == 'w'
? 'week'
: timeUnit == 'm'
? 'month'
: timeUnit == 'y'
? 'year'
: '';
} else {
return timeUnit == 'd'
? 'days'
: timeUnit == 'w'
? 'weeks'
: timeUnit == 'm'
? 'months'
: timeUnit == 'y'
? 'years'
: '';
}
}