<Why update() method from MutableStateFlow doesn't...
# stackoverflow
u
Why update() method from MutableStateFlow doesn't seem to work? I'm actually creating a MutableStateFlow from a data class in this way private val _uiState = MutableStateFlow(DataUiState()) val uiState: StateFlow = _uiState.asStateFlow() When calling in this from: val newsItems = repository.dataItems(item) _uiState.update { it.copy(dataItems = dataItems) } the method update {} shows a non-exist method error in compiler, why is this happening?