OpenWeatherMap class

Useful to obtain weather data, it connects with the Open Weather Map API.

Constructors

OpenWeatherMap({required String apiKey, String? langCode, Language language = Language.english, int requestTimeout = 5})
Define a OpenWeatherMap class.
const

Properties

apiKey String
The key obtained from the Open Weather Map API.
final
hashCode int
The hash code for this object.
no setterinherited
langCode String?
The language code to get description from API.
final
language Language
The language to get the data from the API, default english.
final
requestTimeout int
Controls the maximum time in seconds to wait to get the data. If you have a slow connection make sure to use the correct seconds.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

currentWeather(City city) Future<CurrentWeather>
Returns a Future of CurrentWeather class by city information.
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