printBarcode method

Future<String?> printBarcode(
  1. String barcodeData, {
  2. String x = '10',
  3. String y = '10',
  4. int type = 4,
  5. String orientation = 'N',
  6. String height = '100',
  7. String f = 'Y',
})

Prints barcodeData as a barcode label.

Parameters:

  • x, y – origin coordinates in dots.
  • type – symbology: 0=Code39, 1=EAN-8, 2=UPC-E, 3=Code93, 4=Code128 (default), 5=EAN-13.
  • orientation – rotation: 'N' (0°), 'R' (90°), 'I' (180°), 'B' (270°).
  • height – bar height in dots.
  • f'Y' to show human-readable text below the bars.

Implementation

Future<String?> printBarcode(
  String barcodeData, {
  String x = '10',
  String y = '10',
  int type = 4,
  String orientation = 'N',
  String height = '100',
  String f = 'Y',
}) {
  return _repository.printBarcode(
    barcodeData,
    x: x,
    y: y,
    type: type,
    orientation: orientation,
    height: height,
    f: f,
  );
}