Slider in settings to adjust days of forecast loaded. Settings are saved and loaded

This commit is contained in:
Konstantin Kollar
2022-08-31 22:09:47 +02:00
parent b20e7cfb46
commit 4fac2ecf0a
8 changed files with 244 additions and 11 deletions
+2 -1
View File
@@ -17,7 +17,8 @@ class BrightSkyAPI {
}
static Future<List<DailyWeatherModel>> fetchForecastForTimeRange(
DateTime from, DateTime until) async {
DateTime from, int noOfDays) async {
DateTime until = from.add(Duration(days: noOfDays));
String fromDay = "${from.year}-${from.month}-${from.day}";
String untilDay = "${until.year}-${until.month}-${until.day}";
final response = await http.get(