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.


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