IntlString constructor
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 Locale is set, it will be used and
currentLocaleFunctionwill be ignored.
Implementation
IntlString(
this.value, {
Locale? locale,
Locale Function()? currentLocaleFunction,
}) : _languageTag =
(locale ??
(currentLocaleFunction != null
? currentLocaleFunction()
: getCurrentLocale()))
.toLanguageTag();