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