print abstract method
Sends a list of print instructions to the platform-specific implementation.
This method must be implemented by platform-specific classes, such as
MethodChannelGetnetPos, to handle the actual interaction with the POS device.
items - A list of ItemPrintModel objects describing the print instructions.
Returns:
- A
Future<String?>that resolves to a success message, or null if the operation fails.
Example:
final items = [
ItemPrintModel.text(
content: "TEXTO CENTRALIZADO",
align: Align.center,
fontFormat: FontFormat.medium,
),
];
final result = await GetnetPosPlatform.instance.print(items);
print(result); // "Printed successfully"
Throws:
- Any error encountered during the printing process.
Implementation
Future<String?> print(List<ItemPrintModel> items);