tryParse method Null safety
- String localeIdentifier
Parses Unicode Locale Identifiers to produce Locale instances.
Returns null
if localeIdentifier
is syntactically invalid.
Implementation
static Locale? tryParse(String localeIdentifier) {
ArgumentError.checkNotNull(localeIdentifier);
var parser = LocaleParser(localeIdentifier);
return parser.toLocale();
}