Hotfix: app appears in english, when anything other than german system language is selected
This commit is contained in:
@@ -56,6 +56,14 @@ class _AppState extends State<App> with WidgetsBindingObserver {
|
|||||||
Locale('en'), // English
|
Locale('en'), // English
|
||||||
Locale('de'), // German
|
Locale('de'), // German
|
||||||
],
|
],
|
||||||
|
localeResolutionCallback: (locale, supportedLocales) {
|
||||||
|
for (final supportedLocale in supportedLocales) {
|
||||||
|
if (supportedLocale.languageCode == locale?.languageCode) {
|
||||||
|
return supportedLocale;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return supportedLocales.first;
|
||||||
|
},
|
||||||
theme: CupertinoThemeData(
|
theme: CupertinoThemeData(
|
||||||
brightness: Brightness.dark,
|
brightness: Brightness.dark,
|
||||||
primaryColor: CustomTheme.primaryColor,
|
primaryColor: CustomTheme.primaryColor,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ name: cabo_counter
|
|||||||
description: "Mobile app for the card game Cabo"
|
description: "Mobile app for the card game Cabo"
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
|
|
||||||
version: 0.3.0+233
|
version: 0.3.0+237
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ^3.5.4
|
sdk: ^3.5.4
|
||||||
|
|||||||
Reference in New Issue
Block a user