Open silva6 opened 4 months ago
Use a Wrap
widget as the parent of your "box" because Container
is a SpanningWidget
that can span to the next page making (accidentally) an unexpected displaying of some custom widgets.
Code:
var block = pw.Wrap(
spacing: 20.0,
runSpacing: 10.0,
children: [
pw.Container(
padding: pw.EdgeInsets.only(left: 10, right: 10, top: 5, bottom: 5),
margin: pw.EdgeInsets.only(right: 10, top: 10, bottom: 5),
width: 600.rpx,
decoration: pw.BoxDecoration(
shape: pw.BoxShape.rectangle,
borderRadius: pw.BorderRadius.all(pw.Radius.circular(10)),
border: pw.Border.all(width: 1, style: pw.BorderStyle.dashed)),
child: pw.Column(
children: wordsList,
),
),
],
);
hi guys~ I have define a widget with a border, when I use multipage, this widget is split not as expected: the first page has a blank rectangle, like this:
it's the code:
how to remove this blank rectangle, and is there any way to avoid split this widget?
Many thanks!