Last active
February 26, 2020 21:11
-
-
Save Nimrodda/054b60f3b87d37717640ec69e51f6786 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DetailViewModelFactory( | |
private val githubApi: GithubApi, | |
owner: SavedStateRegistryOwner, | |
defaultArgs: Bundle? = null | |
) : AbstractSavedStateViewModelFactory(owner, defaultArgs) { | |
override fun <T : ViewModel> create( | |
key: String, | |
modelClass: Class<T>, | |
handle: SavedStateHandle | |
): T { | |
return DetailViewModel(githubApi, handle) as T | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment