How to add Border Radius to Container in Flutter?

This Article is posted by seven.srikanth at 9/10/2019 5:06:39 PM

In this example, I'm going to share the code on how to add Border Radius to a Container. Here is how the final output is going to look. ![](https://fluttercentral.com/Uploads/2425c1a6-2ce6-4d05-88d0-662a27aac5b5.PNGwidth="35%height="auto]( Here is the code that you need to run this example. runApp(MyApp()); class MyApp extends StatefulWidget { @override _MyAppState createState() => _MyAppState(); } class _MyAppState extends State { double padValue = 0; @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( appBar: AppBar( title: Text("Border Radius to Container"), ), body: Container( margin: EdgeInsets.all(100.0), decoration: BoxDecoration( color: Colors.orange, shape: BoxShape.rectangle, borderRadius: BorderRadius.only( topLeft: Radius.circular(25.0), bottomRight: Radius.circular(25.0))), )), ); } }` Thanks, Srikanth

Tags: Border Radius to Container; BorderRadius to Container; BoxDecoration in a Container;



0 Comments
Login to comment.
Recent Comments

Be the first to Comment. You can ask a Query or Share your toughts or Just say thanks.




© 2018 - Fluttercentral | Email to me - Seven.srikanth@gmail.com