PosBarcode constructor

const PosBarcode(
  1. Barcode barcode, {
  2. int? width,
  3. int? height,
  4. BarcodeFont? font,
  5. BarcodeText textPosition,
  6. PosAlign align,
})

Creates ESC/POS commands for printing a barcode

  • width range and units are different depending on the printer model (some printers use 1..5)

  • height range: 1 - 255. The units depend on the printer model. Width, height, font, text position settings are effective until performing of ESC @, reset or power-off

  • textPosition defaults to BarcodeText.below

  • align defaults to PosAlign.center

Implementation

const factory PosBarcode(
  Barcode barcode, {
  int? width,
  int? height,
  BarcodeFont? font,
  BarcodeText textPosition,
  PosAlign align,
}) = _PosBarcode;