collectAsState

fun <STATE : Any, SIDE_EFFECT : Any> ContainerHost<STATE, SIDE_EFFECT>.collectAsState(lifecycleState: Lifecycle.State = Lifecycle.State.STARTED): State<STATE>

Observe Container.stateFlow as State.

Parameters

lifecycleState

The minimum lifecycle state at which the state is observed.

Active subscriptions from this operator count towards repeatOnSubscription subscribers.