Last active
January 3, 2020 09:46
-
-
Save mlykotom/e4318ca4be5cb4f2a118011b35034e75 to your computer and use it in GitHub Desktop.
Connecting The Dots :: Motivation - parameters after initialization of 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 SomeViewModel @Inject constructor( | |
private val depFromDagger1: Dependency, | |
private val depFromDagger2: Dependency2 | |
) : ViewModel(){ | |
// may crash with UninitializedPropertyAccessException | |
lateinit var articleId: String | |
// must !! or ?. for every access | |
var fragmentParams: Bundle? = null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment