lookupReadyExtensionLocalizations function

ReadyExtensionLocalizations lookupReadyExtensionLocalizations(
  1. Locale locale
)

Implementation

ReadyExtensionLocalizations lookupReadyExtensionLocalizations(Locale locale) {
  // Lookup logic when only language code is specified.
  switch (locale.languageCode) {
    case 'ar':
      return ReadyExtensionLocalizationsAr();
    case 'en':
      return ReadyExtensionLocalizationsEn();
    case 'fr':
      return ReadyExtensionLocalizationsFr();
    case 'ur':
      return ReadyExtensionLocalizationsUr();
  }

  throw FlutterError(
      'ReadyExtensionLocalizations.delegate failed to load unsupported locale "$locale". This is likely '
      'an issue with the localizations generation tool. Please file an issue '
      'on GitHub with a reproducible sample app and the gen-l10n configuration '
      'that was used.');
}