Skip to content

Commit

Permalink
Revert "Pass null instead of 'none' locale" (flutter#6622)
Browse files Browse the repository at this point in the history
* Revert "Revert "Roll buildtools to 759274dd801b2f78ae0c4066101d0beca27ffc9a" (flutter#6621)"

This reverts commit 9de880c.

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

This reverts commit 8cb3965.

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

This reverts commit 2091c0d.

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

This reverts commit 739d66e.

* Revert "Roll Dart to 45f9462 (flutter#6616)"

This reverts commit 7d49036.

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

This reverts commit 6c84c5f.
  • Loading branch information
GaryQian authored and dnfield committed Oct 20, 2018
1 parent 9de880c commit ce36d85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/ui/window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit ce36d85

Please sign in to comment.