Skip to content
This repository has been archived by the owner on Feb 25, 2025. It is now read-only.

Commit

Permalink
Remove suppression of null-related warnings
Browse files Browse the repository at this point in the history
Since dart-lang/sdk#41905 has closed, this CL removes the suppression of
unnecessary_non_null_assertion and unnecessary_null_comparison.

Related issues: dart-lang/sdk#41905 (resolved)
  • Loading branch information
cbracken committed Sep 14, 2020
1 parent 9dd3f09 commit bd67bc4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 0 additions & 2 deletions lib/web_ui/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 0 additions & 1 deletion lib/web_ui/lib/src/engine/canvaskit/text.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class CkParagraphStyle implements ui.ParagraphStyle {
fontStyle,
ellipsis,
) {
assert(skParagraphStyle != null);
_textDirection = textDirection ?? ui.TextDirection.ltr;
_fontFamily = fontFamily;
}
Expand Down
9 changes: 3 additions & 6 deletions lib/web_ui/lib/src/ui/painting.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bd67bc4

Please sign in to comment.