<How to observe within Viewmodel in Android Kotlin...
# stackoverflow
u
How to observe within Viewmodel in Android Kotlin? Below is my viewmodel class body private var _movieState = mutableStateOf(false) val movieState = _movieState private val query = if (_movieState.value) ListState.POPULAR_PLAYING else ListState.ALL_PLAYING val moviesData: Flow = Pager(PagingConfig(pageSize = 10)) { MoviePagingSource(movieRepository, query.string) }.flow And I have Two function which populate the Boolean value fun setListToPopular(){ _movieState.value = true } fun...