printBarcode method

  1. @override
Future<void> printBarcode({
  1. String? deviceId,
  2. PrinterConnectionType? connectionType,
  3. required BarcodeModel printBarcodeModel,
})
override

Implementation

@override
Future<void> printBarcode({
  String? deviceId,
  PrinterConnectionType? connectionType,
  required BarcodeModel printBarcodeModel,
}) async {
  final data = printBarcodeModel.toMap();
  if (deviceId != null) data["device_id"] = deviceId;
  if (connectionType != null) data["connection_type"] = connectionType.value;
  await _channel.invokeMethod(PrinterMethod.printBarcode.value, data);
}