OpenWeather class

Constructors

OpenWeather({required String apiKey})

Properties

apiKey String
apiKey is used to authenticate the user with OpenWeather API. without proper API key, the other functions throws Exception.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

currentWeatherByCityName({required String cityName, Languages? language, WeatherUnits weatherUnits = WeatherUnits.IMPERIAL}) Future<WeatherData>
currentWeatherByLocation({required double latitude, required double longitude, Languages? language, WeatherUnits weatherUnits = WeatherUnits.IMPERIAL}) Future<WeatherData>
currentWeatherByZipCode({required int zipCode, required String countryCode, Languages? language, WeatherUnits weatherUnits = WeatherUnits.IMPERIAL}) Future<WeatherData>
fiveDaysWeatherForecastByCityName({required String cityName, Languages? language, WeatherUnits weatherUnits = WeatherUnits.IMPERIAL}) Future<WeatherForecastData>
fiveDaysWeatherForecastByLocation({required double latitude, required double longitude, Languages? language, WeatherUnits weatherUnits = WeatherUnits.IMPERIAL}) Future<WeatherForecastData>
fiveDaysWeatherForecastByZipCode({required int zipCode, required String countryCode, Languages? language, WeatherUnits weatherUnits = WeatherUnits.IMPERIAL}) Future<WeatherForecastData>
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