IntlString constructor
IntlString(
- String value, {
- Locale? locale,
- Locale currentLocaleFunction()?,
Constructor
Notes:
- If
localeis not set or is null,currentLocaleFunctionwill be used. - If
currentLocaleFunctionis not null, it will be called to get the current locale. - If
Localeis set, it will be used andcurrentLocaleFunctionwill be ignored.
Implementation
IntlString(
this.value, {
Locale? locale,
Locale Function()? currentLocaleFunction,
}) : _languageTag =
(locale ??
(currentLocaleFunction != null
? currentLocaleFunction()
: getCurrentLocale()))
.toLanguageTag();