JCNet class

用于获取当前网络信息

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addCallback(JCNetCallback callback) Future<bool>
设置回调
getNetType() Future<int>
网络类型
hasNet() Future<bool>
是否有网
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeCallback(JCNetCallback callback) Future<bool>
删除回调
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

ETHERNET int
网线
final
MOBILE int
数据网
final
UNAVAILABLE int
网络类型
final
UNKNOWN int
未知类型
final
WIFI int
Wifi
final

Static Methods

getInstance() JCNet
获得 JCNet 对象 @return JCNet 对象