printInvoice method
Implementation
Future<void> printInvoice(BuildContext context, Invoice invoice) async {
try {
Uint8List bytes = await buildInvoice(context, invoice, PdfPageFormat.letter);
await Printing.layoutPdf(onLayout: (PdfPageFormat format) async => bytes);
} catch(err) {
throw 'printInvoice: ${err.toString()}';
}
}