@Composable
fun Greeting(navController: NavHostController) {
val actions = Actions(navController)
NavHost(navController, startDestination = Routes.SplashPage) {
composable(Routes.SetPage) { SetPage(actions) }
composable(Routes.AboutPage) { AboutPage(actions) }
composable(Routes.FeedBackPage) { FeedBackPage(actions) }
composable(Routes.WebViewPage + "{url}") { WebViewPage(actions, url = "") }
composable(Routes.UserPage) { UserPage(actions) }
composable(Routes.EditPage + "/{title}/{content}") { EditPage(actions) }
composable(Routes.PwdSetPage + "{type}") { PwdSetPage(actions) }
composable(Routes.QrCodePage) { QrCodePage(actions) }
composable(Routes.SplashPage) { SplashPage(actions) }
composable(Routes.MainPage) { MainPage(actions) }
composable(Routes.SearchPage) { SearchPage(actions) }
composable(Routes.ProListPage) { ProListPage(actions) }
composable(Routes.ProDetailPage + "{data}")) { ProDetailPage(actions) }
}
}
似乎是bug在图书馆,碰到了同样的问题。
修复了最新版本的导航:
implementation "androidx.navigation:navigation-compose:2.4.0-alpha08"