Fix the SliverPadding debugPaint (#7989)

...for the case where there's no right or bottom padding.
This commit is contained in:
Ian Hickson
2017-02-08 15:22:20 -08:00
committed by GitHub
parent 4e95701541
commit 761cf15c2b

View File

@@ -315,8 +315,10 @@ class RenderSliverPadding extends RenderSliver with RenderObjectWithChildMixin<R
childSize = child.getAbsoluteSizeRelativeToOrigin();
final SliverPhysicalParentData childParentData = child.parentData;
innerRect = (offset + childParentData.paintOffset) & childSize;
assert(outerRect.contains(innerRect.topLeft));
assert(outerRect.contains(innerRect.bottomRight));
assert(innerRect.top >= outerRect.top);
assert(innerRect.left >= outerRect.left);
assert(innerRect.right <= outerRect.right);
assert(innerRect.bottom <= outerRect.bottom);
}
debugPaintPadding(context.canvas, outerRect, innerRect);
}