Anyone has any idea what I could be doing wrong <h...
# compose
l
Anyone has any idea what I could be doing wrong here?
c
As they say in the comments - would be easier to track down if you post the view model code 😅
Wild guess, you forgot the
@HiltViewModel
annotation.
l
No, I didn’t, the ViewModel is empty, just has a dependency in the constructor
Copy code
@HiltViewModel
class ViewModelC @Inject constructor(
    private val getAllCData: GetAllCData,
) : ViewModel() {

    val viewState = MutableStateFlow(CViewState())
}
Note that moving the dependency to another of the viewModels (used from the first 2 screens) won’t result in the same problem Removing the dependency will solve the problem, only if removed from that specific ViewModel. Using another dependency (already used from other ViewModels) would still cause the problem
s
Sounds weird, if you can make a minimal repro that would be nice. If not, idk try to delete all the generated code from hilt and build from scratch, it might be some hilt magic going wrong.