printBarcode method

  1. @override
Future<void> printBarcode(
  1. String content, {
  2. PBarcodeType type = PBarcodeType.eab13,
  3. PStringEncoding encoding = PStringEncoding.utf8,
})
override

Prints a barcode with the specified content.

Parameters:

Implementation

@override
Future<void> printBarcode(
  String content, {
  PBarcodeType type = PBarcodeType.eab13,
  PStringEncoding encoding = PStringEncoding.utf8,
}) {
  final args = {
    'content': content,
    'type': type.index,
    'encoding': encoding.index,
  };

  return methodChannel.invokeMethod<void>('printBarcode', args);
}