Passing Arguments
Send data to a destination.
Passing Data Between Screens
Often a destination needs data — like the id of the item to display. In Navigation Compose you encode arguments directly in the route, similar to a URL.
Route with a Placeholder
Declare a placeholder in the route using curly braces. Here {id} is an argument named id.
composable("details/{id}") { backStackEntry ->
// read id here
}All lessons in this course
- Setting Up NavHost
- Navigating Between Screens
- Passing Arguments
- Bottom Navigation