OneCallWeatherFactory class Null safety

This class queries the OneCall Weather API endpoint, the docs to which can be found at


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


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.
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.
settings UnitSettings
The unit settings determine the data from the server is converted to
read / write


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.
toString() String
A string representation of this object.


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