Advertisement
stayer

Untitled

Feb 24th, 2021
1,170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 0.41 KB | None | 0 0
  1. class SomeViewModel(
  2.     private val someString: String,
  3.     private val someRepo: SomeRepository,
  4. ) : BaseViewModel() {
  5.     //Какой-то код
  6. }
  7.  
  8. class SomeFragment : Fragment(R.layout.some_layount) {
  9.     private val someViewModel by sharedViewModel<SomeViewModel> { parametersOf("Hello") }
  10. }
  11.  
  12. val viewModelsModule = module {
  13.     viewModel { (someString: String) -> SomeViewModel(someString, get()) }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement