From 4a31840ddcf0d9037bfa436068c9da4e25dfea79 Mon Sep 17 00:00:00 2001 From: Pranshul Date: Fri, 1 Aug 2025 17:42:56 +0530 Subject: [PATCH] ui changes / added KNMI models closes #509 --- lib/screens/daily_forecast.dart | 2 +- lib/screens/edit_layout_page.dart | 6 +-- lib/screens/meteo_models.dart | 55 ++++++++++++++++++++++++ lib/widgets/current_conditions_card.dart | 2 +- 4 files changed, 60 insertions(+), 5 deletions(-) diff --git a/lib/screens/daily_forecast.dart b/lib/screens/daily_forecast.dart index 5e43c436f..db8f98451 100644 --- a/lib/screens/daily_forecast.dart +++ b/lib/screens/daily_forecast.dart @@ -777,7 +777,7 @@ class ConditionsWidgetsForecast extends StatelessWidget { ), Positioned( left: -1, - bottom: 0, + bottom: -1, right: 0, child: Container( height: 70, diff --git a/lib/screens/edit_layout_page.dart b/lib/screens/edit_layout_page.dart index 7848b6d8b..e5bd47319 100644 --- a/lib/screens/edit_layout_page.dart +++ b/lib/screens/edit_layout_page.dart @@ -108,7 +108,7 @@ Future resetLayout() async { child: ListTile( contentPadding: EdgeInsets.only(left: 16, right: 16), minTileHeight: 65, - leading: CircleAvatar(foregroundColor: Theme.of(context).colorScheme.onTertiaryContainer, backgroundColor: Theme.of(context).colorScheme.tertiaryContainer, child: Icon(Symbols.drag_handle)), + leading: CircleAvatar(foregroundColor: Theme.of(context).colorScheme.primary, backgroundColor: Theme.of(context).colorScheme.surface, child: Icon(Symbols.drag_handle)), title: Text(getTitle(block.type.name.replaceAll(RegExp(r'([a-z])([A-Z])'), r'$1 $2')), style: TextStyle(fontWeight: FontWeight.w500, color: Theme.of(context).colorScheme.onSurface),), trailing: IconButton.filled( style: ButtonStyle( @@ -165,8 +165,8 @@ floatingActionButton: Row( await layoutProvider.saveLayout(layoutConfig); }, shape: const CircleBorder(), - backgroundColor: Theme.of(context).colorScheme.error, - foregroundColor: Theme.of(context).colorScheme.onError, + backgroundColor: Theme.of(context).colorScheme.tertiaryContainer, + foregroundColor: Theme.of(context).colorScheme.onTertiaryContainer, child: Icon(Icons.refresh), ), FloatingActionButton( diff --git a/lib/screens/meteo_models.dart b/lib/screens/meteo_models.dart index 4477c0e8f..f21e12405 100644 --- a/lib/screens/meteo_models.dart +++ b/lib/screens/meteo_models.dart @@ -164,6 +164,24 @@ final categorizedModels = { 'desc': 'model_disc_27', }, ], + 'KNMI': [ + { + 'key': 'knmi_seamless', + 'name': 'KNMI Seamless (with ECMWF)', + 'desc': 'Blended system integrating KNMI and ECMWF data for seamless global-to-local forecasts across scales.', + }, + { + 'key': 'knmi_harmonie_arome_europe', + 'name': 'KNMI Harmonie Arome Europe', + 'desc': 'High-resolution convection-permitting model covering Europe. Ideal for regional weather events and mesoscale features.', + }, + { + 'key': 'knmi_harmonie_arome_netherlands', + 'name': 'KNMI Harmonie Arome Netherlands', + 'desc': 'Ultra-high-resolution model focused on the Netherlands. Excellent for detailed local forecasts including precipitation and wind.', + }, + ], + 'UKMO': [ { 'key': 'ukmo_seamless', @@ -539,6 +557,43 @@ final Map> dialogContent = { ''' }, + 'KNMI': { + 'content': ''' +## KNMI Seamless (with ECMWF) +- **Where to use:** Netherlands + Europe + global routes + +- **Best for:** Smooth transition across forecast scales + +- **Countries:** Netherlands, broader Europe, global + +- **Notes:** Combines KNMI short-range and ECMWF global models. Useful for aviation, marine, and national-level planning. + +--- + +## KNMI Harmonie Arome Europe +- **Where to use:** Continental Europe + +- **Best for:** Mesoscale weather features (e.g. thunderstorms, wind gusts) + +- **Countries:** European countries including Netherlands, Belgium, Germany, France + +- **Notes:** Convection-permitting resolution. Very good for regional forecasting across European terrain. + +--- + +## KNMI Harmonie Arome Netherlands +- **Where to use:** Netherlands (urban and coastal areas) + +- **Best for:** High-resolution local forecasting (0–48 hours) + +- **Countries:** Netherlands + +- **Notes:** Ultra-fine resolution. Excellent for precipitation, wind, and local effects like sea breezes or fog. + +''' +}, + + }; String? selectedModelKey = PreferencesHelper.getString("selectedWeatherModel") ?? 'best_match'; diff --git a/lib/widgets/current_conditions_card.dart b/lib/widgets/current_conditions_card.dart index 0b494671b..79e0f64c3 100644 --- a/lib/widgets/current_conditions_card.dart +++ b/lib/widgets/current_conditions_card.dart @@ -263,7 +263,7 @@ List gridItems = itemOrder.map((i) { ), Positioned( - bottom: 0, + bottom: -1, left: 0, right: 0, child: SizedBox(