Many of you are familiar with the Container Widget. It is nothing but a parent widget that contains child widgets to manage its frontend property like height, background, width & color. This article will cover How a developer can create One Side Circular Border Of Widget In Flutter?
How to Make One Side Circular Border Of Widget In Flutter?
Use BorderRadius.only and Provide the Sides.
Center( child: Container( height: 100, width: 100, decoration: BoxDecoration( borderRadius: BorderRadius.only(topRight: Radius.circular(40)), border: Border.all(width: 3,color: Colors.green,style: BorderStyle.solid) ), child: Center(child: Text("Hello")), ), ),
The output will look like the below:
- Use BorderRadius.only and be specific if you need one side of the container to be rounded which corners to round.:
Container( width: 150.0, padding: const EdgeInsets.all(20.0), decoration: BoxDecoration( borderRadius: BorderRadius.only( topRight: Radius.circular(40.0), bottomRight: Radius.circular(40.0)), color: Colors.white), child: Text("hello"), ),
Thanks for being with us on a Flutter Journey !!!
In this article, we have been through How to Make One Side Circular Border Of Widget In Flutter?
Keep Learning !!! Keep Fluttering !!!
Our Flutter Agency portal is dedicated to Flutter & its relatable technology to help Flutter Developers. Check out our website for cool resources, specially handpicked from the Flutter news industry like the latest Widget Guide, Flutter Projects, Code libs, etc.