Repository metrics
- Stars
- (249 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
I have manually specified the order of locales in my app as
supportedLocales: const [
Locale('en'),
Locale('nb'),
],
together with two translation files for en and nb. However, everytime i start the app i get the message that the application's locale (en) not support by the localization delegate. So after investigating i noticed that the plugin generates the following list of supported locales:
List<Locale> get supportedLocales {
return const <Locale>[
Locale("nb", ""),
Locale("en", ""),
];
}
Which, according to the official documentation, is not correct and probably the reason why the locale resolution fails (emphasis mine):
The primary language subtag must not be null. The region subtag is optional. When there is no region/country subtag, the parameter should be omitted or passed
nullinstead of an empty-string.