https://kotlinlang.org logo
#compose
Title
# compose
a

Ayomide

01/01/2021, 4:21 PM
Hi, is this documentation up to date? I can't seem to pass a string to the
navController.navigate()
method
g

Grigoriev Dmitriy

01/01/2021, 4:51 PM
There are a lot of constructors of .navigate() method. You have to use this:
Copy code
.navigate(route: String, builder: NavOptionsBuilder.() -> Unit = {})
or just import
Copy code
import androidx.navigation.compose.navigate
and call appropriate .navigate()
🙏 1
i

Ian Lake

01/01/2021, 5:26 PM
Feel free to star the existing Android Studio issue regarding not offering the import: https://issuetracker.google.com/172834438
👍 1
a

ahulyk

01/01/2021, 6:27 PM
Copy code
import androidx.navigation.compose.*
will help
4 Views