printSticker static method
Future<void>
printSticker({
- String? deviceId,
- PrinterConnectionType? connectionType,
- required List<
Uint8List> imageBytesList, - required CupStickerSize size,
Implementation
static Future<void> printSticker({
String? deviceId,
PrinterConnectionType? connectionType,
required List<Uint8List> imageBytesList,
required CupStickerSize size,
}) async {
final images = <Uint8List>[];
for (final bytes in imageBytesList) {
images.add(await resizeImage(imageBytes: bytes, size: size));
}
final model = LabelModel(
images: images,
labelPerRow: LabelPerRow.single.copyWith(
width: size.widthMm.toInt(),
height: size.heightMm.toInt(),
x: 0,
y: 0,
),
);
await PrinterLabel.printLabel(
deviceId: deviceId,
connectionType: connectionType,
barcodeImageModel: model,
);
}