CartonaSunmiPrinter class
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
Static Methods
-
cutPaper()
→ Future<void>
-
Cuts the paper (only supported by limited devices)
-
deInitSunmiPrinterService()
→ Future<void>
-
Deinitializes the Sunmi printer service
-
endTransection()
→ Future<void>
-
Ends a transaction
-
feedPaper()
→ Future<void>
-
Feeds the paper to the printer (only supported by limited devices)
-
getPrinterDistance()
→ Future<void>
-
Returns the current printer head distance
-
getPrinterHead()
→ Future<void>
-
Returns the current printer head position
-
getPrinterVersion()
→ Future<String?>
-
Returns the printer version on the devices
-
initializePrinter()
→ Future<bool>
-
Used to initialize the printer, must only be called once at the startup
-
initSunmiPrinterService()
→ Future<void>
-
Initializes the Sunmi printer service
-
line({String ch = '-', int len = 31})
→ Future<void>
-
Draws a line on the receipt
-
lineWrap({int lines = 3})
→ Future<void>
-
Adds N lines in the receipt, can be used to make space between sections
-
printBarCode(String data, int symbology, int height, int width, int position)
→ Future<void>
-
Prints a barcode
-
printBitmap(ByteData bitmap, int orientation)
→ Future<void>
-
Prints a bitmap
-
printMultiLabel(int count)
→ Future<void>
-
Prints multiple labels (for testing)
-
printOneLabel()
→ Future<void>
-
Prints one label (for testing)
-
printQr(String data, int moduleSize, int errorLevel)
→ Future<void>
-
Prints a QR code
-
printRow(List<String> texts, List<int> width, List<SunmiPrintAlign> align)
→ Future<void>
-
Prints a row of text
-
printText(String text)
→ Future<void>
-
Prints the given text to the receipt, font and methods relating to other
settings must be called before this method
-
sendRawData(Uint8List data)
→ Future<void>
-
Sends raw data to the printer
-
setAlignment(SunmiPrintAlign alignment)
→ Future<void>
-
Sets the alignment of the text
-
setBold(bool enable)
→ Future<void>
-
Sets the font to bold
-
setFontSize([double size = 24])
→ Future<void>
-
Sets the font size
-
setUnderline(bool enable)
→ Future<void>
-
Sets the font to underline
-
showPrinterStatus()
→ Future<void>
-
Sends texts to the LCD
-
startTransection()
→ Future<void>
-
Starts a transaction