I've got a `ViewModel` where some arguments are in...
# compose
r
I've got a
ViewModel
where some arguments are injected by hilt, others are identifiers for the database object I wanna work on for the view. How would I pass them separately, as Hilt IIRC can't just fill some arguments. Example:
Copy code
class CardEditViewModel @Inject constructor(
    private val connectionCache: ConnectionCache,
    private val appDatabase: AppDatabase,
    private val deviceId: Long,
    private val uuid: UUID,
): ViewModel() {
^ the first two arguments are injected, the last two passed by the navgraph.
i
Sounds like your ViewModel should take a
SavedStateHandle
, which is automatically populated from the arguments your screen receives via the nav graph