How to tile a rectangular area by repeating images when creating in PDF file with Flutter

52 views Asked by At

I am trying to make a Flutter program to create a PDF file involving images that must to cover some areas by repeating themselves. I know it is possible to achieve that by using Box Decoration, DecorationImage, and repeat ImageRepeat, however ImageRepeat is not defined in PDF package which I am using to create PDFs. I ask you how to cover a certain rectangle(such as sized Container) by repeating an image without changing the image's size. The image can be shown as cut due to not fitting to the area.

Container(
              height: 1000,
              width: 400,
              decoration: BoxDecoration(
                image: DecorationImage(
                  image: AssetImage("images/606.jpg"),
                  repeat: ImageRepeat.repeat,
                ),
              ),
            ),

This code works in normal way in Flutter, however it doesn't work when creating PDF file with the pdf package because there is no pw.IimageRepeat or repeat: property in pw.DecorationImage widgets of the pdf package.

0

There are 0 answers