NetUtils class
Constructors
- NetUtils()
-
factory
Properties
Methods
-
applyConnectivityResults(
List< ConnectivityResult> results) → void -
用一组
ConnectivityResult同步刷新_connected/_netType缓存。 -
dispose(
) → void - 取消 start 建立的订阅。幂等:未订阅或重复调用均安全。
-
isConnectedNet(
{bool reChecked = false}) → Future< bool> - 是否连接网络 reChecked 是否需要重新检测
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
start(
) → void -
订阅
Connectivity.onConnectivityChanged流。 -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
isConnectedFromResults(
List< ConnectivityResult> results) → bool - Pure connectivity decision extracted from isConnectedNet.