printData method
Implementation
@override
Future<bool> printData(String data) async {
status = PrinterStatus.printing;
notifier(this);
if (!data.contains("^PON")) data = data.replaceAll("^XA", "^XA^PON");
if (isRotated) {
data = data.replaceAll("^PON", "^POI");
}
final bool result = await channel.invokeMethod("printData", {"data": data});
if (result) {
status = PrinterStatus.ready;
log("Zebra Instance $instanceID Print Done");
} else {
status = PrinterStatus.disconnected;
}
notifier(this);
return result;
}