printReceiptText method
Future<void>
printReceiptText(
- ReceiptSectionText receiptSectionText, {
- int feedCount = 0,
- bool useCut = false,
- bool useRaster = false,
- double duration = 0,
- PaperSize paperSize = PaperSize.mm58,
This method only for print text
value and styling inside model ReceiptSectionText.
feedCount
to create more space after printing process done
useCut
to cut printing process
Implementation
Future<void> printReceiptText(
ReceiptSectionText receiptSectionText, {
int feedCount = 0,
bool useCut = false,
bool useRaster = false,
double duration = 0,
PaperSize paperSize = PaperSize.mm58,
}) async {
final Uint8List bytes = await contentToImage(
content: receiptSectionText.content,
duration: duration,
);
final List<int> byteBuffer = await _getBytes(
bytes,
paperSize: PaperSize.mm80,
feedCount: feedCount,
useCut: useCut,
useRaster: useRaster,
);
_printProcess(byteBuffer);
}