mirror of
https://github.com/wanghongenpin/proxypin.git
synced 2026-05-20 16:15:47 +08:00
script Batch operations
This commit is contained in:
11
lib/native/process_info.dart
Normal file
11
lib/native/process_info.dart
Normal 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));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user