BottomNavigationItemWithBadge
@Composable
fun BottomNavigationItemWithBadge() {
BottomNavigation {
BottomNavigationItem(
icon = {
BadgedBox(
badge = {
Badge {
val badgeNumber = "8"
Text(
badgeNumber,
modifier =
Modifier.semantics {
contentDescription = "$badgeNumber new notifications"
},
)
}
}
) {
Icon(Icons.Filled.Favorite, contentDescription = "Favorite")
}
},
selected = false,
onClick = {},
)
}
}