Tspl class Null safety

Inheritance

Constructors

Tspl(int width, int height)
factory

Properties

hashCode int
The hash code for this object.
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

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}) → void
添加条码 x 起点X坐标 y 起点Y坐标 text 内容 barcodeType 条码类型 height 条码高度 rotation 旋转角度 narrowUnit 窄条 widthUnit 宽条 showHumanReadText 显示文本
addBitmap({required int x, required int y, required ImageProvider<Object> bitmap, int? bitmapWidth, BlendMode mode = BlendMode.over, bool compress = false, bool dither = false}) → void
添加图片
addBmpFile(int x, int y, String fileName) → void
从打印机内存读取bmp图片
addBox(int x1, int y1, int x2, int y2, int lineWidth) → void
添加矩形
addByte(int byte) → void
添加一个字节
inherited
addBytes(List<int> bytes) → void
添加字节数组
inherited
addLine(int x, int y, int width, int height) → void
添加线段
addPcxFile(int x, int y, String fileName) → void
从打印机内存读取pcx图片
addQrcode({required int x, required int y, required String text, String errorLevel = qrcodeErrorLevelM, int cellWidth = 4, int rotation = 0}) → void
添加二维码
addQueryPrinterCodePage() → void
查询打印机代码页
addQueryPrinterFile() → void
查询打印机存储的文档
addQueryPrinterMemory() → void
查询打印机内存
addQueryPrinterModel() → void
获取打印机型号
addQueryPrinterStatus() → void
获取打印机状态
addQueryPrinterTotalFeed() → void
获取打印机总打印里程
addSelfTest() → void
打印自检页
addString(String str) → void
添加字符串
inherited
addText({required int x, required int y, required String text, String fontType = "0", int rotation = 0, int fontMultiply = 1}) → void
添加文本
addTextByBitmap({required int x, required int y, required String text, String fontFamily = "0", int rotation = 0, int fontSize = 16}) → void
以图片的方式打印文本
beep(int level, int interval) → void
蜂鸣器发声
clear() → void
清除缓冲
inherited
clearPrinterBuffer() → void
清除打印缓冲区
clearPrinterBufferArea(int x, int y, int width, int height) → void
清除打印机缓冲区部分区域的数据(区域内数据变为0,不参与打印)
deleteFile(String fileName) → void
从打印机内存删除下载的文件
downloadBmpFile(ImageProvider<Object> bitmap, String fileName, int bitmapWidth) → void
下载bmp图片文件打印机内存
downloadDataFile(String fileName, Uint8List data) → void
下载数据文件到打印机RAM
downloadProgramFile(String fileName, Uint8List data) → void
下载程序文件到打印机RAM
feedPaper(int distance) → void
走纸distance个点
feedPaperBackward(int distance) → void
退纸distance个点
feedPaperOneLabel() → void
走一张标签纸
feedPaperToNextLabel() → void
走纸到下一张标签的起点
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
print(int printCount) → void
打印标签printCount
print2(int printCount, int repeatCountPerLabel) → void
打印标签
rangeLimit(int value, int minInclusive, int maxInclusive) int
inherited
reversePrinterBufferArea(int x, int y, int width, int height) → void
反转打印机缓冲区部分区域的数据(区域内数据取反)
runProgramFile(String fileName) → void
运行打印机内存中的程序文件
setAxisOrigin(int x, int y) → void
设置坐标系原点位置
setBlackColorDensity(int density) → void
设置黑色打印浓度
inherited
setBlineGap(int gap) → void
设置黑标间隙为gap毫米
setCodePage(String codePage) → void
设置国际代码页
setCutter(bool enable) → void
设置打印后切纸
setCutterAtPrintCount(int cutAtPrintCount) → void
设置打印后切纸
setCutterBatch() → void
打印命令完成后切纸张(一个打印命令可能会打印多份)
setCutterPartial(bool enable) → void
设置切刀半切
setGap(int gap) → void
设置标签间隙为gap毫米
setMaxFeedPaperOnFindLabelStart(int maxFeed) → void
设置寻找标签起点时走纸最大距离maxFeed
setPaperOffsetAfterPrint(int offset) → void
设置打印完成后标签偏移位置offset毫米
setPrintColor(int printColor) → void
设置打印颜色
inherited
setPrintDensity(int density) → void
设置打印浓度density,范围1-15
setPrintDirection(bool horizontalMirror, bool verticalReverse) → void
设置打印方向
setPrinterDoubleColorMode(bool enable) → void
设置双色打印开关
inherited
setPrinterPeel(bool enable) → void
设置剥离模式
setPrintKey(bool enable) → void
设置按键打印是否有效
setPrintKeyPrintCount(int count) → void
设置按键打印份数
setPrintSpeed(int speed) → void
设置打印速度speed英寸/秒,范围1-15
setRedColorDensity(int density) → void
设置红色打印浓度
inherited
setReprintOnError(bool enable) → void
设置打印出错后重新打印(如打印过程中开盖、缺纸)
setResponseAfterPrint(ResponsMode mode) → void
设置打印完成后自动返回状态
setTear(bool enable) → void
设置撕离模式
toBytes() Uint8List
获取缓冲
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

