printExample method

Future<void> printExample({
  1. String? deviceId,
  2. PrinterConnectionType? connectionType,
})

Implementation

Future<void> printExample({
  String? deviceId,
  PrinterConnectionType? connectionType,
}) async {
  final image =
      await loadImageFromAssets("packages/printer_label/images/ticket.png");
  await PrinterLabel.printESC(
    deviceId: deviceId,
    connectionType: connectionType,
    printThermalModel: PrintThermalModel(image: image, size: TicketSize.mm58),
  );
}