Skip to content

Commit a35584d

Browse files
committed
Assert not null
1 parent 1948bf6 commit a35584d

4 files changed

Lines changed: 9 additions & 0 deletions

File tree

‎packages/flutter/lib/src/painting/decoration_image.dart‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ void paintImage({
383383
assert(alignment != null);
384384
assert(repeat != null);
385385
assert(flipHorizontally != null);
386+
assert(isAntiAlias != null);
386387
if (rect.isEmpty)
387388
return;
388389
Size outputSize = rect.size;

‎packages/flutter/lib/src/rendering/image.dart‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class RenderImage extends RenderBox {
4545
assert(alignment != null),
4646
assert(filterQuality != null),
4747
assert(matchTextDirection != null),
48+
assert(isAntiAlias != null),
4849
_image = image,
4950
_width = width,
5051
_height = height,
@@ -298,6 +299,7 @@ class RenderImage extends RenderBox {
298299
if (_isAntiAlias == value) {
299300
return;
300301
}
302+
assert(value != null);
301303
_isAntiAlias = value;
302304
markNeedsPaint();
303305
}

‎packages/flutter/lib/src/widgets/basic.dart‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5234,6 +5234,7 @@ class RawImage extends LeafRenderObjectWidget {
52345234
assert(alignment != null),
52355235
assert(repeat != null),
52365236
assert(matchTextDirection != null),
5237+
assert(isAntiAlias != null),
52375238
super(key: key);
52385239

52395240
/// The image to display.

‎packages/flutter/lib/src/widgets/image.dart‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ class Image extends StatefulWidget {
339339
assert(repeat != null),
340340
assert(filterQuality != null),
341341
assert(matchTextDirection != null),
342+
assert(isAntiAlias != null),
342343
super(key: key);
343344

344345
/// Creates a widget that displays an [ImageStream] obtained from the network.
@@ -404,6 +405,7 @@ class Image extends StatefulWidget {
404405
assert(matchTextDirection != null),
405406
assert(cacheWidth == null || cacheWidth > 0),
406407
assert(cacheHeight == null || cacheHeight > 0),
408+
assert(isAntiAlias != null),
407409
super(key: key);
408410

409411
/// Creates a widget that displays an [ImageStream] obtained from a [File].
@@ -460,6 +462,7 @@ class Image extends StatefulWidget {
460462
assert(matchTextDirection != null),
461463
assert(cacheWidth == null || cacheWidth > 0),
462464
assert(cacheHeight == null || cacheHeight > 0),
465+
assert(isAntiAlias != null),
463466
super(key: key);
464467

465468

@@ -627,6 +630,7 @@ class Image extends StatefulWidget {
627630
assert(matchTextDirection != null),
628631
assert(cacheWidth == null || cacheWidth > 0),
629632
assert(cacheHeight == null || cacheHeight > 0),
633+
assert(isAntiAlias != null),
630634
super(key: key);
631635

632636
/// Creates a widget that displays an [ImageStream] obtained from a [Uint8List].
@@ -683,6 +687,7 @@ class Image extends StatefulWidget {
683687
assert(matchTextDirection != null),
684688
assert(cacheWidth == null || cacheWidth > 0),
685689
assert(cacheHeight == null || cacheHeight > 0),
690+
assert(isAntiAlias != null),
686691
super(key: key);
687692

688693
/// The image to display.

0 commit comments

Comments
 (0)