@@ -254,11 +254,14 @@ class MultiPage extends Page {
while(_index<children.length){
finalchild=children[_index];
// Detect too big widgets
if(sameCount++>maxPages){
throwTooManyPagesException(
'This widget created more than $maxPages pages. This may be an issue in the widget or the document. See https://pub.dev/documentation/pdf/latest/widgets/MultiPage-class.html');
}
assert((){
// Detect too big widgets
if(sameCount++>maxPages){
throwTooManyPagesException(
'This widget created more than $maxPages pages. This may be an issue in the widget or the document. See https://pub.dev/documentation/pdf/latest/widgets/MultiPage-class.html');