Hotfix: app appears in english, when anything other than german system language is selected

This commit is contained in:
2025-06-13 17:48:46 +02:00
parent fbc43e4893
commit abd60c6af8
2 changed files with 9 additions and 1 deletions

View File

@@ -56,6 +56,14 @@ class _AppState extends State<App> with WidgetsBindingObserver {
Locale('en'), // English
Locale('de'), // German
],
localeResolutionCallback: (locale, supportedLocales) {
for (final supportedLocale in supportedLocales) {
if (supportedLocale.languageCode == locale?.languageCode) {
return supportedLocale;
}
}
return supportedLocales.first;
},
theme: CupertinoThemeData(
brightness: Brightness.dark,
primaryColor: CustomTheme.primaryColor,

View File

@@ -2,7 +2,7 @@ name: cabo_counter
description: "Mobile app for the card game Cabo"
publish_to: 'none'
version: 0.3.0+233
version: 0.3.0+237
environment:
sdk: ^3.5.4