I see this question here regarding text gradients https://stackoverflow.com/a/64342047/4313362. Any plans to include support for text/foreground gradients natively in the framework?
Robert Menke
02/09/2022, 5:08 AM
Example in SwiftUI would look like this
Copy code
public func gradientForeground(colors: [Color]) -> some View {
let gradient = LinearGradient(
colors: colors,
startPoint: .topLeading,
endPoint: .bottomTrailing
)
return self.overlay(gradient).mask(self)
}
c
Chris Sinco [G]
02/09/2022, 7:36 AM
Technically that example is native already to Android ;) but yes perhaps a higher level abstraction would be useful. @Siyamed may know if there's an open request for this already.
🙌 1
🙏 1
s
Siyamed
02/14/2022, 8:15 PM
Yes there is an open ticket under compose > text component with the keyword brush.
I am away from keyboard will post later.