fun Modifier.foregroundStyle(style: ShapeStyle): ModifierOverview
It accepts any shape style: a Color, a gradient, or a hierarchical style such as ShapeStyle.secondary.
Text("Updated 2 min ago", modifier = Modifier.foregroundStyle(ShapeStyle.secondary))This is the Kotlin form of SwiftUI View.foregroundStyle(_:): SwiftUI documentation. In Swift it reads:
nonisolated func foregroundStyle<S>(_ style: S) -> some View where S : ShapeStyleTopics
Overloads
fun Modifier.foregroundStyle(primary: ShapeStyle, secondary: ShapeStyle, tertiary: ShapeStyle): Modifier
fun Modifier.foregroundStyle(style: ShapeStyle): Modifier
fun Modifier.foregroundStyle(primary: ShapeStyle, secondary: ShapeStyle): Modifier