A container with a rounded corner can be used to make great designs.
like this login page.
A container that has rounded corners.
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(20))
),
child: ...
)
The above-mentioned code makes the corner of the container have a rounded border with a particular diameter.
To make a container completely circle. Like a rounded ball.
Container(
decoration: BoxDecoration(
shape: BoxShape.circle
),The above-mentioned code can make a container complete circle that can be used for profile pictures, buttons, and many more.
To make a container border circular at a selected corner.
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
topRight: Radius.circular(40.0),
bottomRight: Radius.circular(40.0)),
topLeft: Radius.circular(40.0),
bottomLeft: Radius.circular(40.0)),
child: Text("hello"),
),topRight: Radius.circular(40.0),
is used make a circular border at the top rigth of the container.
bottomRight: Radius.circular(40.0)),is used make a circular border at the bottom rigth of the container.topLeft: Radius.circular(40.0),
is used make a circular border at the top left of the container.bottomLeft: Radius.circular(40.0)),
is used make a circular border at the bottom left of the container.
this can be used to make a container circular at the corners you choose to make a circle.
Thank you!