weatherConditionDTOListToJson function

List<String> weatherConditionDTOListToJson(
  1. List<WeatherConditionDTO>? weatherConditionDTO
)

Implementation

List<String> weatherConditionDTOListToJson(
    List<enums.WeatherConditionDTO>? weatherConditionDTO) {
  if (weatherConditionDTO == null) {
    return [];
  }

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