toDuration method

Duration toDuration()

Implementation

Duration toDuration() {
  switch (this) {
    case 'HR_24':
      return Duration.hr_24;
    case 'DAY_7':
      return Duration.day_7;
    case 'DAY_14':
      return Duration.day_14;
    case 'DAY_30':
      return Duration.day_30;
  }
  throw Exception('$this is not known in enum Duration');
}