Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter: Smooth rounded corners

I would like to know how to make a smooth rounded corner in Flutter. I found a similar link to iOS approach - smooth rounded corners in swift but it did not help me find a solution to Flutter approach. I thought ContinuousRectangleBorder is the way, but it is not the shape I am looking for. I think some kind of clipper should work.

like image 607
Stepan Avatar asked Oct 28 '25 09:10

Stepan


1 Answers

I published a dedicated package that might help you : figma_squircle.

Container(
    height: 100,
    width: 100,
    decoration: ShapeDecoration(
        color: Colors.red.withOpacity(0.75),
        shape: SmoothRectangleBorder(
            borderRadius: SmoothBorderRadius(
              cornerRadius: 10,
              cornerSmoothing: 0.5,
            ),
        ),
    ),
)
like image 197
Alois Avatar answered Oct 29 '25 22:10

Alois



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!