WeatherData class
Generic class to hold all the data being extracted from the API response
- Annotations
-
- @JsonSerializable()
Constructors
-
WeatherData.new({required List<
Details> details, required Temperature temperature, required Wind wind, required Coordinates? coordinates, required String? name, required int date}) - Constructor for initializing the WeatherData object
-
WeatherData.fromJson(Map<
String, dynamic> json) -
Factory method to create a WeatherData object from a JSON map
factory
Properties
- coordinates ↔ Coordinates?
-
Holds coordinates of the place
getter/setter pair
- date ↔ int
-
Holds the date of the weather data
getter/setter pair
-
details
↔ List<
Details> -
Holds weather basic details as a list
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- name ↔ String?
-
Extracts the name of the identified place from the API response
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- temperature ↔ Temperature
-
Holds temperature related details as an object
getter/setter pair
- wind ↔ Wind
-
Holds wind related details as an object
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Method to convert a WeatherData object to a JSON map
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited