ConnectivityPlus class

网络状态变化管理

Constructors

ConnectivityPlus()
factory

Properties

connectivity Connectivity
final
current List<ConnectivityResult>
当前网络状态
no setter
hashCode int
The hash code for this object.
no setterinherited
networkAvailability bool
网络是否可用
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(ConnectivityListenCallback callback) bool
添加 需要根据网络变化执行的方法
checkConnectivity() Future<void>
重新检查是否链接网络
dispose() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeListener(ConnectivityListenCallback callback) bool
移除 需要根据网络变化执行的方案
showOverlayWhenUnavailableNetwork(UnavailableNetworkAlertBuilder alertUnavailableNetwork) Future<bool>
网络不可用 时 弹出 Overlay 禁止操作
subscription({UnavailableNetworkAlertBuilder? alertUnavailableNetwork}) Future<void>
订阅网络监听
toString() String
A string representation of this object.
inherited

Operators

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