Reland 'Pass null instead of 'none' locale' (flutter/engine#6632)
This commit is contained in:
@@ -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.
|
||||
///
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user