fiveDayForecastByLocation method

Future<List<Weather>> fiveDayForecastByLocation(
  1. double latitude,
  2. double longitude
)

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

Implementation

Future<List<Weather>> fiveDayForecastByLocation(
    double latitude, double longitude) async {
  Map<String, dynamic>? jsonResponse =
      await _sendRequest(FIVE_DAY_FORECAST, lat: latitude, lon: longitude);
  List<Weather> forecast = _parseForecast(jsonResponse!);
  return forecast;
}