fun Label(title: String, image: String, modifier: Modifier = Modifier)Overview
Lists, menus and toolbars adapt a label automatically: they may show the title, the icon or both.
Label("Favorites", systemImage = SFSymbol.starFill)This is the Kotlin form of SwiftUI Label.init(_:image:): SwiftUI documentation. In Swift it reads:
nonisolated init<S>(_ title: S, image name: String) where S : StringProtocolTopics
Creating a Label
fun Label(modifier: Modifier = Modifier, title: @Composable () -> Unit, icon: @Composable () -> Unit)
fun Label(title: String, systemImage: SFSymbol, modifier: Modifier = Modifier)
fun Label(title: String, image: String, modifier: Modifier = Modifier)
fun Label(titleResource: LocalizedKey, systemImage: SFSymbol, modifier: Modifier = Modifier)
fun Label(titleResource: LocalizedKey, image: String, modifier: Modifier = Modifier)
fun Label(titleKey: LocalizedKey? = null, systemImage: SFSymbol? = null, image: String? = null, modifier: Modifier = Modifier)
Methods
fun LabelSystemImage(titleKey: LocalizedKey, systemImage: SFSymbol, modifier: Modifier = Modifier)
fun LabelImage(titleKey: LocalizedKey, image: String, modifier: Modifier = Modifier)