From b8b0b560cdd74d8b9ff961ca70faa7874fd8a03f Mon Sep 17 00:00:00 2001 From: Georgiy Khloptov Date: Thu, 21 Dec 2023 12:46:01 +0500 Subject: [PATCH] Ignore _savedLocale on start when saveLocale is false (#430) --- lib/src/easy_localization_controller.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/easy_localization_controller.dart b/lib/src/easy_localization_controller.dart index 494c344b..c596cfa7 100644 --- a/lib/src/easy_localization_controller.dart +++ b/lib/src/easy_localization_controller.dart @@ -42,7 +42,7 @@ class EasyLocalizationController extends ChangeNotifier { _supportedLocales = supportedLocales; if (forceLocale != null) { _locale = forceLocale; - } else if (_savedLocale == null && startLocale != null) { + } else if ((!saveLocale || _savedLocale == null) && startLocale != null) { _locale = _getFallbackLocale(supportedLocales, startLocale); EasyLocalization.logger('Start locale loaded ${_locale.toString()}'); }