From 0e6caa1edc14498a459e54c6853d5a82fcb92c66 Mon Sep 17 00:00:00 2001 From: Gary Qian Date: Mon, 22 Oct 2018 15:21:04 -0700 Subject: [PATCH] Reland 'Pass null instead of 'none' locale' (flutter/engine#6632) --- engine/src/flutter/lib/ui/window.dart | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/engine/src/flutter/lib/ui/window.dart b/engine/src/flutter/lib/ui/window.dart index 2c4f283214..28f9137246 100644 --- a/engine/src/flutter/lib/ui/window.dart +++ b/engine/src/flutter/lib/ui/window.dart @@ -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.