Created
August 2, 2020 18:24
-
-
Save Codetecuhtli/b6c81d735076abeff9505f1214013f5c to your computer and use it in GitHub Desktop.
Factory para nuestro ViewModel
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 MovieViewModelFactory(private val repository: MovieRepository): ViewModelProvider.Factory { | |
override fun <T : ViewModel?> create(modelClass: Class<T>): T = MovieViewModel(repository) as T | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment