标签: android kotlin repository viewmodel dagger-2
我很好奇哪种方法更好
class CustomViewModel @Inject constructor(private val repo: CustomRepository) : ViewModel()
或这个
class CustomViewModel @Inject constructor() : ViewModel() { @Inject lateinit var repo: CustomRepository }