timeRangeDTOListFromJson function

List<TimeRangeDTO> timeRangeDTOListFromJson(
  1. List? timeRangeDTO, [
  2. List<TimeRangeDTO>? defaultValue
])

Implementation

List<enums.TimeRangeDTO> timeRangeDTOListFromJson(
  List? timeRangeDTO, [
  List<enums.TimeRangeDTO>? defaultValue,
]) {
  if (timeRangeDTO == null) {
    return defaultValue ?? [];
  }

  return timeRangeDTO.map((e) => timeRangeDTOFromJson(e.toString())).toList();
}