Net Coroutine Scope
open class NetCoroutineScope(lifecycleOwner: LifecycleOwner?, lifeEvent: Lifecycle.Event, dispatcher: CoroutineDispatcher) : AndroidScope
Content copied to clipboard
自动显示网络错误信息协程作用域
Constructors
NetCoroutineScope
Link copied to clipboard
fun NetCoroutineScope(lifecycleOwner: LifecycleOwner? = null, lifeEvent: Lifecycle.Event = Lifecycle.Event.ON_DESTROY, dispatcher: CoroutineDispatcher = Dispatchers.Main)
Content copied to clipboard
Functions
handleError
Link copied to clipboard
launch
Link copied to clipboard
open override fun launch(block: suspend CoroutineScope.() -> Unit): NetCoroutineScope
Content copied to clipboard
preview
Link copied to clipboard
fun preview(breakError: Boolean = false, breakLoading: Boolean = true, block: suspend CoroutineScope.() -> Unit): AndroidScope
Content copied to clipboard
"预览"作用域 该函数一般用于缓存读取, 只在第一次启动作用域时回调 该函数在作用域NetCoroutineScope.launch之前执行 函数内部所有的异常都不会被抛出, 也不会终止作用域执行
Inheritors
DialogCoroutineScope
Link copied to clipboard
PageCoroutineScope
Link copied to clipboard
StateCoroutineScope
Link copied to clipboard
ViewCoroutineScope
Link copied to clipboard