ConnectivityUtils class
Name: 网络监听工具类 基于 基于connectivity_plus Created by Fitem on 2023/7/2
Properties
- connectionStatus ↔ ConnectivityResult
-
当前网络状态,默认为无网络
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkConnectivity(
) → Future< ConnectivityResult> - 获取当前网络状态
-
dispose(
) → void - 取消网络监听
-
emit(
) → void - 发送通知
-
listen(
ConnectivityResultCallBack c) → void - 监听网络状态
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
off(
ConnectivityResultCallBack? c) → void - 取消订阅
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getInstance(
) → dynamic - 获取单例方法