alroyso 4 months ago
parent
commit
7fc4ecf870
1 changed files with 3 additions and 3 deletions
  1. 3 3
      lib/wl_base_help.dart

+ 3 - 3
lib/wl_base_help.dart

@@ -40,16 +40,16 @@ class WlBaseHelp {
 
   // 新增:启用代理
   Future<void> startProxy(int port) async {
-    await _channel.invokeMethod('startProxy', {'port': port});
+    await WlBaseHelpPlatform.instance.startProxy(port);
   }
 
   // 新增:禁用代理
   Future<void> stopProxy() async {
-    await _channel.invokeMethod('stopProxy');
+    await WlBaseHelpPlatform.instance.stopProxy();
   }
 
   // 新增:检测代理是否启用
   Future<bool> isProxyEnabled() async {
-    return await _channel.invokeMethod('isProxyEnabled');
+    return WlBaseHelpPlatform.instance.isProxyEnabled();
   }
 }