buildInvoice method

Future<Uint8List> buildInvoice(
  1. BuildContext context,
  2. Invoice invoice,
  3. PdfPageFormat pageFormat
)

Implementation

Future<Uint8List> buildInvoice(BuildContext context, Invoice invoice, PdfPageFormat pageFormat) async {
  try {
    final options = _createDocumentOptions(context, invoice);
    return await _documentInvoice.buildPDF(pageFormat, options);
  } catch (err) {
    throw 'buildInvoice: ${err.toString()}';
  }
}