isSupported method
Indicate to the Flutter framework this delegate can support the passed Locale.
Implementation
@override
bool isSupported(Locale locale) {
//
bool supported;
// Assume you're supplied the App's Locale.
if (L10n._appLocale == null) {
supported = L10n.setLocale(locale);
} else {
supported = locale == L10n._appLocale;
}
if (!supported) {
supported = locale == L10n._deviceLocale;
}
if (!supported) {
supported = L10n._localesSupported.contains(locale);
}
return supported;
}