mirror of
https://github.com/pd4d10/git-touch.git
synced 2026-05-29 15:26:00 -05:00
committed by
GitHub
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,
|
||||
|
||||
Reference in New Issue
Block a user