listResolution method

LocaleListResolutionCallback listResolution({
  1. Locale? fallback,
  2. bool withCountry = true,
})

Implementation

LocaleListResolutionCallback listResolution({Locale? fallback, bool withCountry = true}) {
  return (List<Locale>? locales, Iterable<Locale> supported) {
    if (locales == null || locales.isEmpty) {
      return fallback ?? supported.first;
    } else {
      return _resolve(locales.first, fallback, supported, withCountry);
    }
  };
}