OmniPrinter class
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)),
),
]),
);
Constructors
Properties
- doc → Document
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
autoPrint(
) → Future< bool> -
generateDoc(
{String? date = "4/9/2020", String? info, String? taxId = "12331", String? receiverName = "Richie", String? receiverMail = "info@yegobox.com", String? receiverPhone, String email = "info@yegobox.com", required List< TableRow> rows}) → Future<void> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited