show more days of forecast, enable reload of forecasts

This commit is contained in:
Konstantin Kollar
2022-08-31 14:56:00 +02:00
parent bc3dcf575c
commit 7c4320f4b6
4 changed files with 76 additions and 22 deletions
+4
View File
@@ -4,6 +4,10 @@ import 'dart:math';
class DailyWeatherModel {
late List<HourlyWeatherModel> hourlyForecasts;
DateTime dateOfDay() {
return hourlyForecasts[0].timestamp.toLocal();
}
DailyWeatherModel.fromJson(Map<String, dynamic> json) {
List dataPoints = json['weather'];
hourlyForecasts = [];