getName method

String getName({
  1. required String locale,
})

Gets a localized name for this RateUnit.

Implementation

String getName({
  required String locale,
}) {
  switch (this) {
    case RateUnit.second:
      return 'second';
    case RateUnit.minute:
      return 'minute';
    case RateUnit.hour:
      return 'hour';
    case RateUnit.day:
      return 'day';
    case RateUnit.week:
      return 'week';
  }
}