How can I pass a gradient using brush api to a com...
# compose
s
How can I pass a gradient using brush api to a composable who has a color parameter exposed as Color type ?
a
What composable is it?
z
The short answer is you can’t - Brush is effectively a supertype of Color (not actually in the type system, but in terms of features), not the other way around. But most Material components expose overloads for both.
s
It is for Indicator composable that comes with TabRow, but it’s implementation was simple so I ended up creating another composable that does the same thing except uses brush or color for background.
z
Might wanna file an issue, seems like something that should be built in