Closed alcampospalacios closed 3 years ago
Apparently the problem was that the parameters of the method. This is the way:
ZebraPrinter zebraPrinter = await Zebrautility.getPrinterInstance( onPrinterFound: onPrinterFound('hoid-connect', '192.168.43.80', true), onPrinterDiscoveryDone: onPrinterDiscoveryDone, onChangePrinterStatus: onChangePrinterStatus, onPermissionDenied: onPermissionDenied);
print(zebraPrinter);
zebraPrinter.connectToPrinter("192.168.43.80"); zebraPrinter.print(data); }
Function onPrinterFound = (String name, String ipAddress, bool isWifi) { print("PrinterFound :" + name + ipAddress); };
@alcampospalacios By seeing this it seems here we need to pass fixed ip address instead from discovered list? what if we need to display list of printers and by clicking on that it will connectToPrinter? How can we achieve that?
Hello,
i've the same problem, I would to connect to device after discovered list is called, how can I do that?
The syntax error says Too many positional arguments : 0 expected, but 3 founds. Try removing the extra positional arguments, or specifyieng the name for named arguments.
Now, when I do what the error message suggests I have another error like in the image below