omni_printer
library
Classes
-
OmniPrinter
-
generateDoc example
generateDoc(
header:
Text('K5 25 Ave', style: const TextStyle(fontSize: 5)),
Text('+250 788 888 888',
style: const TextStyle(fontSize: 5)),
,
subHeader: [
Text('Cashier: John Doe',
style: const TextStyle(fontSize: 5)),
Container(width: 10),
Column(
children:
Text('June 19,2021',
style: const TextStyle(fontSize: 5)),
Text('11:20 am', style: const TextStyle(fontSize: 5)),
,
)
],
body: Table(children: [
TableRow(children:
Text('Qty', style: const TextStyle(fontSize: 5)),
Text('DESC', style: const TextStyle(fontSize: 5)),
Text('AMT', style: const TextStyle(fontSize: 5)),
),
TableRow(children:
Text('1', style: const TextStyle(fontSize: 5)),
Text('Coffee', style: const TextStyle(fontSize: 5)),
Text('\$1.00', style: const TextStyle(fontSize: 5)),
),
TableRow(children:
Text('1', style: const TextStyle(fontSize: 5)),
Text('Coffee', style: const TextStyle(fontSize: 5)),
Text('\$1.00', style: const TextStyle(fontSize: 5)),
),
TableRow(children:
Text('1', style: const TextStyle(fontSize: 5)),
Text('Coffee', style: const TextStyle(fontSize: 5)),
Text('\$1.00', style: const TextStyle(fontSize: 5)),
),
/// show total
TableRow(children:
Text(''),
Text('Total', style: const TextStyle(fontSize: 6)),
Text('\$3.00', style: const TextStyle(fontSize: 6)),
),
]),
);