@@ -246,14 +246,11 @@ class MultiPage extends Page {
while(_index<children.length){
finalchild=children[_index];
assert((){
// Detect too big widgets
if(sameCount++>maxPages){
throwException(
'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');
}
returntrue;
}());
// 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');
}
// Create a new page if we don't already have one
if(context==null||childisNewPage){
...
...
@@ -579,3 +576,10 @@ class MultiPage extends Page {
}
}
}
/// Exception thrown when generator populates more pages than [maxPages].