Skip to content

Commit fcead12

Browse files
committed
Remove manual workaround for missing locales
1 parent 84bdb56 commit fcead12

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

l10n.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ arb-dir: lib/l10n
22
template-arb-file: app_en.arb
33
output-localization-file: app_localizations.dart
44
nullable-getter: false
5+
preferred-supported-locales: [ en ]

lib/main.dart

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -158,21 +158,6 @@ class MyApp extends StatelessWidget {
158158
},
159159
localizationsDelegates: AppLocalizations.localizationsDelegates,
160160
supportedLocales: AppLocalizations.supportedLocales,
161-
162-
// Workaround for https://github.com/flutter/flutter/issues/100857
163-
localeResolutionCallback: (deviceLocale, supportedLocales) {
164-
if (deviceLocale != null) {
165-
for (final supportedLocale in supportedLocales) {
166-
// Since we currently don't support any country specific locales
167-
// such as de-DE and de-AT, it's sufficient to just check it like
168-
// this. Otherwise we will need more logic with .countryCode
169-
if (supportedLocale.languageCode == deviceLocale.languageCode) {
170-
return supportedLocale;
171-
}
172-
}
173-
}
174-
return const Locale('en');
175-
},
176161
),
177162
),
178163
);

0 commit comments

Comments
 (0)