flowResourceCollector

fun <T, S> Flow<Resource<Failure, T>>.flowResourceCollector(scope: CoroutineScope, initialValue: S, onLoading: () -> Unit, onSuccess: (T?) -> Unit, onFailure: (Failure?) -> Unit): Job