ProxyState class sealed

代理(VPN)服务的生命周期状态。

sealed class 形态:四个状态各为一个子类,经模式匹配穷尽处理。 仅 ProxyStopped 携带数据(ProxyStopped.errMessage)。

Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
name → String
该状态的显示名(EventChannel 传输字符串与 UI 展示共用)。
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromName(String name) → ProxyState
解析显示名到对应状态;未知值兜底为无错误信息的 stopped。

Constants

started → const ProxyStarted
已启动。
starting → const ProxyStarting
正在启动。
stopped → const ProxyStopped
已停止(无错误信息)。供 state == ProxyState.stopped 这类存量比较使用。
stopping → const ProxyStopping
正在停止。