currentWeatherByLocation method

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

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

Implementation

Future<Weather> currentWeatherByLocation(
    double latitude, double longitude) async {
  Map<String, dynamic>? jsonResponse =
      await _sendRequest(CURRENT_WEATHER, lat: latitude, lon: longitude);
  return Weather(jsonResponse!);
}