<How to share the same instance of a data class ac...
# stackoverflow
r
How to share the same instance of a data class across all my view models? I'm very new to android development and struggling to find this answer. Is it possible to share the same instance of a data class across all my view models? Currently when my app first starts, I'm fetching my user's app preferences from a Firestore DB and instantiating a data class instance I have defined to hold all user preferences. I want to have all my view models to have access to the user preferences without every view model having to make the Firestore DB call and creating its own...