printBarCode static method
Prints a barcode with optional SunmiBarcodeStyle.
text
: The text for the barcode.
style
: The optional style for the barcode.
Returns a String indicating the result of the print operation, or null
.
Implementation
static Future<String?> printBarCode(String text,
{SunmiBarcodeStyle? style}) async {
final printData = {
"text": text,
if (style != null) ...style.toMap(),
};
return await SunmiPrinterPlusPlatform.instance.printBarcode(printData);
}