fromSubtags static method

Locale fromSubtags({
  1. required String languageCode,
  2. String? scriptCode,
  3. String? countryCode,
})

Constructs a Locale instance that consists of only language, script and region subtags.

Throws a FormatException if any subtag is syntactically invalid.

Implementation

static Locale fromSubtags({
  required String languageCode,
  String? scriptCode,
  String? countryCode,
}) => LocaleImplementation.fromSubtags(
  languageCode: languageCode,
  scriptCode: scriptCode,
  countryCode: countryCode,
);