OneCallWeather class

This is the class that handles JSON deserialization and makes data for OneCall weather queries accessible. The fields in this class differ slightly to CurrentWeather as the API provides different fields when querying the Current Weather API endpoint and the One Call API Endpoint.

Constructors

OneCallWeather({LocationCoords? locationCoords, String? timeZoneName, int? timeZoneOffset, OneCallCurrentWeather? currentWeather, List<OneCallMinutelyWeather?>? minutelyWeather, List<OneCallHourlyWeather?>? hourlyWeather, List<OneCallDailyWeather?>? dailyWeather, OneCallAlertsWeather? alertsWeather})
OneCallWeather.fromJson(Map<String, dynamic> json, UnitSettings settings)
JSON deserialization constructor
factory

Properties

alertsWeather OneCallAlertsWeather?
National weather alerts provided by different major national weather warning systems
getter/setter pair
currentWeather OneCallCurrentWeather?
The current weather forecast for the queried location. The fields in this class differ slightly to CurrentWeather as the API provides different fields when querying the Current Weather API endpoint and the One Call API Endpoint
getter/setter pair
dailyWeather List<OneCallDailyWeather?>?
The day by day forecast for the next 7 days, including the current day. Each item in the list is a day, with the instance at index 0 being today, and the instance at index 7 being chronologically the 7th day
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hourlyWeather List<OneCallHourlyWeather?>?
The hour by hour forecast for the next 48 hours. Each item in the list is an hour, with the instance at index 0 being chronologically the first hour, and the instance at index 47 being chronologically the last hour
getter/setter pair
locationCoords LocationCoords?
The longitude and latitude for the city for which the weather was queried
getter/setter pair
minutelyWeather List<OneCallMinutelyWeather?>?
The minute by minute weather forecast for the next hour. Each item in the list is a minute, with the instance at index 0 being chronologically the first minute, and the instance at index 59 chronologically the last minute
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeZoneName String?
The name of the timezone the queried location is in
getter/setter pair
timeZoneOffset int?
The timezone offset from UTC time of the location for which the weather was queried, in seconds
getter/setter pair

Methods

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