Kotlin - StateFlow not emitting update to its collectors
I got a StateFlow of type UserStateModel (data class) in my app.
private val _userStateFlow: MutableStateFlow = MutableStateFlow(UserStateModel())
val userStateFlow: StateFlow = _userStateFlow
here is the UserStateModel
data class UserStateModel(
val uid: String? = null,
val username: String? = null,
val profileImageUrl: String? = null,
var isLoggedIn: Boolean = false,
val isPremiumUser: Boolean = false,
val posts: List? = listOf()
)
When I update the StateFlow with...