Gcprinter class

Constructors

Gcprinter()

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

drawBarcode(String str, int align, int type, [int? height]) → void
Print barcodes, including qrcode, you can specify the alignment position and barcode type of the barcode The unit of height is pixels No width parameter is required, the width is determined by the specific barcode
drawCustom(String str, int fontSize, int align) → void
Print text content, you can specify the size and position of the content
drawImage(String path) → void
Print image files, centered by default and do not automatically feed paper
drawLeftRight(String left, String right, int fontSize) → void
Print text content, you can print left-aligned and right-aligned content at the same time
drawNewLine() → void
Print a blank line, similar to a newline
drawOneLine([int? fontSize]) → void
Print a horizontal line, you can specify the thickness of the horizontal line by setting the font size, or you can directly use the default font without specifying the font size
drawQrCode(String str, int align, [int? height]) → void
Print qrcode, you can specify the alignment position and height of qrcode The unit of height is pixels
drawText(String strLeft, int fontLeft, String strMid, int fontMid, String strRight, int fontRight) → void
Print the text content, you can specify the position and font size of the printed text, and you can print the left, middle, and right text at the same time
isDeviceSupport() Future<bool>
Check whether printing is supported. This method returns true only on goodcom printers. This method allows the app to distinguish printers from different manufacturers.
openCashBox() → void
Used to open the cash box, it will be opened once when called
printImage(Uint8List img, int align, bool isAutoFeed) → void
Print the image according to the image data. You can set the alignment position of the printed image, and decide whether to automatically feed the paper. If you want to print the text after printing the logo, the paper will not be automatically fed.
printImageFile(String filePath, int align, bool isAutoFeed) → void
printJson(String json) → void
printText(bool isAutoFeed) → void
Start printing. Except for image printing, other printing interfaces, such as drawText, just draw the printing content in the memory first, and the printing has not been started yet. This method is to print out the printing content in the memory.
showLcdImage(Uint8List img) → void
Show bitmap in customer display LCD, The maximum size is 240 * 320, Images smaller than the customer display screen will be displayed in the center

Constants

alignCenter → const int
alignLeft → const int
alignRight → const int
barcodeCode39 → const int
barcodeCode93 → const int
barcodeCode128 → const int
barcodeCodeBar → const int
barcodeEan8 → const int
barcodeEan13 → const int
barcodeItf → const int
barcodeQrCode → const int
barcodeUpca → const int
barcodeUpce → const int
fontBig → const int
fontBigBold → const int
fontDefault → const int
fontDoubleHeight → const int
fontDoubleHeightBold → const int
fontDoubleWidth → const int
fontDoubleWidthBold → const int
fontMedium → const int
fontMediumBold → const int
fontSmall → const int
fontSmallBold → const int