在 pub.dev 的 flutter 上使用 zebrautility 时出现问题

Problem when use zebrautility on flutter from pub.dev

我最近将 zebrautility: ^0.0.38https://pub.dev/packages/zebrautility 添加到我的 flutter 项目中。当我按照文档中的步骤操作时,出现以下错误:

我不知道为什么会这样,有人可以帮助我吗?

显然问题出在方法的参数上。是这样的:

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);
};