Revert "Pass null instead of 'none' locale" (flutter/engine#6622)

* Revert "Revert "Roll buildtools to 759274dd801b2f78ae0c4066101d0beca27ffc9a" (#6621)"

This reverts commit 12d4f7678b.

* Revert "Properly gate android API < 21 and remove extraneous data array. (#6619)"

This reverts commit 863ab7c18b.

* Revert "Update Dart version in Dockerfile (#6618)"

This reverts commit 2b64ec9248.

* Revert "Don't attempt to build any platform target on Fuchsia. (#6617)"

This reverts commit 1ce76760ae.

* Revert "Roll Dart to 45f9462398ae7d2e80acd79d3f9c32c7ca6f6f97 (#6616)"

This reverts commit 4b7e5ce784.

* Revert "Pass null instead of 'none' locale (#6613)"

This reverts commit 9ae28b334f.
This commit is contained in:
Gary Qian
2018-10-19 23:44:40 -07:00
committed by Dan Field
parent 12d4f7678b
commit 1c3903c8e7

View File

@@ -152,6 +152,9 @@ class Locale {
/// 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('', '');
/// The primary language subtag for the locale.
///
/// This must not be null.
@@ -440,7 +443,7 @@ class Window {
if (_locales != null && _locales.isNotEmpty) {
return _locales.first;
}
return null;
return Locale.none;
}
/// The full system-reported supported locales of the device.