Skip to content

Commit

Permalink
remove ignores (flutter#25131)
Browse files Browse the repository at this point in the history
  • Loading branch information
goderbauer authored Mar 25, 2021
1 parent 31ae00e commit 0353b71
Show file tree
Hide file tree
Showing 23 changed files with 174 additions and 201 deletions.
2 changes: 1 addition & 1 deletion ci/licenses_golden/tool_signature
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Signature: f2b15cda839d356d1d2a906e432770d6
Signature: 249aeecf2b9a309a2b26c2be6cd18b12

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// found in the LICENSE file.

import 'dart:html' as html;
// ignore: undefined_shown_name
import 'dart:ui' as ui show platformViewRegistry;
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
Expand Down Expand Up @@ -37,7 +36,6 @@ void main() async {
int viewInstanceCount = 0;

platformViewsRegistry.getNextPlatformViewId();
// ignore: undefined_prefixed_name
ui.platformViewRegistry.registerViewFactory('MyView', (int viewId) {
++viewInstanceCount;
return html.DivElement();
Expand Down
19 changes: 9 additions & 10 deletions lib/ui/compositing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ class SceneBuilder extends NativeFieldWrapperClass2 {
Clip clipBehavior = Clip.antiAlias,
ClipRectEngineLayer? oldLayer,
}) {
assert(clipBehavior != null); // ignore: unnecessary_null_comparison
assert(clipBehavior != null);
assert(clipBehavior != Clip.none);
assert(_debugCheckCanBeUsedAsOldLayer(oldLayer, 'pushClipRect'));
final EngineLayer engineLayer = EngineLayer._();
Expand Down Expand Up @@ -368,7 +368,7 @@ class SceneBuilder extends NativeFieldWrapperClass2 {
Clip clipBehavior = Clip.antiAlias,
ClipRRectEngineLayer? oldLayer,
}) {
assert(clipBehavior != null); // ignore: unnecessary_null_comparison
assert(clipBehavior != null);
assert(clipBehavior != Clip.none);
assert(_debugCheckCanBeUsedAsOldLayer(oldLayer, 'pushClipRRect'));
final EngineLayer engineLayer = EngineLayer._();
Expand Down Expand Up @@ -396,7 +396,7 @@ class SceneBuilder extends NativeFieldWrapperClass2 {
Clip clipBehavior = Clip.antiAlias,
ClipPathEngineLayer? oldLayer,
}) {
assert(clipBehavior != null); // ignore: unnecessary_null_comparison
assert(clipBehavior != null);
assert(clipBehavior != Clip.none);
assert(_debugCheckCanBeUsedAsOldLayer(oldLayer, 'pushClipPath'));
final EngineLayer engineLayer = EngineLayer._();
Expand Down Expand Up @@ -451,10 +451,10 @@ class SceneBuilder extends NativeFieldWrapperClass2 {
ColorFilter filter, {
ColorFilterEngineLayer? oldLayer,
}) {
assert(filter != null); // ignore: unnecessary_null_comparison
assert(filter != null);
assert(_debugCheckCanBeUsedAsOldLayer(oldLayer, 'pushColorFilter'));
final _ColorFilter nativeFilter = filter._toNativeColorFilter()!;
assert(nativeFilter != null); // ignore: unnecessary_null_comparison
assert(nativeFilter != null);
final EngineLayer engineLayer = EngineLayer._();
_pushColorFilter(engineLayer, nativeFilter, oldLayer?._nativeLayer);
final ColorFilterEngineLayer layer = ColorFilterEngineLayer._(engineLayer);
Expand All @@ -479,10 +479,10 @@ class SceneBuilder extends NativeFieldWrapperClass2 {
ImageFilter filter, {
ImageFilterEngineLayer? oldLayer,
}) {
assert(filter != null); // ignore: unnecessary_null_comparison
assert(filter != null);
assert(_debugCheckCanBeUsedAsOldLayer(oldLayer, 'pushImageFilter'));
final _ImageFilter nativeFilter = filter._toNativeImageFilter();
assert(nativeFilter != null); // ignore: unnecessary_null_comparison
assert(nativeFilter != null);
final EngineLayer engineLayer = EngineLayer._();
_pushImageFilter(engineLayer, nativeFilter, oldLayer?._nativeLayer);
final ImageFilterEngineLayer layer = ImageFilterEngineLayer._(engineLayer);
Expand Down Expand Up @@ -577,7 +577,6 @@ class SceneBuilder extends NativeFieldWrapperClass2 {
/// {@macro dart.ui.sceneBuilder.oldLayerVsRetained}
///
/// See [pop] for details about the operation stack, and [Clip] for different clip modes.
// ignore: deprecated_member_use
PhysicalShapeEngineLayer? pushPhysicalShape({
required Path path,
required double elevation,
Expand Down Expand Up @@ -727,7 +726,7 @@ class SceneBuilder extends NativeFieldWrapperClass2 {
bool freeze = false,
FilterQuality filterQuality = FilterQuality.low,
}) {
assert(offset != null, 'Offset argument was null'); // ignore: unnecessary_null_comparison
assert(offset != null, 'Offset argument was null');
_addTexture(offset.dx, offset.dy, width, height, textureId, freeze, filterQuality.index);
}

Expand Down Expand Up @@ -756,7 +755,7 @@ class SceneBuilder extends NativeFieldWrapperClass2 {
double width = 0.0,
double height = 0.0,
}) {
assert(offset != null, 'Offset argument was null'); // ignore: unnecessary_null_comparison
assert(offset != null, 'Offset argument was null');
_addPlatformView(offset.dx, offset.dy, width, height, viewId);
}

Expand Down
46 changes: 23 additions & 23 deletions lib/ui/geometry.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ abstract class OffsetBase {
/// The first argument sets the horizontal component, and the second the
/// vertical component.
const OffsetBase(this._dx, this._dy)
: assert(_dx != null), // ignore: unnecessary_null_comparison
assert(_dy != null); // ignore: unnecessary_null_comparison
: assert(_dx != null),
assert(_dy != null);

final double _dx;
final double _dy;
Expand Down Expand Up @@ -316,7 +316,7 @@ class Offset extends OffsetBase {
/// Values for `t` are usually obtained from an [Animation<double>], such as
/// an [AnimationController].
static Offset? lerp(Offset? a, Offset? b, double t) {
assert(t != null); // ignore: unnecessary_null_comparison
assert(t != null);
if (b == null) {
if (a == null) {
return null;
Expand Down Expand Up @@ -587,7 +587,7 @@ class Size extends OffsetBase {
/// Values for `t` are usually obtained from an [Animation<double>], such as
/// an [AnimationController].
static Size? lerp(Size? a, Size? b, double t) {
assert(t != null); // ignore: unnecessary_null_comparison
assert(t != null);
if (b == null) {
if (a == null) {
return null;
Expand Down Expand Up @@ -632,10 +632,10 @@ class Rect {
/// Construct a rectangle from its left, top, right, and bottom edges.
@pragma('vm:entry-point')
const Rect.fromLTRB(this.left, this.top, this.right, this.bottom)
: assert(left != null), // ignore: unnecessary_null_comparison
assert(top != null), // ignore: unnecessary_null_comparison
assert(right != null), // ignore: unnecessary_null_comparison
assert(bottom != null); // ignore: unnecessary_null_comparison
: assert(left != null),
assert(top != null),
assert(right != null),
assert(bottom != null);

/// Construct a rectangle from its left and top edges, its width, and its
/// height.
Expand Down Expand Up @@ -864,7 +864,7 @@ class Rect {
/// Values for `t` are usually obtained from an [Animation<double>], such as
/// an [AnimationController].
static Rect? lerp(Rect? a, Rect? b, double t) {
assert(t != null); // ignore: unnecessary_null_comparison
assert(t != null);
if (b == null) {
if (a == null) {
return null;
Expand Down Expand Up @@ -993,7 +993,7 @@ class Radius {
/// Values for `t` are usually obtained from an [Animation<double>], such as
/// an [AnimationController].
static Radius? lerp(Radius? a, Radius? b, double t) {
assert(t != null); // ignore: unnecessary_null_comparison
assert(t != null);
if (b == null) {
if (a == null) {
return null;
Expand Down Expand Up @@ -1179,18 +1179,18 @@ class RRect {
this.brRadiusY = 0.0,
this.blRadiusX = 0.0,
this.blRadiusY = 0.0,
}) : assert(left != null), // ignore: unnecessary_null_comparison
assert(top != null), // ignore: unnecessary_null_comparison
assert(right != null), // ignore: unnecessary_null_comparison
assert(bottom != null), // ignore: unnecessary_null_comparison
assert(tlRadiusX != null), // ignore: unnecessary_null_comparison
assert(tlRadiusY != null), // ignore: unnecessary_null_comparison
assert(trRadiusX != null), // ignore: unnecessary_null_comparison
assert(trRadiusY != null), // ignore: unnecessary_null_comparison
assert(brRadiusX != null), // ignore: unnecessary_null_comparison
assert(brRadiusY != null), // ignore: unnecessary_null_comparison
assert(blRadiusX != null), // ignore: unnecessary_null_comparison
assert(blRadiusY != null); // ignore: unnecessary_null_comparison
}) : assert(left != null),
assert(top != null),
assert(right != null),
assert(bottom != null),
assert(tlRadiusX != null),
assert(tlRadiusY != null),
assert(trRadiusX != null),
assert(trRadiusY != null),
assert(brRadiusX != null),
assert(brRadiusY != null),
assert(blRadiusX != null),
assert(blRadiusY != null);

Float32List get _value32 => Float32List.fromList(<double>[
left,
Expand Down Expand Up @@ -1558,7 +1558,7 @@ class RRect {
/// Values for `t` are usually obtained from an [Animation<double>], such as
/// an [AnimationController].
static RRect? lerp(RRect? a, RRect? b, double t) {
assert(t != null); // ignore: unnecessary_null_comparison
assert(t != null);
if (b == null) {
if (a == null) {
return null;
Expand Down
8 changes: 4 additions & 4 deletions lib/ui/hooks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ void _invoke(void Function()? callback, Zone zone) {
return;
}

assert(zone != null); // ignore: unnecessary_null_comparison
assert(zone != null);

if (identical(zone, Zone.current)) {
callback();
Expand All @@ -174,7 +174,7 @@ void _invoke1<A>(void Function(A a)? callback, Zone zone, A arg) {
return;
}

assert(zone != null); // ignore: unnecessary_null_comparison
assert(zone != null);

if (identical(zone, Zone.current)) {
callback(arg);
Expand All @@ -193,7 +193,7 @@ void _invoke2<A1, A2>(void Function(A1 a1, A2 a2)? callback, Zone zone, A1 arg1,
return;
}

assert(zone != null); // ignore: unnecessary_null_comparison
assert(zone != null);

if (identical(zone, Zone.current)) {
callback(arg1, arg2);
Expand All @@ -214,7 +214,7 @@ void _invoke3<A1, A2, A3>(void Function(A1 a1, A2 a2, A3 a3)? callback, Zone zon
return;
}

assert(zone != null); // ignore: unnecessary_null_comparison
assert(zone != null);

if (identical(zone, Zone.current)) {
callback(arg1, arg2, arg3);
Expand Down
8 changes: 4 additions & 4 deletions lib/ui/isolate_name_server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class IsolateNameServer {
///
/// The `name` argument must not be null.
static SendPort? lookupPortByName(String name) {
assert(name != null, "'name' cannot be null."); // ignore: unnecessary_null_comparison
assert(name != null, "'name' cannot be null.");
return _lookupPortByName(name);
}

Expand All @@ -51,8 +51,8 @@ class IsolateNameServer {
///
/// The `port` and `name` arguments must not be null.
static bool registerPortWithName(SendPort port, String name) {
assert(port != null, "'port' cannot be null."); // ignore: unnecessary_null_comparison
assert(name != null, "'name' cannot be null."); // ignore: unnecessary_null_comparison
assert(port != null, "'port' cannot be null.");
assert(name != null, "'name' cannot be null.");
return _registerPortWithName(port, name);
}

Expand All @@ -68,7 +68,7 @@ class IsolateNameServer {
///
/// The `name` argument must not be null.
static bool removePortNameMapping(String name) {
assert(name != null, "'name' cannot be null."); // ignore: unnecessary_null_comparison
assert(name != null, "'name' cannot be null.");
return _removePortNameMapping(name);
}

Expand Down
Loading

0 comments on commit 0353b71

Please sign in to comment.