truth
                  
                  
                      // ----------------------------------------------------------
                  
                  
                  
                  
                  
                      val bottomBarTabs = HomeSections.values()
                  
                  
                      private val bottomBarRoutes = bottomBarTabs.map { it.route }
                  
                  
                  
                  
                  
                      // Reading this attribute will cause recompositions when the bottom bar needs shown, or not.
                  
                  
                      // Not all routes need to show the bottom bar.
                  
                  
                      val shouldShowBottomBar: Boolean
                  
                  
                          @Composable get() = navController
                  
                  
                              .currentBackStackEntryAsState().value?.destination?.route in bottomBarRoutes
                  
                  
                
господи, гугл опять со своими костылями
Можете скинуть пожалуйста ссылку на файл в репозитории, где в примере указан такой код?
https://github.com/android/compose-samples/blob/main/Jetsnack/app/src/main/java/com/example/jetsnack/ui/JetsnackAppState.kt
Обсуждают сегодня