WeatherFactory class
Plugin for fetching weather data in JSON.
Constructors
- WeatherFactory(String _apiKey, {Language language = Language.ENGLISH})
Properties
Methods
-
currentWeatherByCityName(
String cityName) → Future< Weather> - Fetch current weather based on city name Result is JSON. For API documentation, see: https://openweathermap.org/current
-
currentWeatherByLocation(
double latitude, double longitude) → Future< Weather> - Fetch current weather based on geographical coordinates Result is JSON. For API documentation, see: https://openweathermap.org/current
-
fiveDayForecastByCityName(
String cityName) → Future< List< Weather> > - Fetch current weather based on geographical coordinates. Result is JSON. For API documentation, see: https://openweathermap.org/forecast5
-
fiveDayForecastByLocation(
double latitude, double longitude) → Future< List< Weather> > - Fetch current weather based on geographical coordinates. Result is JSON. For API documentation, see: https://openweathermap.org/forecast5
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- CURRENT_WEATHER → const String
- FIVE_DAY_FORECAST → const String
- STATUS_OK → const int