generate method

void generate(
  1. Document document, {
  2. bool insert = true,
  3. int? index,
})

Implementation

void generate(Document document, {bool insert = true, int? index}) {
  if (index != null) {
    if (insert) {
      _pdfPage =
          PdfPage(document.document, pageFormat: pageFormat, index: index);
    } else {
      _pdfPage = document.document.page(index);
    }
  } else {
    _pdfPage = PdfPage(document.document, pageFormat: pageFormat);
  }
}