My viewmodel module looks like this:
val viewModelModule = module {
viewModel { (id: Int, user: String, email: String) ->
MyViewModel(get(), get(), id = id, user = user, email = email)
}
}
so the viewmodel accepts a total of five parameters, the first two being repositories, here are modules for both of them:
val firstRepositoryModule = module {
single {
FirstRepository()
}
}
val secondRepositoryModule = module {
single {
SecondRepository()
}
}
i'm aware of this sample code, but here the viewmodel doesn't accept any parameters, so it doesn't answer my question