Browse Source

更新FISLib.dll

felix 1 year ago
parent
commit
1eeaec2968
3 changed files with 3 additions and 3 deletions
  1. BIN
      FISLib.dll
  2. 1 1
      Helper/CodeGeneratorForFISLib.cs
  3. 2 2
      rpcForUSMachine.txt

BIN
FISLib.dll


+ 1 - 1
Helper/CodeGeneratorForFISLib.cs

@@ -152,7 +152,7 @@ namespace FlutterCodeGenerator.Helper
                     var serviceName = LetterConverterHelper.FirstCharToUpper_2(serviceMap.Key);
                     var actionName = serviceMap.Key[0..^7];
                     dartString.AppendLine($"\t{serviceName} get {actionName} =>");
-                    dartString.AppendLine($"\tfindService(() => new {serviceName}(currentHostAddress));");
+                    dartString.AppendLine($"\tfindService(() => {serviceName}(currentHostAddress));");
                     dartString.AppendLine();
                 }
             }

+ 2 - 2
rpcForUSMachine.txt

@@ -31,7 +31,7 @@ class JsonRpcProxyForFISLib {
   /// 当前服务主机地址
   String get currentHostAddress => "$_currentProtocol://$_currentHost";
 
-  HashMap<Type, dynamic> _serviceCache = HashMap();
+  final HashMap<Type, dynamic> _serviceCache = HashMap();
 
   /* 服务代理设置 Start */
 
@@ -41,7 +41,7 @@ class JsonRpcProxyForFISLib {
 
   /// 设置服务主机地址
   void setServerHost(String address, [bool useSSL = false]) {
-    logger.i('JsonRpcProxyForFISLib setServerHost :' + address);
+    logger.i('JsonRpcProxyForFISLib setServerHost :$address');
     _currentProtocol = useSSL ? "https" : "http";
     _currentHost = address;
   }