OneCallWeatherFactory class Null safety

This class queries the OneCall Weather API endpoint, the docs to which can be found at https://openweathermap.org/api/one-call-api

Constructors

OneCallWeatherFactory({required String apiKey, Language language = Language.ENGLISH, required UnitSettings settings, LocationCoords? locationCoords, List<ExcludeField>? exclusions, Duration maxTimeBeforeTimeout = const Duration(seconds: 3)})

Properties

apiKey String
read / write
exclusions List<ExcludeField>?
This takes an array of type ExcludeField. Any fields, such as the daily weather, the hourly weather, weather alertss that you do not want to query, include them here by providing the corresponding ExcludeField enum
read / write
hashCode int
The hash code for this object.
read-onlyinherited
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-onlyinherited
settings UnitSettings
The unit settings determine the data from the server is converted to
read / write

Methods

getWeather() Future<RequestResponse<OneCallWeather?>>
Public function to get the weather for a given latitude and longitude
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