Showing
2 changed files
with
6 additions
and
2 deletions
| @@ -226,13 +226,16 @@ class MultiPage extends Page { | @@ -226,13 +226,16 @@ class MultiPage extends Page { | ||
| 226 | child.layout(context, childConstraints, parentUsesSize: false); | 226 | child.layout(context, childConstraints, parentUsesSize: false); |
| 227 | 227 | ||
| 228 | if (offsetStart - child.box.height < offsetEnd) { | 228 | if (offsetStart - child.box.height < offsetEnd) { |
| 229 | - if (child.box.height < pageFormat.height - margin.vertical) { | 229 | + if (child.box.height <= pageFormat.height - margin.vertical) { |
| 230 | context = null; | 230 | context = null; |
| 231 | continue; | 231 | continue; |
| 232 | } | 232 | } |
| 233 | 233 | ||
| 234 | if (!(child is SpanningWidget)) { | 234 | if (!(child is SpanningWidget)) { |
| 235 | - throw Exception("Widget won't fit into the page"); | 235 | + throw Exception( |
| 236 | + 'Widget won\'t fit into the page as its height (${child.box.height}) ' | ||
| 237 | + 'exceed a page height (${pageFormat.height - margin.vertical}). ' | ||
| 238 | + 'You probably need a SpanningWidget or use a single page layout'); | ||
| 236 | } | 239 | } |
| 237 | 240 | ||
| 238 | final SpanningWidget span = child; | 241 | final SpanningWidget span = child; |
-
Please register or login to post a comment