CurrentWeatherFactory class Null safety

This class queries the Current Weather API endpoint, the docs to which can be found at https://openweathermap.org/current

Constructors

CurrentWeatherFactory({required String apiKey, Language language = Language.ENGLISH, required UnitSettings settings, LocationCoords? locationCoords, String? cityName, Duration maxTimeBeforeTimeout = const Duration(seconds: 3)})

Properties

apiKey String
read / write
cityName String?
Used when you want to obtain the weather using a city name instead of longitude and latitude IMPORTANT: In some rare cases, two different cities from different parts of the world may have the same name. In this case, it is unpredictable which city's forecast you may receive. If you happen to successfully receive results but find on checking them that they are wildly different from what they should be (and have through sheer frustration reached all the way here, in which case, Hi!) consider doing the same query with equivalent longitude and latitude values and see if the problem persists.
read / write
hashCode int
The hash code for this object.
read-only, inherited
language Language
The language defaults to English
read / write
locationCoords LocationCoords?
The instance of LocationCoords that must be provided if you want to obtain the weather using longitude and latitude
read / write
maxTimeBeforeTimeout Duration
This is the maximum amount of time that the factory waits for a request to the server to complete, before retrying or returning an error
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
settings UnitSettings
The unit settings determine the data from the server is converted to
read / write

Methods

getWeather() Future<RequestResponse<CurrentWeather?>>
Public function to get the weather for a given saved city
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited