MethodChannelFlutterSingBox class
基于 MethodChannel / EventChannel 的 FlutterSingBoxPlatform 实现(Android/iOS)。
- Inheritance
-
- Object
- PlatformInterface
- FlutterSingBoxPlatform
- MethodChannelFlutterSingBox
Constructors
Properties
-
clashModeStream
→ Stream<
ClientClashMode> -
Clash 模式流(EventChannel
clash_mode_event)。no setteroverride -
connectedStatusStream
→ Stream<
ClientStatus> -
客户端连接状态流(EventChannel
connected_status_event)。no setteroverride -
groupStream
→ Stream<
List< ClientGroup> > -
分组列表流(EventChannel
group_event)。no setteroverride - hashCode → int
-
The hash code for this object.
no setterinherited
-
logStream
→ Stream<
List< ClientLog> > -
内核日志流(EventChannel
log_event,按批推送)。no setteroverride - methodChannel → MethodChannel
-
与原生平台通信的 method channel。
final
-
proxyStateStream
→ Stream<
ProxyState> -
代理状态流(EventChannel
proxy_state_event);原生 error 转为带 errMessage 的 ProxyStopped。no setteroverride - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getSingBoxVersion(
) → Future< String> -
获取 sing-box 内核版本号(转发原生)。
override
-
init(
) → Future< void> -
初始化插件(转发原生 method channel)。
override
-
installService(
{required String serviceName, required String displayName, required String description}) → Future< bool> -
非 Windows 平台默认实现:无系统服务概念,恒返回
true。override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
queryServiceStatus(
) → Future< WindowsServiceStatus> -
非 Windows 平台默认实现:无系统服务概念,返回 WindowsServiceStatus.unsupported。
override
-
selectOutbound(
{required String groupTag, required String outboundTag}) → Future< void> -
在分组中选中出站(转发原生)。
override
-
serviceReload(
) → Future< void> -
重载服务配置(转发原生)。
override
-
setClashMode(
String mode) → Future< void> -
设置 Clash 模式(转发原生)。
override
-
setGroupExpand(
{required String groupTag, required bool isExpand}) → Future< void> -
设置分组展开状态(转发原生)。
override
-
startService(
) → Future< bool> -
非 Windows 平台默认实现:恒返回
false。override -
startVpn(
) → Future< void> -
启动 VPN 服务(转发原生)。
override
-
stopService(
) → Future< bool> -
非 Windows 平台默认实现:恒返回
false。override -
stopVpn(
) → Future< void> -
停止 VPN 服务(转发原生)。
override
-
toString(
) → String -
A string representation of this object.
inherited
-
uninstallService(
) → Future< bool> -
非 Windows 平台默认实现:恒返回
false。override -
urlTest(
{required String groupTag}) → Future< void> -
对分组执行 URL 测速(转发原生)。
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
registerWith(
) → void - 注册本实现为平台默认实例(由 dart_plugin_registrant 调用)。