Created
June 26, 2021 08:21
-
-
Save orcchg/691bad6e2a2f0f9db05a8be34595bb59 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 StockListViewModelFactory @Inject constructor( | |
| private val provider: Provider<StockListViewModel> | |
| ) : ViewModelProvider.Factory { | |
| @Suppress("Unchecked_Cast") | |
| override fun <T : ViewModel> create(modelClass: Class<T>): T = | |
| provider.get() as T | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment