Last active
December 21, 2020 11:08
-
-
Save lookashc/cc14ca0f0d777609ae0af4cb39a2aa32 to your computer and use it in GitHub Desktop.
medium-feature-toggles-gist5
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 AveragesCardViewModel( | |
private val showAveragesCardFeatureToggle: ShowAveragesCardFeatureToggle | |
) { | |
val isVisible: Boolean = showAveragesCardFeatureToggle.value | |
class Factory @Inject constructor( | |
private val showAveragesCardFeatureToggle: ShowAveragesCardFeatureToggle | |
) : ViewModelProvider.Factory() { | |
override fun <T : ViewModel> create(modelClass: Class<T>): T = | |
AveragesCardViewModel(showAveragesCardFeatureToggle) as T | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment