index.md 1.1 KB

net / com.drake.net.utils / kotlinx.coroutines.flow.Flow

Extensions for kotlinx.coroutines.flow.Flow

Name Summary
listen 收集Flow结果并过滤重复结果fun <T> Flow<List<T>>.listen(lifecycleOwner: LifecycleOwner? = null, lifeEvent: Event = Lifecycle.Event.ON_DESTROY, dispatcher: CoroutineDispatcher = Dispatchers.Main, block: (List<T>) ->Unit):AndroidScope
scope Flow直接创建作用域fun <T> Flow<T>.scope(owner: LifecycleOwner? = null, event: Event = Lifecycle.Event.ON_DESTROY, dispatcher: CoroutineDispatcher = Dispatchers.Main, action: suspend (value: T) ->Unit):AndroidScope