mirror of
https://github.com/git-touch/git-touch
synced 2025-02-02 08:56:54 +01:00
parent
1bee099191
commit
8aa660437f
14
lib/app.dart
14
lib/app.dart
@ -17,7 +17,12 @@ class MyApp extends StatelessWidget {
|
||||
home: Home(),
|
||||
localeResolutionCallback:
|
||||
(Locale locale, Iterable<Locale> supportedLocales) {
|
||||
return locale;
|
||||
for (final supportedLocale in supportedLocales) {
|
||||
if (locale.languageCode == supportedLocale.languageCode) {
|
||||
return supportedLocale;
|
||||
}
|
||||
}
|
||||
return supportedLocales.first;
|
||||
},
|
||||
localizationsDelegates: [
|
||||
S.delegate,
|
||||
@ -47,7 +52,12 @@ class MyApp extends StatelessWidget {
|
||||
home: Home(),
|
||||
localeResolutionCallback:
|
||||
(Locale locale, Iterable<Locale> supportedLocales) {
|
||||
return locale;
|
||||
for (final supportedLocale in supportedLocales) {
|
||||
if (locale.languageCode == supportedLocale.languageCode) {
|
||||
return supportedLocale;
|
||||
}
|
||||
}
|
||||
return supportedLocales.first;
|
||||
},
|
||||
localizationsDelegates: [
|
||||
S.delegate,
|
||||
|
Loading…
x
Reference in New Issue
Block a user