如何从刀柄获取 viewModelScope

时间:2021-04-25 20:22:29

标签: android kotlin viewmodel dagger-2 dagger-hilt

我的寻呼类

 class UserDataSource @Inject constructor(private val listService: ListService, private val scope: CoroutineScope): PageKeyedDataSource<Int, News>()

我需要从 ViewModel 获取 viewModelScope,但是在尝试但找不到如何从我的 viewModel 添加 CoroutineScope 时总是出错

0 个答案:

没有答案