Dagger Hilt : Scope dependencies for parent/child fragment

Viewed 117

Hilt does not provide a @ParentFragmentScope.

I want to share LoginInfo between Parent ViewModel and Child ViewModel. I want to inject LoginInfo with the same scope into Parent ViewModel and Child ViewModel.

If you make it with @FragmentScope, Parent and Child ViewModel have different address values for LoginInfo instances.

And I don't want to share the view model as one.

What should I do?

enter image description here

0 Answers
Related