find static method

Locale? find(
  1. Iterable<Locale> list,
  2. Locale locale
)

Implementation

static Locale? find(Iterable<Locale> list, Locale locale) {
  for (Locale l in list) {
    if (l.languageCode == locale.languageCode) {
      if ([null, '', '*', locale.countryCode].contains(l.countryCode)) {
        return l;
      }
    }
  }
  return null;
}