Initial Commit
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
class HourlyWeatherModel {
|
||||
late DateTime timestamp;
|
||||
String? sourceId;
|
||||
double? precipitation;
|
||||
int? pressure;
|
||||
int? sunshine;
|
||||
late double temperature;
|
||||
int? windDirection;
|
||||
double? windSpeed;
|
||||
int? cloudCover;
|
||||
double? dewPoint;
|
||||
int? relativeHumidity;
|
||||
int? visibility;
|
||||
int? windGustDirection;
|
||||
double? windGustSpeed;
|
||||
String? condition;
|
||||
String? icon;
|
||||
|
||||
HourlyWeatherModel();
|
||||
|
||||
HourlyWeatherModel.fromJson(Map<String, dynamic> json) {
|
||||
sourceId = json['source_id'].toString();
|
||||
precipitation = json['precipitation'];
|
||||
pressure = json['pressure'];
|
||||
sunshine = json['sundshine'];
|
||||
temperature = json['temperature'];
|
||||
windDirection = json['wind_direction'];
|
||||
windSpeed = json['wind_speed'];
|
||||
cloudCover = json['cloud_cover'];
|
||||
dewPoint = json['dew_point'];
|
||||
relativeHumidity = json['relative_humidity'];
|
||||
visibility = json['visibility'];
|
||||
windGustDirection = json['wind_gust_direction'];
|
||||
windGustSpeed = json['wind_gust_speed'];
|
||||
condition = json['condition'];
|
||||
icon = json['icon'];
|
||||
timestamp = DateTime.parse(json['timestamp']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user