I need to create a custom shape in jetpack compose similar to RoundedCornerShape, the result should look like this:
I believe I should extend the Shape interface like this:
class OvalCornerShape : Shape {
override fun createOutline(
size: Size,
layoutDirection: androidx.compose.ui.unit.LayoutDirection,
density: Density
): Outline {
val rect = size.toRect()
val path = Path().apply {
// do work here
}
return Outline.Generic(path)
}
Any idea how I can achieve this ?
