debugPaint method
- @override
override
Override this method to paint debugging information.
Implementation
@override
void debugPaint(PaintingContext context, Offset offset) {
super.debugPaint(context, offset);
assert(() {
if (debugPaintSizeEnabled) {
final Size parentSize = getAbsoluteSizeRelativeToOrigin();
final Rect outerRect = offset & parentSize;
Size childSize;
Rect innerRect;
if (child != null) {
childSize = child.getAbsoluteSizeRelativeToOrigin();
final SliverPhysicalParentData childParentData = child.parentData;
innerRect = (offset + childParentData.paintOffset) & childSize;
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);
}
return true;
}());
}