reactormonk
06/03/2024, 4:34 PMViewModel
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:
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.Ian Lake
06/03/2024, 5:40 PMSavedStateHandle
, which is automatically populated from the arguments your screen receives via the nav graph