diff --git a/lib/providers/user_preferences_provider.dart b/lib/providers/user_preferences_provider.dart index 91731ab..170945f 100644 --- a/lib/providers/user_preferences_provider.dart +++ b/lib/providers/user_preferences_provider.dart @@ -75,7 +75,7 @@ class _UserPreferencesProviderState extends State late bool dynamicColor = userPreferencesService.dynamicColor; late EvSourceType evSourceType; - late final MeteringScreenLayoutConfig meteringScreenLayout = + late MeteringScreenLayoutConfig meteringScreenLayout = ServicesProvider.of(context).userPreferencesService.meteringScreenLayout; late Color primaryColor = userPreferencesService.primaryColor; late StopType stopType = userPreferencesService.stopType; @@ -174,13 +174,7 @@ class _UserPreferencesProviderState extends State void setMeteringScreenLayout(MeteringScreenLayoutConfig config) { setState(() { - config.forEach((key, value) { - meteringScreenLayout.update( - key, - (_) => value, - ifAbsent: () => value, - ); - }); + meteringScreenLayout = config; }); ServicesProvider.of(context).userPreferencesService.meteringScreenLayout = meteringScreenLayout; }