layout method

  1. @override
void layout(
  1. Context context,
  2. BoxConstraints constraints, {
  3. 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}) {
  box = PdfRect.fromPoints(PdfPoint.zero, _applyAspectRatio(constraints));
  if (child != null) {
    child!.layout(context,
        BoxConstraints.tightFor(width: box!.width, height: box!.height));
  }
  assert(child!.box != null);
}