https://kotlinlang.org logo
Title
g

gsala

01/18/2019, 12:33 PM
The use of this block is to provide a ViewModel in an Activity and it's used like so:
private val model: MyViewModel by viewModelProvider { MyViewModel(dependencies) }
g

gsala

01/18/2019, 12:47 PM
Awesome!
g

gsala

01/18/2019, 12:56 PM
@ashdavies what dependency is that from? I don't seem to get it with fragment-ktx, viewmodel-ktx or core-ktx
a

ashdavies

01/18/2019, 12:56 PM
androidx.activity
😉
g

ghedeon

01/18/2019, 1:03 PM
it's alpha https://mvnrepository.com/artifact/androidx.fragment/fragment-ktx but you might as well just copy the files into your project, it's not much.