Android, Jetpack Compose, Navigation, Type Safety, Kotlin.
custom BookType in the navigation route by setting typeMap: composable<BookDetail>( typeMap = mapOf(typeOf<Book>() to BookType) ) { backStackEntry -> val book = backStackEntry.toRoute<BookDetail>().book ... And voilà! Now it’s working. Could we simplify the code a little bit? Let’s try creating a