addBarcode method Null safety
添加条码
x
起点X坐标
y
起点Y坐标
text
内容
barcodeType
条码类型
height
条码高度
rotation
旋转角度
narrowUnit
窄条
widthUnit
宽条
showHumanReadText
显示文本
Implementation
void addBarcode(
{required int x,
required int y,
required String text,
required int height,
String barcodeType = barcodeCode128,
int rotation = 0,
int narrowUnit = 2,
int widthUnit = 2,
bool showHumanReadText = false}) {
addString(
"BARCODE $x,$y,\"$barcodeType\",$height,${showHumanReadText ? 1 : 0},$rotation,$narrowUnit,$widthUnit,\"$text\"\r\n");
}