Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to draw a simple circle in Flutter? [closed]

Tags:

flutter

dart

Most of the tutorials I found on drawing circles on flutter were related to buttons. What if I simply want to draw a circle?

One way would be with ClipOval:

ClipOval(child: Container(color: Colors.grey,width: 15, height: 15),)

What if I want to draw borders and so? ClipOval does not seem to be the best way to do it.

like image 224
Guerlando OCs Avatar asked Oct 15 '25 16:10

Guerlando OCs


1 Answers

You could use a container

Container( 
    decoration: BoxDecoration(
        shape: BoxShape.circle,
    ),
    ...
),

Supports borders: https://api.flutter.dev/flutter/painting/BoxDecoration-class.html

like image 180
Alienspaces Avatar answered Oct 18 '25 08:10

Alienspaces



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!