How can i pass an argument
from NavHostController
to my ViewModel
init{}
?
I don't really understand how is the SQL query related here. To pass an argument from your navigation arguments to a viewmodel you have to use SavedStateHandle. Then you can use get() or getLiveData(). The key would be equal to the argument name. https://developer.android.com/topic/libraries/architecture/viewmodel-savedstate