lookupMonthYearPickerLocalizations function

MonthYearPickerLocalizations lookupMonthYearPickerLocalizations(
  1. Locale locale
)

Implementation

MonthYearPickerLocalizations lookupMonthYearPickerLocalizations(Locale locale) {
  // Lookup logic when language+country codes are specified.
  switch (locale.languageCode) {
    case 'zh':
      {
        switch (locale.countryCode) {
          case 'CH':
            return MonthYearPickerLocalizationsZhCh();
        }
        break;
      }
  }

  // Lookup logic when only language code is specified.
  switch (locale.languageCode) {
    case 'ar':
      return MonthYearPickerLocalizationsAr();
    case 'de':
      return MonthYearPickerLocalizationsDe();
    case 'en':
      return MonthYearPickerLocalizationsEn();
    case 'fr':
      return MonthYearPickerLocalizationsFr();
    case 'id':
      return MonthYearPickerLocalizationsId();
    case 'ja':
      return MonthYearPickerLocalizationsJa();
    case 'ko':
      return MonthYearPickerLocalizationsKo();
    case 'ms':
      return MonthYearPickerLocalizationsMs();
    case 'pt':
      return MonthYearPickerLocalizationsPt();
    case 'th':
      return MonthYearPickerLocalizationsTh();
    case 'tr':
      return MonthYearPickerLocalizationsTr();
    case 'vi':
      return MonthYearPickerLocalizationsVi();
    case 'zh':
      return MonthYearPickerLocalizationsZh();
  }

  throw FlutterError(
      'MonthYearPickerLocalizations.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.');
}