You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resetLocale() crashes if deviceLocale not in supportedLocales, the deviceLocal is not checked before setLocale. currently, i use the following code out of the library
if (context.supportedLocales.contains(context.deviceLocale)) {
context.resetLocale();
} else {
context.setLocale(context.fallbackLocale!);
}
it might be better to check that in the function resetLocale()
The text was updated successfully, but these errors were encountered:
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
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()
The text was updated successfully, but these errors were encountered: