fiveDayForecastByCityName method

Future<List<Weather>> fiveDayForecastByCityName(
  1. String cityName
)

Fetch current weather based on geographical coordinates. Result is JSON. For API documentation, see: https://openweathermap.org/forecast5

Implementation

Future<List<Weather>> fiveDayForecastByCityName(String cityName) async {
  Map<String, dynamic>? jsonForecast =
      await _sendRequest(FIVE_DAY_FORECAST, cityName: cityName);
  List<Weather> forecasts = _parseForecast(jsonForecast!);
  return forecasts;
}