appLocale not null

This commit is contained in:
Bossanyi Tibor 2020-07-10 09:35:14 +02:00
parent d8b9cf18f0
commit f0f0136d65

View File

@ -22,8 +22,9 @@ class AppLanguage extends ChangeNotifier {
var prefs = await SharedPreferences.getInstance();
if (prefs.getString('language_code') == null) {
_appLocale = Locale('en');
} else {
_appLocale = Locale(prefs.getString('language_code'));
}
_appLocale = Locale(prefs.getString('language_code'));
print(" ---- Fetched lang: " + _appLocale.toString());
}