barcode25 → const String
"25"
barcode25C → const String
"25C"
barcodeChinaPostCode → const String
"CPOST"
barcodeCodabar → const String
"CODA"
barcodeCode39 → const String
"39"
barcodeCode39C → const String
"39C"
barcodeCode39S → const String
"39S"
barcodeCode93 → const String
"93"
barcodeCode128 → const String
"128"
barcodeCode128M → const String
"128M"
barcodeCodeEAN128 → const String
"EAN128"
barcodeEAN8 → const String
"EAN8"
barcodeEAN8Plus2 → const String
"EAN8+2"
barcodeEAN8Plus5 → const String
"EAN8+5"
barcodeEAN13 → const String
"EAN13"
barcodeEAN13Plus2 → const String
"EAN13+2"
barcodeEAN13Plus5 → const String
"EAN13+5"
barcodeEAN14 → const String
"EAN14"
barcodeITF14 → const String
"ITF14"
barcodeMsi → const String
"MSI"
barcodeMsiC → const String
"MSIC"
barcodePlessey → const String
"PLESSEY"
barcodeUPCA → const String
"UPCA"
barcodeUPCAPlus2 → const String
"UPCA+2"
barcodeUPCAPlus5 → const String
"UPCA+5"
barcodeUPCE → const String
"UPCE"
barcodeUPCEPlus2 → const String
"UPCE+2"
barcodeUPCEPlus5 → const String
"UPCE+5"
codePageArabic → const String
"Arabic"
codePageCanadianOrFrench → const String
"863"
codePageCentralEurope → const String
"1250"
codePageCyrillic → const String
"866"
codePageEastEurope → const String
"EastEurope"
codePageGreek → const String
"1253"
codePageGreek2 → const String
"Greek"
codePageHebrew → const String
"Hebrew"
codePageIran → const String
"Iran"
codePageIran2 → const String
"Iran2"
codePageLatin1 → const String
"1252"
codePageLatvian → const String
"Latvian"
codePageMultilinggual → const String
"850"
codePageNordic → const String
"865"
codePagePC747 → const String
"747"
codePagePC858 → const String
"858"
codePagePC864 → const String
"864"
codePagePC1001 → const String
"1001"
codePagePortuguese → const String
"860"
codePageSlavic → const String
"852"
codePageThai → const String
"Thai"
codePageTurkish → const String
"1254"
codePageUs → const String
"437"
codePageUygur → const String
"Uygur"
codePageVietnam → const String
"Vietnam"
codePageWestEurope → const String
"WestEurope"
codePageWPC1251 → const String
"1251"
codePageWPC1257 → const String
"1257"
qrcodeErrorLevelH → const String
"H"
qrcodeErrorLevelL → const String
"L"
qrcodeErrorLevelM → const String
"M"
qrcodeErrorLevelQ → const String
"Q"