SPrinter class
打印机打印
Constructors
- SPrinter()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
barcode(
String code, BarCodeType type, {int height = 162, int width = 2, BarCodeTextType textType = BarCodeTextType.none}) → dynamic - 打印一维码
-
columnsString(
List< String> text, {List<int> ? width, List<int> ? align}) → dynamic - 打印表格的⼀⾏,可以指定列宽、对⻬⽅式
-
columnsText(
List< String> text, {List<int> ? width, List<int> ? align}) → dynamic - 打印表格的⼀⾏(不⽀持阿拉伯字符)
-
cutPaper(
) → Future - 切纸 仅支持台式机带切刀的机器
-
cutPaperTimes(
) → Future< int?> - 切纸次数
-
lineWrap(
[int line = 1]) → dynamic - 打印机⾛纸n⾏
-
originText(
String text) → dynamic - 以矢量字体的方式打印文本
-
printBitmap(
Uint8List image) → Future - 打印图⽚
-
printBitmapCustom(
Uint8List image, [BitmapPrintType type = BitmapPrintType.normal]) → Future - 打印图⽚
-
printColumnsString(
{required List< String> text, required List<int> width, required List<int> align}) → Future - 打印表格的⼀⾏,可以指定列宽、对齐⽅式
-
printColumnsText(
{required List< String> text, required List<int> width, required List<int> align}) → Future - 打印表格的⼀⾏(不⽀持阿拉伯字符)
-
qrCode(
String code, {int moduleSize = 4, QRErrorLevel errorLevel = QRErrorLevel.medium}) → dynamic - 打印二维码
-
rawData(
) → dynamic - ESC/POS指令
-
setAlign(
Align align) → dynamic - 设置文本对齐
-
setFontSize(
double size) → dynamic - 设置文本大小
-
text(
String text) → dynamic - 打印文本
-
textWithFont(
String text, {String? typeface, double? fontsize}) → dynamic - 打印文本(包含字体大小)