Created
February 29, 2024 12:29
-
-
Save tfcporciuncula/f0c3be135d06b9df17a6168be31eb2d3 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
@HiltViewModel(assistedFactory = MyViewModel.Factory::class) | |
class MyViewModel @AssistedInject constructor( | |
@Assisted val runtimeArg: String, | |
// other dependencies | |
) : ViewModel() { | |
@AssistedFactory interface Factory { | |
fun create(runtimeArg: String): MyViewModel | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment