SunmiPrinter class

A utility class for interacting with the Sunmi printer.

Provides methods to print text, QR codes, barcodes, images, and more.

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

addText({required String text, SunmiTextStyle? style}) Future<String?>
Adds text to the print buffer with an optional SunmiTextStyle.
cutPaper() Future<String?>
Cuts the paper.
line({String? type}) Future<String?>
Prints a line using an optional line type.
lineWrap(int times) Future<String?>
Adds a specified number of blank lines to the print output.
printBarcode({required String text, SunmiBarcodeStyle? style}) Future<String?>
Prints a barcode with optional SunmiBarcodeStyle.
printCustomText({required SunmiText sunmiText}) Future<String?>
Prints custom text using a SunmiText object.
printEscPos({required List<int> data}) Future<String?>
Sends raw ESC/POS commands to the printer.
printImage({required Uint8List image, SunmiPrintAlign align = SunmiPrintAlign.LEFT}) Future<String?>
Prints an image with a specified alignment.
printQRCode(String text, {SunmiQrcodeStyle? style}) Future<String?>
Prints a QR code with optional SunmiQrcodeStyle.
printRow({required List<SunmiColumn> cols}) Future<String?>
Prints a row of columns with specified text, width, and styles.
printText(String text, {SunmiTextStyle? style}) Future<String?>
Prints plain text with an optional SunmiTextStyle.
printTSPL({required String data}) Future<String?>
Sends raw TSPL commands to the printer.