weatherTimePeriodDTOListToJson function

List<String> weatherTimePeriodDTOListToJson(
  1. List<WeatherTimePeriodDTO>? weatherTimePeriodDTO
)

Implementation

List<String> weatherTimePeriodDTOListToJson(
    List<enums.WeatherTimePeriodDTO>? weatherTimePeriodDTO) {
  if (weatherTimePeriodDTO == null) {
    return [];
  }

  return weatherTimePeriodDTO.map((e) => e.value!).toList();
}