Home > front end >  GridView Builder widget in PDF
GridView Builder widget in PDF

Time:12-27

I use this library https://pub.dev/packages/pdf to generate a PDF but the widget pw.GridView.builder does not work. The error is : The method 'builder' isn't defined for the type 'GridView'

pw.GridView.builder(
                itemCount: photoList.length,
                itemBuilder: (pw.Context context, index) {
                  return pw.Text('');
                }
            ),

If it is not managed by this library, what should I do instead ?

CodePudding user response:

This package using its own widgets, not Material widgets. The package support GridView but, GridView.builder.

The GridView has a method 'children` wherein You can build children widgets.

  • Related