printBarcode static method

Future<void> printBarcode({
  1. required String barcode,
  2. BarcodeType? type,
  3. int height = 30,
  4. int width = 3,
  5. BarcodeTextPosition textPosition = BarcodeTextPosition.noText,
})

Prints a barcode barcode, barcodeType must be provided. height and width can be customized. Defaults are height = 30 and width = 3

Implementation

static Future<void> printBarcode(
    {required String barcode,
    BarcodeType? type,
    int height = 30,
    int width = 3,
    BarcodeTextPosition textPosition = BarcodeTextPosition.noText}) async {
  await _channel.invokeMethod("printBarcode", <String, dynamic>{
    'barcode': barcode,
    "type": type?.value,
    'textPosition': textPosition.value,
    'width': width,
    'height': height,
  });
}