Skip to content

Instantly share code, notes, and snippets.

@Marchuck
Last active December 9, 2019 20:43
Show Gist options
  • Save Marchuck/09b6effc355fd2f7cfd8caa2e1a596f7 to your computer and use it in GitHub Desktop.
Save Marchuck/09b6effc355fd2f7cfd8caa2e1a596f7 to your computer and use it in GitHub Desktop.
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