I have an activity that has many fragments in it, and I want to share things using a shared view model between fragments, but when I initialize it the way I do in fragments it doesn't work, it shows an error, what is the correct way to access it if it is possible?
val model : sharedViewModel by activityViewModels()
i have tried to do ViewModelProvider but didn't know how to do it properly cause I am coding using kotlin