I am having difficulty in pdf.addPage() FLUTTER

Asked

Viewed 18 times

0

I’m putting this table inside the PDF:

pdf.addPage(
      pw.MultiPage(
        build: (context) => [
          pw.Table.fromTextArray(context: context, data: <List<String>>[
            <String>['Produto', 'Valor'],
            //
          ]),
        ],
      ),
    );

AND IT WORKS PERFECTLY BUT I WANTED TO PUT THE RESULT OF A SEARCH IN FIREBASE INSIDE THE PDF:

var result = await Firestore.instance.collection("produto").getDocuments();

but I’m not getting it :,(

  • Are you using the getDocuments(), it returns you an "array" of documents, you need to scroll through it and grab the property data of each document that is where will get the values you want.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.