FlutterSingBoxPlatform class abstract
flutter_sing_box 各平台实现必须实现的平台接口。
平台实现应继承本类而非以 interface 方式实现;
未被平台实现覆写的方法默认抛出 UnimplementedError。
- Inheritance
-
- Object
- PlatformInterface
- FlutterSingBoxPlatform
- Implementers
Constructors
Properties
-
clashModeStream
→ Stream<
ClientClashMode> -
Clash 模式的更新流。
no setter
-
connectedStatusStream
→ Stream<
ClientStatus> -
客户端连接状态的更新流。
no setter
-
groupStream
→ Stream<
List< ClientGroup> > -
分组列表的更新流。
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
logStream
→ Stream<
List< ClientLog> > -
sing-box 内核日志的更新流(按批推送)。
no setter
-
proxyStateStream
→ Stream<
ProxyState> -
代理生命周期状态的更新流(启动失败原因也经此流下发)。
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getSingBoxVersion(
) → Future< String> - 获取底层 sing-box 内核版本号。
-
init(
) → Future< void> - 初始化平台接口。
-
installService(
{required String serviceName, required String displayName, required String description}) → Future< bool> - 安装 Windows 系统服务。
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
queryServiceStatus(
) → Future< WindowsServiceStatus> -
查询 Windows 端
clash_sing_service的安装/运行状态。 -
selectOutbound(
{required String groupTag, required String outboundTag}) → Future< void> - 在分组中选中指定出站。
-
serviceReload(
) → Future< void> - 重载服务配置。
-
setClashMode(
String mode) → Future< void> - 设置 Clash 模式。
-
setGroupExpand(
{required String groupTag, required bool isExpand}) → Future< void> - 设置分组的展开状态。
-
startService(
) → Future< bool> - 启动已安装的 Windows 系统服务。
-
startVpn(
) → Future< void> - 启动 VPN 服务。
-
stopService(
) → Future< bool> - 停止 Windows 系统服务(helper 内部走 HTTP API 同步关闭)。
-
stopVpn(
) → Future< void> - 停止 VPN 服务。
-
toString(
) → String -
A string representation of this object.
inherited
-
uninstallService(
) → Future< bool> - 卸载 Windows 系统服务。
-
urlTest(
{required String groupTag}) → Future< void> - 对指定分组执行 URL 测速。
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ FlutterSingBoxPlatform
-
平台默认实例,缺省为 MethodChannelFlutterSingBox。
getter/setter pair