Skip to content

Commit

Permalink
Document not passing empty-strings into Locale (flutter#6818)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryQian authored Nov 11, 2018
1 parent bdd5640 commit 06377b1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/ui/window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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:
///
Expand All @@ -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:
Expand Down Expand Up @@ -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({
Expand Down

0 comments on commit 06377b1

Please sign in to comment.