jetpack compose navigation - SaveStateHandle.toRoute cannot be called in viewModel in kmp project - Stack Overflow

admin2025-04-30  1

This is my first step in kmp and kodein.

I used kodein for DI. For the navigation I used composed type-safe navigation. My kodein & navigation library declaration in libs.version.toml is as follow.

kodeinDi = "7.23.1"
#navigation
navigationCompose = "2.8.0-alpha08"

#kodein
kodein-di = { module = "org.kodein.di:kodein-di", version.ref = "kodeinDi" }

#navigation
navigation-compose = { module = "org.jetbrains.androidx.navigation:navigation-compose", version.ref = "navigationCompose" }

Why can't I able to call savedStateHandle.toRoute in viewModel.

Please help me!!

I tried to search some source for this.I couldn't able to find it.

转载请注明原文地址:http://anycun.com/QandA/1746021273a91455.html