SunmiPrinterV2 class
Interface between flutter and Sunmi printer
Constructors
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 Properties
-
getPrinterModel
→ Future<
String?> -
Returns the printer model of the device if available.
no setter
-
getPrinterPaper
→ Future<
String?> -
Returns the printer paper type of the device if available.
no setter
-
getPrinterSerialNo
→ Future<
String?> -
Returns the printerSerialNumber of the device if available.
no setter
-
getPrinterVersion
→ Future<
String?> -
Returns the printerVersion of the device if available.
no setter
-
getSerialNo
→ Future<
String?> -
Returns the serialNumber of the device if available.
no setter
Static Methods
-
feedPaper(
) → Future< void> - This will feed the paper.
-
initPrinter(
) → Future< void> - Initialize the printer. This will clear all set alignments and font changes to default.
-
lineWrap(
{int lines = 1}) → Future< void> -
Set the line warping.
Move the printing to a nex line
Default it moves to 1 line but you can set lines you want
lines
-
printBarcode(
{required String barcode, BarcodeType? type, int height = 30, int width = 3, BarcodeTextPosition textPosition = BarcodeTextPosition.noText}) → Future< void> -
Prints a barcode
barcode
,barcodeType
must be provided.height
andwidth
can be customized. Defaults areheight
= 30 andwidth
= 3 -
printLineDivider(
) → Future< void> -
printSample(
) → Future< void> - Print a sample printout
-
printTable(
{List< String> ? texts, List<int> widths = const [1, 1], List<int> alignments = const [0, 2]}) → Future<void> -
Print texts as a table.
texts
can be sent as a array. Column width ratio can be set aswidths
array. The default is1,1
Text alignment can be set asalignment
array. -
printText(
String content, {int size = 18, bool isBold = false, bool isUnderline = false}) → Future< void> -
Print the text.
content
is mandatorysize
Font size of the text to printed.isBold
Boolean to set whether text needs to printed in bold.isUnderline
Boolean to set whether text needs to be underlined. -
setAlign(
PrinterTextAlignment alignment) → Future< void> -
Set the TextAlign
alignment
for future prints. Eg:PrinterAlignment.center
-
setAntiWhite(
bool isAntiWhite) → Future< void> -
setBold(
bool isBold) → Future< void> -
Set the font bold for future prints.
isBold
boolean.