net / com.drake.net.utils / com.drake.brv.PageRefreshLayout / scope
scope¶
fun PageRefreshLayout.scope(dispatcher: CoroutineDispatcher = Dispatchers.Main, block: suspend CoroutineScope.() ->
Unit
):
PageCoroutineScope
PageRefreshLayout的异步作用域
- 下拉刷新自动结束
- 上拉加载自动结束
- 捕获异常
- 打印异常日志
- 吐司部分异常com.drake.net.NetConfig.onStateError
- 判断添加还是覆盖数据
- 自动显示缺省页
布局被销毁或者界面关闭作用域被取消