Answers for "viewmodel inject deprecated"

1

viewmodelinject deprecated

@HiltViewModel
class MyViewModel @Inject constructor(
    private val repository: Repository,
    private val savedStateHandle: SavedStateHandle
) : ViewModel(), LifecycleObserver {

    // Some code
}
Posted by: Guest on February-17-2021

Browse Popular Code Answers by Language