script Batch operations

This commit is contained in:
wanghongenpin
2024-03-11 01:55:17 +08:00
parent e34578f37b
commit 67d16c761d
10 changed files with 515 additions and 220 deletions

View File

@@ -0,0 +1,11 @@
import 'package:flutter/services.dart';
import 'package:network_proxy/native/installed_apps.dart';
class ProcessInfoPlugin {
static const MethodChannel _methodChannel = MethodChannel('com.proxy/processInfo');
static Future<AppInfo?> getProcessByPort(String host, int port) {
return _methodChannel.invokeMethod<Map>('getProcessByPort', {"host": host, "port": port}).then(
(value) => value == null ? null : AppInfo.formJson(value));
}
}