feat: product image and printer type
This commit is contained in:
@@ -991,27 +991,27 @@ class PrintDataoutputs {
|
||||
: '--------------------------------',
|
||||
styles: const PosStyles(bold: false, align: PosAlign.center));
|
||||
bytes += generator.feed(1);
|
||||
// final kitchenProducts =
|
||||
// products.where((p) => p.product.printerType == 'kitchen');
|
||||
// for (final product in kitchenProducts) {
|
||||
// bytes += generator.text('${product.quantity} x ${product.product.name}',
|
||||
// styles: const PosStyles(
|
||||
// align: PosAlign.left,
|
||||
// bold: false,
|
||||
// height: PosTextSize.size2,
|
||||
// width: PosTextSize.size1,
|
||||
// ));
|
||||
// if (product.notes.isNotEmpty) {
|
||||
// bytes += generator.text(' Notes: ${product.notes}',
|
||||
// styles: const PosStyles(
|
||||
// align: PosAlign.left,
|
||||
// bold: false,
|
||||
// height: PosTextSize.size1,
|
||||
// width: PosTextSize.size1,
|
||||
// fontType: PosFontType.fontA,
|
||||
// ));
|
||||
// }
|
||||
// }
|
||||
final kitchenProducts =
|
||||
products.where((p) => p.product.printerType == 'kitchen');
|
||||
for (final product in kitchenProducts) {
|
||||
bytes += generator.text('${product.quantity} x ${product.product.name}',
|
||||
styles: const PosStyles(
|
||||
align: PosAlign.left,
|
||||
bold: false,
|
||||
height: PosTextSize.size2,
|
||||
width: PosTextSize.size1,
|
||||
));
|
||||
if (product.notes.isNotEmpty) {
|
||||
bytes += generator.text(' Notes: ${product.notes}',
|
||||
styles: const PosStyles(
|
||||
align: PosAlign.left,
|
||||
bold: false,
|
||||
height: PosTextSize.size1,
|
||||
width: PosTextSize.size1,
|
||||
fontType: PosFontType.fontA,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
bytes += generator.feed(1);
|
||||
bytes += generator.text(
|
||||
@@ -1105,26 +1105,26 @@ class PrintDataoutputs {
|
||||
: '--------------------------------',
|
||||
styles: const PosStyles(bold: false, align: PosAlign.center));
|
||||
bytes += generator.feed(1);
|
||||
// final barProducts = products.where((p) => p.product.printerType == 'bar');
|
||||
// for (final product in barProducts) {
|
||||
// bytes += generator.text('${product.quantity} x ${product.product.name}',
|
||||
// styles: const PosStyles(
|
||||
// align: PosAlign.left,
|
||||
// bold: false,
|
||||
// height: PosTextSize.size2,
|
||||
// width: PosTextSize.size1,
|
||||
// ));
|
||||
// if (product.notes.isNotEmpty) {
|
||||
// bytes += generator.text(' Notes: ${product.notes}',
|
||||
// styles: const PosStyles(
|
||||
// align: PosAlign.left,
|
||||
// bold: false,
|
||||
// height: PosTextSize.size1,
|
||||
// width: PosTextSize.size1,
|
||||
// fontType: PosFontType.fontA,
|
||||
// ));
|
||||
// }
|
||||
// }
|
||||
final barProducts = products.where((p) => p.product.printerType == 'bar');
|
||||
for (final product in barProducts) {
|
||||
bytes += generator.text('${product.quantity} x ${product.product.name}',
|
||||
styles: const PosStyles(
|
||||
align: PosAlign.left,
|
||||
bold: false,
|
||||
height: PosTextSize.size2,
|
||||
width: PosTextSize.size1,
|
||||
));
|
||||
if (product.notes.isNotEmpty) {
|
||||
bytes += generator.text(' Notes: ${product.notes}',
|
||||
styles: const PosStyles(
|
||||
align: PosAlign.left,
|
||||
bold: false,
|
||||
height: PosTextSize.size1,
|
||||
width: PosTextSize.size1,
|
||||
fontType: PosFontType.fontA,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
bytes += generator.feed(1);
|
||||
bytes += generator.text(
|
||||
|
||||
Reference in New Issue
Block a user