Skip to content

Commit

Permalink
Reland 'Pass null instead of 'none' locale' (flutter#6632)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryQian authored Oct 22, 2018
1 parent 2cd8920 commit cdd592f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/ui/window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,7 @@ class Locale {
/// Registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry).
/// Typically this means the primary language subtag should be lowercase and
/// the region subtag should be uppercase.
const Locale(this._languageCode, [ this._countryCode ]) : assert(_languageCode != null);

/// Empty locale constant. This is an invalid locale.
static const Locale none = const Locale('', '');
const Locale(this._languageCode, [ this._countryCode ]) : assert(_languageCode != null), assert(_languageCode != '');

/// The primary language subtag for the locale.
///
Expand Down Expand Up @@ -443,7 +440,7 @@ class Window {
if (_locales != null && _locales.isNotEmpty) {
return _locales.first;
}
return Locale.none;
return null;
}

/// The full system-reported supported locales of the device.
Expand Down

0 comments on commit cdd592f

Please sign in to comment.