Switch from Size.isInfinite to Size.isFinite (#8868)

Fixes #4301
This commit is contained in:
Adam Barth 2017-03-19 16:04:38 -07:00 committed by GitHub
parent f1c2d78455
commit 3fc7265ad5
4 changed files with 5 additions and 5 deletions

View File

@ -150,7 +150,7 @@ class RenderBlock extends RenderBox
break;
}
assert(!size.isInfinite);
assert(size.isFinite);
}
@override

View File

@ -1533,7 +1533,7 @@ abstract class RenderBox extends RenderObject {
);
}
// verify that the size is not infinite
if (_size.isInfinite) {
if (!_size.isFinite) {
final StringBuffer information = new StringBuffer();
if (!constraints.hasBoundedWidth) {
RenderBox node = this;
@ -1658,7 +1658,7 @@ abstract class RenderBox extends RenderObject {
void performResize() {
// default behavior for subclasses that have sizedByParent = true
size = constraints.smallest;
assert(!size.isInfinite);
assert(size.isFinite);
}
@override

View File

@ -370,7 +370,7 @@ class RenderStack extends RenderBox
size = constraints.biggest;
}
assert(!size.isInfinite);
assert(size.isFinite);
child = firstChild;
while (child != null) {

View File

@ -108,7 +108,7 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox>
_orientation = configuration.orientation;
}
_size = configuration.size;
assert(!_size.isInfinite);
assert(_size.isFinite);
if (child != null)
child.layout(new BoxConstraints.tight(_size));