I am creating pdf file from dart and requirement are as below,
Page have below widgets,
1. Container
2. Row -- have 2 child and both have TextViews.
When code executed getting below error,
E/flutter ( 3640): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: Widget won't fit into the page as its height (985.81) exceed a page height (811.8897637795275). You probably need a SpanningWidget or use a single page layout.
Code are as below,
pdf.addPage(
pw.MultiPage(
maxPages: 30,
pageFormat: PdfPageFormat(pageWidth, pageHeight, marginBottom: 30),
build: (context) {
return [
createProfileSection(resume, pdfImage),
Padding(
padding: const EdgeInsets.fromLTRB(30, 18, 30, 0),
child: Row(
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
child: getFirstRow(resume),
flex: 4,
),
Expanded(
child: getSecondRow(resume),
flex: 6,
)
],
),
)
];
},
),
);