toUnitString static method
Implementation
static String toUnitString(int value, {String? unit, String? langCode}) {
final langCodeVal = langCode ?? _default;
final messages = _lookupMessagesMap[langCodeVal] ?? EnMessages();
switch (unit) {
case 'year':
return messages.years(value);
case 'month':
return messages.months(value);
case 'day':
return messages.days(value);
case 'hour':
return messages.hours(value);
case 'minute':
default:
return messages.minutes(value);
}
}