hours method

  1. @override
String hours(
  1. int hours
)
override

Format when time is in hours

Implementation

@override
String hours(int hours) {
  if (hours == 1) {
    return '1 h';
  } else if (hours > 1 && hours < 11) {
    return '~$hours h';
  } else {
    return '$hours h';
  }
}