ThermalPrinter class
Represents a thermal printer with its properties and methods for printing. The deviceId is a unique identifier for the printer. The model is the printer model containing its specifications. The send function is used to send print data to the printer. The printed stream emits print data after a print job is completed.
Constructors
-
ThermalPrinter.new({required String deviceId, required PrinterModel model, required Future<
void> send(List<int> )})
Properties
Methods
-
dispose(
) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
print(
ImageData image, PrintConfig config) → Future< void> -
printText(
String text, PrintConfig config, {TextStyle style = presetTextStyle, TextAlign alignment = TextAlign.left, TextDirection textDirection = TextDirection.ltr}) → Future< void> -
Prints a text string using the provided
config
andstyle
. Thetext
is the content to be printed. Thestyle
defines the text style for printing. -
printWidget(
GlobalKey< State< printableKey, PrintConfig config) → Future<StatefulWidget> >void> -
Prints a widget identified by
printableKey
using the providedconfig
. Make sure the widget is aPrintable
-Widget. Only this is able to extract the image data from the widget. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited