NyxPrinter class

The NyxPrinter class provides methods to interact with the printer and perform various print operations.

This class uses the platform interface NyxPrinterPlatform to send print commands to the native platform (iOS or Android). The class abstracts the platform-specific details, allowing you to call common methods such as printing text, barcodes, QR codes, and bitmaps, without worrying about platform implementation details.

Constructors

NyxPrinter()

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

getVersion() Future<int?>
getVersion will return printer version number. success result is 0.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paperOut() Future<int?>
Checks if the printer is out of paper.
printBarcode(String text, {int? width, int? height}) Future<int?>
printBarcode will print barcode and you can set width and height. default width is 300 default height is 160 success result is 0.
printImage(Uint8List bytes) Future<int?>
printImage will print only png images. success result is 0.
printQrCode(String text, {int? width, int? height}) Future<int?>
printQrCode will print QR code and you can set width and height. default width is 300 default height is 300 success result is 0.
printText(String text, {NyxTextFormat? textFormat}) Future<int?>
printText will print text to format text you can use NyxTextFormat to set font size or font style ...etc success result is 0.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited