BluetoothThermalPrinter
BluetoothThermalPrinter copied to clipboard
Content Not visible when printing.
When Printing Some content is not visible for example in the code shared Rova Dosa is not seen on receipt.
Future<Ticket> getTicket() async {
final CapabilityProfile profile = await CapabilityProfile.load();
final Ticket ticket = Ticket(PaperSize.mm80, profile);
ticket.text(state.business.name,
styles: const PosStyles(
align: PosAlign.center,
height: PosTextSize.size2,
width: PosTextSize.size2,
),
linesAfter: 1);
ticket.text(state.user.name, //(this is a phone number)
styles: const PosStyles(align: PosAlign.center));
ticket.hr();
ticket.row([
PosColumn(text: '4', width: 1),
PosColumn(
text: 'Rova Dosa',
width: 5,
styles: const PosStyles(
align: PosAlign.left,
)),
PosColumn(
text: '70',
width: 2,
styles: const PosStyles(
align: PosAlign.center,
)),
PosColumn(text: '1', width: 2, styles: const PosStyles(align: PosAlign.center)),
PosColumn(text: '70', width: 2, styles: const PosStyles(align: PosAlign.right)),
]);
ticket.hr();
ticket.row([
PosColumn(
text: 'TOTAL',
width: 6,
styles: const PosStyles(
align: PosAlign.left,
height: PosTextSize.size4,
width: PosTextSize.size4,
)),
PosColumn(
text: '160',
width: 6,
styles: const PosStyles(
align: PosAlign.right,
height: PosTextSize.size4,
width: PosTextSize.size4,
)),
]);
// ticket.hr(ch: '=', linesAfter: 1);
final DateTime now = DateTime.now();
final DateTime date = DateTime(now.year, now.month, now.day,now.hour,now.minute,now.second);
// ticket.feed(2);
ticket.text('Thank you!',
styles: const PosStyles(align: PosAlign.center, bold: true));
ticket.text(date.toLocal().toString(),
styles: const PosStyles(align: PosAlign.center), linesAfter: 1);
ticket.text('Note: Goods once sold will not be taken back or exchanged.',
styles: const PosStyles(align: PosAlign.center, bold: false));
ticket.cut();
return ticket;
} Future<Ticket> getTicket() async {
final CapabilityProfile profile = await CapabilityProfile.load();
final Ticket ticket = Ticket(PaperSize.mm80, profile);
ticket.text(state.business.name,
styles: const PosStyles(
align: PosAlign.center,
height: PosTextSize.size2,
width: PosTextSize.size2,
),
linesAfter: 1);
ticket.text(state.user.name, //(this is a phone number)
styles: const PosStyles(align: PosAlign.center));
ticket.hr();
ticket.row([
PosColumn(text: '4', width: 1),
PosColumn(
text: 'Rova Dosa',
width: 5,
styles: const PosStyles(
align: PosAlign.left,
)),
PosColumn(
text: '70',
width: 2,
styles: const PosStyles(
align: PosAlign.center,
)),
PosColumn(text: '1', width: 2, styles: const PosStyles(align: PosAlign.center)),
PosColumn(text: '70', width: 2, styles: const PosStyles(align: PosAlign.right)),
]);
ticket.hr();
ticket.row([
PosColumn(
text: 'TOTAL',
width: 6,
styles: const PosStyles(
align: PosAlign.left,
height: PosTextSize.size4,
width: PosTextSize.size4,
)),
PosColumn(
text: '160',
width: 6,
styles: const PosStyles(
align: PosAlign.right,
height: PosTextSize.size4,
width: PosTextSize.size4,
)),
]);
// ticket.hr(ch: '=', linesAfter: 1);
final DateTime now = DateTime.now();
final DateTime date = DateTime(now.year, now.month, now.day,now.hour,now.minute,now.second);
// ticket.feed(2);
ticket.text('Thank you!',
styles: const PosStyles(align: PosAlign.center, bold: true));
ticket.text(date.toLocal().toString(),
styles: const PosStyles(align: PosAlign.center), linesAfter: 1);
ticket.text('Note: Goods once sold will not be taken back or exchanged.',
styles: const PosStyles(align: PosAlign.center, bold: false));
ticket.cut();
return ticket;
}