miqbaldc
12/13/2021, 12:07 PMCoroutineDispatcher
and returns Flow<T>
or suspend
(return T
) is enough?
abstract class FlowUseCase<out T, in Params> constructor(
private val threadExecutor: CoroutineDispatcher
) {
protected abstract fun execute(params: Params? = null): Flow<T>
open operator fun invoke(params: Params? = null): Flow<T> =
execute(params).flowOn(threadExecutor)
}
What implementation did you folks use, would love to know the pros n consMarcello Galhardo
12/13/2021, 12:22 PMStylianos Gakis
01/04/2022, 12:01 PMmiqbaldc
01/05/2022, 5:24 AM