I created an MVVM structure using ViewModelProvide...
# koin
d
I created an MVVM structure using ViewModelProvider.Factory with Koin, what do you think? https://github.com/diefferson/koinExample
d
Hi @dawidhyzy, this line is to force instantiate an viewModel that is a type of ViewModel, you kan see this in https://github.com/diefferson/koinExample/blob/master/app/src/main/java/br/com/disapps/simplemvvm/ui/main/MainActivity.kt#L24
d
but Hungarian notation in Kotlin?
d
A this 'm' is of Main View model, case in my views i create another view model, i know whats is the main view model
a
interesting
I must admit that I have to think a bit about the ViewModelFactory and how to help/provide a smart way to do that
d
Yes, in Dagger structure this is possible with annotations, but my structure with Koin using a map is very simple too
I did not find any samples from ViewModelFactory in Koln
a
That 's right, not yet sample about ViewModelFactory
105 Views