How to create circle container with border in flutter?


As you can notice, the background color of the decoration is slightly overflowing the circular border. I’ve tried in different ways (e.g. using ClipOval) but the result is always the same.

enter image description here


    I have just faced the same issue...
    Easy workaround:

        width: 28,
        height: 28,
        decoration: BoxDecoration(
          color:, // border color
        child: Padding(
          padding: EdgeInsets.all(2), // border width
          child: Container( // or ClipRRect if you need to clip the content
            decoration: BoxDecoration(
              color:, // inner circle color
            child: Container(), // inner content


Answered By – Mehedi Hasan

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published