PrintCommands class Null safety

Constructors

PrintCommands()

Properties

hashCode int
The hash code for this object.
read-onlyinherited
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited

Methods

appendBitmap({required String path, bool diffusion = true, int width = 576, bool bothScale = true, int? absolutePosition, StarAlignmentPosition? alignment, StarBitmapConverterRotation? rotation}) → dynamic
Prints an image with a url or a file path. Set bothScale to scale the image by the width of receipt. Sets absolutePosition image absolute position. StarAlignmentPosition sets image alignment. StarBitmapConverterRotation set image rotation.
appendBitmapByte({required Uint8List byteData, bool diffusion = true, int width = 576, bool bothScale = true, int? absolutePosition, StarAlignmentPosition? alignment, StarBitmapConverterRotation? rotation}) → dynamic
Prints an image with a raw data byteData. Set bothScale to scale the image by the width of receipt. Sets absolutePosition image absolute position. StarAlignmentPosition sets image alignment. StarBitmapConverterRotation set image rotation.
appendBitmapText({required String text, int? fontSize, bool diffusion = true, int? width, bool bothScale = true, int? absolutePosition, StarAlignmentPosition? alignment, StarBitmapConverterRotation? rotation}) → dynamic
Prints an image generated by text text. fontSize sets font text size of image Set bothScale to scale the image by the width of receipt. Sets absolutePosition image absolute position. StarAlignmentPosition sets image alignment. StarBitmapConverterRotation set image rotation.
appendBitmapWidget({required Widget widget, bool diffusion = true, int width = 576, bool bothScale = true, int? absolutePosition, StarAlignmentPosition? alignment, StarBitmapConverterRotation? rotation, Duration? wait, Size? logicalSize, Size? imageSize, TextDirection textDirection = TextDirection.ltr}) → dynamic
Prints an image generated by widgets widget. Set bothScale to scale the image by the width of receipt. Sets absolutePosition image absolute position. StarAlignmentPosition sets image alignment. StarBitmapConverterRotation set image rotation. Set Duration if you are using async widgets or widget that take time to fully build. logicalSize Size is the size of the device the widget is made into. imageSize Size is the size of image generated. sets the TextDirection.
appendCutPaper(StarCutPaperAction action) → dynamic
run command on printer cuter, StarCutPaperAction available is different for each printer
appendEncoding(StarEncoding encoding) → dynamic
sets the encoding for text prints, StarEncoding available is different for each printer
clear() → dynamic
clear all commands in command list
getCommands() List<Map<String, dynamic>>
get current list of commands
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
openCashDrawer(int actionNumber) → dynamic
open cash drawer, actionNumber needed to based on the printer port
push(Map<String, dynamic> command) → dynamic
pushes a manual command into the command list
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

createImageFromWidget(Widget widget, {Duration? wait, Size? logicalSize, Size? imageSize, TextDirection textDirection = TextDirection.ltr}) Future<Uint8List?>
Generats an image from widget. Set Duration if you are using async widgets or widget that take time to fully build. logicalSize Size is the size of the device the widget is made into. imageSize Size is the size of image generated. sets the TextDirection.