Android, Jetpack Compose, Navigation, Type Safety, Kotlin.
type = NavType.IntType } ), ) { backStackEntry -> val bookId = requireNotNull(backStackEntry.arguments?.getInt("bookId")) BookDetailScreen( modifier = modifier, bookId = bookId, ) } } } The only thing left is to start using the Navigation component in the MainActivity. setContent {