Move assert into constructor body. (#12331)

Temporary workaround to the fact that the Analyzer API
doesn't have a way to turn on asserts in initializers, coupled
with the fact that this file is being parsed by package:intl
using the Analyzer API.
This commit is contained in:
Todd Volkert 2017-09-29 15:16:21 -07:00 committed by GitHub
parent 2698fe852e
commit ada593e8f7

View File

@ -146,8 +146,8 @@ class DefaultMaterialLocalizations implements MaterialLocalizations {
/// [LocalizationsDelegate] implementations typically call the static [load]
/// function, rather than constructing this class directly.
DefaultMaterialLocalizations(this.locale)
: assert(locale != null),
this._localeName = _computeLocaleName(locale) {
: this._localeName = _computeLocaleName(locale) {
assert(locale != null);
if (localizations.containsKey(locale.languageCode))
_nameToValue.addAll(localizations[locale.languageCode]);
if (localizations.containsKey(_localeName))