weatherTimePeriodV2ListToJson function

List<String> weatherTimePeriodV2ListToJson(
  1. List<WeatherTimePeriodV2>? weatherTimePeriodV2
)

Implementation

List<String> weatherTimePeriodV2ListToJson(
    List<enums.WeatherTimePeriodV2>? weatherTimePeriodV2) {
  if (weatherTimePeriodV2 == null) {
    return [];
  }

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