shareInvoice method
Implementation
Future<void> shareInvoice(BuildContext context, Invoice invoice, String filename) async {
try {
Uint8List bytes = await buildInvoice(context, invoice, PdfPageFormat.letter);
await Printing.sharePdf(bytes: bytes, filename: '$filename.pdf');
} catch(err) {
throw 'shareInvoice: ${err.toString()}';
}
}