buildDocument static method

Future<List<int>> buildDocument(
  1. PriceTagData priceTag
)

Implementation

static Future<List<int>> buildDocument(PriceTagData priceTag) async {

  final doc = Document();

  doc.addPage(
    Page(
      orientation: PageOrientation.landscape,
      pageFormat: PdfPageFormat(
        PriceTagLayout.labelWidth * PdfPageFormat.mm,
        PriceTagLayout.labelHeight * PdfPageFormat.mm,
        marginAll: 0.0,
      ),
      build: (context) => _buildContent(priceTag)
    ),
  );

  return await doc.save();
}