John Aoussou
private val _stateFlow1 = MutableStateFlow(0)
_stateFlow2
_stateFlow2.value = _stateFlow1.value * _stateFlow1.value
Stew Boling
val _stateFlow1 = MutableStateFlow(0) val _stateFlow2 = _stateFlow1.map { it * it }.stateIn(viewModelScope)
stateIn()
Suspend function 'stateIn' should be called only from a coroutine or another suspend function
val _stateFlow1 = MutableStateFlow(0) val _stateFlow2 = _stateFlow1.map { it * it }.stateIn(viewModelScope, SharingStarted.Eagerly, _stateFlow1.value)
A modern programming language that makes developers happier.