CpclCommand class

Constructors

CpclCommand.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

barCode({required String content, int x = 0, int y = 0, int width = 4, int height = 100, bool vertical = false, BarCodeType codeType = BarCodeType.c_128}) Future<void>
Print a bar code on the printer.
cleanCommand() Future<void>
Clean command buffer. This method must be called before calling any other method, otherwise the command buffer will be invalid.
form() Future<void>
getCommand() Future<Uint8List?>
Get the current command buffer. If the command buffer is empty, return null.
image({required Uint8List image, int x = 0, int y = 0}) Future<void>
Print an image on the printer.
line({required int x, required int y, required int endX, required int endY, int width = 2}) Future<void>
Draw a line on the printer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
print() Future<void>
Prints the current buffer and feeds the paper by the specified number of lines. The method communicates with the printer through a method channel.
qrCode({required String content, int x = 0, int y = 0, int width = 6}) Future<void>
Print a QR code on the printer.
size({required dynamic width, required dynamic height, int copies = 1}) Future<void>
Set the size of the paper.
text({required String content, int size = 0, int x = 0, int y = 0, int xMulti = 1, int yMulti = 1, Rotation rotation = Rotation.r_0, bool bold = false}) Future<void>
Print a text on the printer.
toString() String
A string representation of this object.
inherited

Operators

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