Skip to content

Instantly share code, notes, and snippets.

@tfcporciuncula
Created February 29, 2024 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tfcporciuncula/71ef171d9d18a0fd8dc9f84e6912ad76 to your computer and use it in GitHub Desktop.
Save tfcporciuncula/71ef171d9d18a0fd8dc9f84e6912ad76 to your computer and use it in GitHub Desktop.
private val viewModel by viewModels<MyViewModel>(
extrasProducer = {
defaultViewModelCreationExtras.withCreationCallback<MyViewModel.Factory> { factory ->
factory.create(runtimeArg = "abc")
}
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment