localeResolutionCallback method
Implementation
Locale? localeResolutionCallback(
Locale? locale,
Iterable<Locale> supportedLocales,
) {
Locale? ret;
int index = supportedLocales.toList().lastIndexWhere(
(element) => element.languageCode == locale?.languageCode);
if (index == -1) {
ret = displayLanguageWhenNotSupported;
} else {
ret = supportedLocales.elementAt(index);
}
return ret;
}