How to correctly fetch data from room?
In my Android app, I am fetching data from Room and displaying it on maps. I came across these two view model approaches to fetch data.
Which one is the more effective and good approach?
Currently, I am fetching data with the second approach. It works fine. Just wondering what are differences between these two are.
First approach-
private val _visibleRegion = MutableStateFlow(defaultVisibleRegion)
private val _zoomLevel = MutableStateFlow(6f)
private val _isFavorite = MutableStateFlow(false)...