Hi everyone! Does anyone know why the `Shapes` cla...
# compose
p
Hi everyone! Does anyone know why the
Shapes
class takes a
CornerBasedShape
and not just a
Shape
, and because of this I cannot use
GenericShape
as a theme parameter?
a
because according to the Material design specification some of the component can use a shape from Shapes with some modification. for example
TextField
is using
Copy code
MaterialTheme.shapes.small.copy(bottomEnd = ZeroCornerSize, bottomStart = ZeroCornerSize),
as a shape. such theming will not be possible with any generic shape. but you can still provide your GenericShape as a param for TextField if needed
p
I see, thanks for the answer