Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AssistedViewModel
class AssistedViewModel @AssistedInject constructor(
private val dependency1: Dependency1,
private val dependency2: Dependency2,
...
@Assisted private val id: Int){
@AssistedInject.Factory
interface Factory{ fun create(id: Int) : AssistedViewModel }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment