Remove suppression of null-related warnings (flutter/engine#21157)

This commit is contained in:
Chris Bracken
2020-09-14 13:37:01 -07:00
committed by GitHub
parent 5b645efd49
commit 308206ddd1
4 changed files with 4 additions and 10 deletions

View File

@@ -12,8 +12,6 @@ analyzer:
missing_required_param: warning
missing_return: warning
native_function_body_in_non_sdk_code: ignore
unnecessary_non_null_assertion: ignore
unnecessary_null_comparison: ignore
todo: ignore
linter:

View File

@@ -31,7 +31,6 @@ class CkParagraphStyle implements ui.ParagraphStyle {
fontStyle,
ellipsis,
) {
assert(skParagraphStyle != null);
_textDirection = textDirection ?? ui.TextDirection.ltr;
_fontFamily = fontFamily;
}

View File

@@ -656,7 +656,7 @@ class EngineWindow extends ui.Window {
assert(_browserHistory is MultiEntriesBrowserHistory);
_browserHistory.setRouteName(
message!['location'],
state: message!['state'],
state: message['state'],
);
_replyToPlatformMessage(
callback, codec.encodeSuccessEnvelope(true));

View File

@@ -528,12 +528,9 @@ class Shadow {
this.color = const Color(_kColorDefault),
this.offset = Offset.zero,
this.blurRadius = 0.0,
}) : assert(color != null,
'Text shadow color was null.'), // ignore: unnecessary_null_comparison
assert(offset != null,
'Text shadow offset was null.'), // ignore: unnecessary_null_comparison
assert(blurRadius >= 0.0,
'Text shadow blur radius should be non-negative.');
}) : assert(color != null, 'Text shadow color was null.'), // ignore: unnecessary_null_comparison
assert(offset != null, 'Text shadow offset was null.'), // ignore: unnecessary_null_comparison
assert(blurRadius >= 0.0, 'Text shadow blur radius should be non-negative.');
static const int _kColorDefault = 0xFF000000;
final Color color;