getPreferredValueForLocales method

String? getPreferredValueForLocales(
  1. List<Locale> locales
)

Returns best name or title to be presented to the user according to specified locales.

The locales are expected to be ordered by priority. If no matching locale found - the default is returned. In case of empty list returns null.

  • locales Locales

Returns String?. The best name or title to be presented to the user according to specified locales, default or null if list is empty.

Implementation

String? getPreferredValueForLocales(List<Locale> locales) => $prototype.getPreferredValueForLocales(this, locales);