From a34b4387d49c2ce00ba40f6853e2e78cd1d5e499 Mon Sep 17 00:00:00 2001 From: Viachaslau Lyskouski Date: Thu, 26 Sep 2024 14:37:32 +0200 Subject: [PATCH] [#494] [BF] Markdown alignments. Fix initialization --- lib/_classes/herald/app_locale.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/_classes/herald/app_locale.dart b/lib/_classes/herald/app_locale.dart index 2407db6f95..472ab22650 100644 --- a/lib/_classes/herald/app_locale.dart +++ b/lib/_classes/herald/app_locale.dart @@ -1,6 +1,7 @@ // Copyright 2023 The terCAD team. All rights reserved. // Use of this source code is governed by a CC BY-NC-ND 4.0 license that can be found in the LICENSE file. +import 'package:app_finance/_classes/herald/app_design.dart'; import 'package:app_finance/_classes/storage/app_preferences.dart'; import 'package:flutter/material.dart'; import 'package:flutter_currency_picker/flutter_currency_picker.dart'; @@ -28,6 +29,9 @@ class AppLocale extends ValueNotifier { value = loc; code = value.toString(); await AppPreferences.set(AppPreferences.prefLocale, newValue); + if (AppPreferences.get(AppPreferences.prefDesign) == null) { + await AppPreferences.set(AppPreferences.prefDesign, AppDesign.fromLocale(loc)); + } CurrencyDefaults.defaultLocale = loc; if (callback != null) { callback();