Closed bbsmartc closed 2 months ago
locale.supports() is defined in LocaleExtension on Locale in EasyLocalizationController, it's better to use supportedLocales.any((locale) =>locale.supports(deviceLocale))
instead of supportedLocales.contains(deviceLocale)
.
Because supportedLocales is not saved to local variable in EasyLocalizationController, i did not make a pull request to avoid disrupting the code. it's better to always use selectLocaleFrom(supportedLocale, inputLocale, fallbackLocale) to ensure a fallback, in resetLocale() in EasyLocalizationController, instead of directly assigning the deviceLocale to _local
i will make a pull request
resetLocale() crashes if deviceLocale not in supportedLocales, the deviceLocal is not checked before setLocale. currently, i use the following code out of the library
it might be better to check that in the function resetLocale()