title: Jetpack Compose - BottomNavigationItem swapping Icons
body: <p>I am trying to figure out if there is a way to change the <code>Image</code> used by my Composable <code>Icon</code> based on the selected states, similar to how <code>selectedContentColor</code> and <code>unselelectedConstentColor</code> change based on selected state.</p>
  <p>I have the following code:</p>
  <pre><code>@Composable
  fun BottomNavigation(navController: NavController) {
         val items = listOf(
          BottomNavItem.Home,
          BottomNavItem.Track,
          BottomNavItem.Clothes,
          BottomNavItem.Logs,
          BottomNavItem.Ideas,
          BottomNavItem.Sessions
      )
      BottomNavigation(
          modifier = Modifier
              .height(90.dp)
              .padding(0.dp),
          backgroundColor = colorResource(id = R.color.Black),
          contentColor = colorResource(id = R.color.Black)
  
      ) {
          val navBackStackEntry by navController.currentBackStackEntryAsState()
          val currentRoute = navBackStackEntry?.destination?.route
          items.forEach { item -&gt;
              BottomNavigationItem(
                  modifier = Modifier
                      .scale(.7F)
                      .fillMaxHeight()
                      .requiredHeight(90.dp)
                      .padding(0.dp),
                  selected = currentRoute == item.screen_route,
                  icon = {
                      Image(painterResource(id = item.icon), contentDescription = &quot;none&quot;)
                  },
                  selectedContentColor = Color.White,
                  unselectedContentColor = Color.Black.copy(0.6f),
                  alwaysShowLabel = false,
                  onClick = {
                      navController.navigate(item.screen_route) {
                          navController.graph.startDestinationRoute?.let { screen_route -&gt;
                              popUpTo(screen_route) {
                                  saveState = true
                              }
                          }
                          launchSingleTop = true
                          restoreState = true
                      }
                  }
              )
          }
      }
  }
  </code></pre>
  <p>The goal would be to have the following change based on selected status. While this doens't work, its essentially,</p>
  <pre><code>if (selected){ icon = { Image(painterResource(id = item.icon_on), contentDescription = &quot;selected&quot;)} }else{
  icon = { Image(painterResource(id = item.icon_off), contentDescription = &quot;not selected&quot;)}
  }
  </code></pre>
  <p>I tried to use this logic and define a new variable before the BottomNavigationItem composable function is called, but that didn't work. Likewise, trying to use an if in the parameters doesn't work.</p>