Container Shape in Flutter : How to shape Container in Flutter? – pkbhai.com

Hello Readers! In this article, We are going to learn – How we can apply the Shape properties in our Container() Widget?

Container

  • A convenience widget that combines common painting, positioning, and sizing widgets.
  • It basically contains different widgets into one widget over which you can give padding, size, position, etc.

A Container holds many properties in itself, such as margin, padding, height, width, shape, color, alignment, and many more.

But in this article, we are going to talk about only – shape property.

In Container shape property applied inside decoration property.


Center(
child: Container(
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.red,
),
height: 100,
width: 100,
),
),

shape in Container

Content Protection by DMCA.com
Spread the love

Leave a Comment