SunmiPrinterV2 class

Interface between flutter and Sunmi printer

Constructors

SunmiPrinterV2()

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 Properties

getPrinterModel Future<String?>
Returns the printer model of the device if available.
no setter
getPrinterPaper Future<String?>
Returns the printer paper type of the device if available.
no setter
getPrinterSerialNo Future<String?>
Returns the printerSerialNumber of the device if available.
no setter
getPrinterVersion Future<String?>
Returns the printerVersion of the device if available.
no setter
getSerialNo Future<String?>
Returns the serialNumber of the device if available.
no setter

Static Methods

feedPaper() Future<void>
This will feed the paper.
initPrinter() Future<void>
Initialize the printer. This will clear all set alignments and font changes to default.
lineWrap({int lines = 1}) Future<void>
Set the line warping. Move the printing to a nex line Default it moves to 1 line but you can set lines you wantlines
printBarcode({required String barcode, BarcodeType? type, int height = 30, int width = 3, BarcodeTextPosition textPosition = BarcodeTextPosition.noText}) Future<void>
Prints a barcode barcode, barcodeType must be provided. height and width can be customized. Defaults are height = 30 and width = 3
printLineDivider() Future<void>
printSample() Future<void>
Print a sample printout
printTable({List<String>? texts, List<int> widths = const [1, 1], List<int> alignments = const [0, 2]}) Future<void>
Print texts as a table. texts can be sent as a array. Column width ratio can be set as widths array. The default is 1,1 Text alignment can be set as alignment array.
printText(String content, {int size = 18, bool isBold = false, bool isUnderline = false}) Future<void>
Print the text. content is mandatory size Font size of the text to printed. isBold Boolean to set whether text needs to printed in bold. isUnderline Boolean to set whether text needs to be underlined.
setAlign(PrinterTextAlignment alignment) Future<void>
Set the TextAlign alignment for future prints. Eg: PrinterAlignment.center
setAntiWhite(bool isAntiWhite) Future<void>
setBold(bool isBold) Future<void>
Set the font bold for future prints. isBold boolean.