ConnectivityService class

连通性检测与网络信息采集服务 / Connectivity detection and network information service.

Properties

hashCode int
The hash code for this object.
no setterinherited
onConnectivityChanged Stream<NetworkConnectionInfo>
监听网络连接变化 / Emits a fresh snapshot whenever connectivity changes.
no setter
reachabilityProbe Future<bool> Function()
主动可达性探测实现 / Reachability probe used when explicitly requested.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

checkConnection({bool includeNativeDetails = true, bool probeReachability = false, Duration probeTimeout = const Duration(seconds: 3)}) Future<NetworkConnectionInfo>
采集一次网络连接快照 / Captures one network connection snapshot.
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