問題例項:
NavHost(modifier = modifier,navController = navController) {
Log.d("UserScreen", "NavHost 被呼叫")
composable(ReplyRoute.MAIN) {
Log.d("UserScreen", "TOOLS 被呼叫")
TaskScreen(viewModel, navController = navController)
}
composable(ReplyRoute.TOOLS) {
Log.d("UserScreen", "TOOLS 被呼叫")
DashboardCollection("功能")
}
}
點選Tools按鈕跳轉至Tools頁面時,
"TOOLS 被呼叫" 列印了3次
對此,Google的回應是預期行為,不是BUG.以下為連結地址
https://issuetracker.google.com/issues/225987040?pli=1