collect as state lifecycle aware - VeleSSemecky/Purchase GitHub Wiki

//presentation/com.veles.purchase.presentation.base/collectAsStateLifecycleAware

collectAsStateLifecycleAware

[androidJvm]\

@Composable

fun <T : R, R> Flow<T>.collectAsStateLifecycleAware(initial: R, context: CoroutineContext = EmptyCoroutineContext, minActiveState: Lifecycle.State = Lifecycle.State.STARTED): State<R>

@Composable

fun <T : R, R> StateFlow<T>.collectAsStateLifecycleAware(initial: R = value, context: CoroutineContext = EmptyCoroutineContext, minActiveState: Lifecycle.State = Lifecycle.State.STARTED): State<R>

⚠️ **GitHub.com Fallback** ⚠️