What’s the best way to create a `Button` with a `L...
# compose
s
What’s the best way to create a
Button
with a
LinearGradient
for the background? I see that the Button composable is not that hard to recreate, but internally using a
Surface
which takes a
Color
. Does this mean I have to recreate both
Surface
and it’s private composable
SurfaceLayout
to achieve a gradient background?
i
Button
is part of
compose-material
and it sounds like you're deviating from what material allows. You might want to take a look at the Jetsnack sample, which has gradient buttons: https://github.com/android/compose-samples/tree/main/Jetsnack