elye
10/31/2022, 6:47 AMcollectAsStateWithLifecycle
vs collectAsState
? Thanks.elye
10/31/2022, 10:27 AMval state = savedStateHandle
.getStateFlow(KEY, 0)
.stateIn(
viewModelScope,
WhileSubscribed(5000),
0
)
it works well when
val collected = stateFlow.collectAsStateWithLifecycle(0)