We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5127c7f commit f79aa9eCopy full SHA for f79aa9e
lib/services/manager_api.dart
@@ -325,7 +325,13 @@ class ManagerAPI {
325
}
326
327
String getLocale() {
328
- return _prefs.getString('locale') ?? 'en';
+ final String? savedLocale = _prefs.getString('locale');
329
+ if (savedLocale != null && savedLocale.isNotEmpty) {
330
+ return savedLocale;
331
+ } else {
332
+ final Locale deviceLocale = PlatformDispatcher.instance.locale;
333
+ return deviceLocale.languageCode.isNotEmpty ? deviceLocale.languageCode : 'en';
334
+ }
335
336
337
Future<void> setLocale(String value) async {
0 commit comments