layout method
void
layout(
- Context context,
- BoxConstraints constraints, {
- bool parentUsesSize = false,
override
First widget pass to calculate the children layout and bounding box
Implementation
@override
void layout(Context context, BoxConstraints constraints,
{bool parentUsesSize = false}) {
PdfPoint size;
if (child != null) {
child!.layout(context, const BoxConstraints(), parentUsesSize: true);
assert(child!.box != null);
size = constraints
.constrainSizeAndAttemptToPreserveAspectRatio(child!.box!.size);
} else {
size = constraints.smallest;
}
box = PdfRect.fromPoints(PdfPoint.zero, size);
}