Browse Source

壳子接口调整

loki.wu 1 year ago
parent
commit
f6747662aa
1 changed files with 10 additions and 2 deletions
  1. 10 2
      lib/services/platform.dart

+ 10 - 2
lib/services/platform.dart

@@ -405,7 +405,11 @@ class PlatformService extends JsonRpcClientBase {
   ///获取所有已安装的打印驱动
   Future<List<String>> getAllInstalledPrinterInfos() async {
     var rpcRst = await call("GetAllInstalledPrinterInfos");
-    return rpcRst;
+    List<String> result = [];
+    for (var i in rpcRst) {
+      result.add(i.toString());
+    }
+    return result;
   }
 
   ///打印测试(调用后会在指定的打印机打印一张测试页)
@@ -417,7 +421,11 @@ class PlatformService extends JsonRpcClientBase {
   ///搜索未安装的打印驱动
   Future<List<String>> getUninstalledPrinters({String? ip}) async {
     var rpcRst = await call("GetUninstalledPrinters", [ip]);
-    return rpcRst;
+    List<String> result = [];
+    for (var i in rpcRst) {
+      result.add(i.toString());
+    }
+    return result;
   }
 
   /// 安装打印驱动