Document not passing empty-strings into Locale (flutter/engine#6818)
This commit is contained in:
@@ -135,7 +135,8 @@ class WindowPadding {
|
||||
/// [Locale].
|
||||
class Locale {
|
||||
/// Creates a new Locale object. The first argument is the
|
||||
/// primary language subtag, the second is the region subtag.
|
||||
/// primary language subtag, the second is the region (also
|
||||
/// referred to as 'country') subtag.
|
||||
///
|
||||
/// For example:
|
||||
///
|
||||
@@ -145,7 +146,8 @@ class Locale {
|
||||
/// ```
|
||||
///
|
||||
/// The primary language subtag must not be null. The region subtag is
|
||||
/// optional.
|
||||
/// optional. When there is no region/country subtag, the parameter should
|
||||
/// be omitted or passed `null` instead of an empty-string.
|
||||
///
|
||||
/// The subtag values are _case sensitive_ and must be one of the valid
|
||||
/// subtags according to CLDR supplemental data:
|
||||
@@ -182,6 +184,9 @@ class Locale {
|
||||
/// [region](http://unicode.org/cldr/latest/common/validity/region.xml) for
|
||||
/// each of languageCode, scriptCode and countryCode respectively.
|
||||
///
|
||||
/// The [countryCode] subtag is optional. When there is no country subtag,
|
||||
/// the parameter should be omitted or passed `null` instead of an empty-string.
|
||||
///
|
||||
/// Validity is not checked by default, but some methods may throw away
|
||||
/// invalid data.
|
||||
const Locale.fromSubtags({
|
||||
|
||||
Reference in New Issue
Block a user