close

How to add Border Radius to Container in Flutter ?

Hello Guys How are you all? Hope you all are fine. Today We are going to learn How to add Border Radius to Container in Flutter ?

Many times we need to give Border Radius to Container, so i am going to share my code on on how to add Border Radius to a Container.

How to add Border Radius to Container in Flutter

How to add Border Radius to a Container.

  • Its Very Simple. Just Add decoration to your container.
  • use BoxDecoration property in decoration.
  • BoxDecoration has borderRadius Property.
  • give specify border radius to your Container.
  • Here is My Full Source Code.
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        appBar: AppBar(
          title: Text("Border Radius to Container - FlutterCorner"),
        ),
        body: Container(
          margin: EdgeInsets.all(100.0),
          decoration: BoxDecoration(
            color: Colors.green,
            borderRadius: BorderRadius.only(
              topRight: Radius.circular(30.0),
              bottomLeft: Radius.circular(30.0),
            ),
          ),
        ),
      ),
    );
  }
}

Faq

  1. How to add Border Radius to Container in Flutter?

    To add Border Radius to a Container. It's Very Simple. Just Add decoration to your container. use BoxDecoration property in decoration. BoxDecoration has border-radius Property. give a specific border radius to your Container.

  2. add Border Radius to Container in Flutter

    To add Border Radius to a Container. It's Very Simple. Just Add decoration to your container. use BoxDecoration property in decoration. BoxDecoration has border-radius Property. give a specific border radius to your Container.

  3. add Border to Container in Flutter

    To add Border Radius to a Container. It's Very Simple. Just Add decoration to your container. use BoxDecoration property in decoration. BoxDecoration has border-radius Property. give a specific border radius to your Container.

Summery

So, It’s All About How to add Border Radius to Container in Flutter ?. I hope this tutorial helps you to solve your error. Please Comment Below if You stucks anywhere with my code.

Also Check Out Below Tutorials

Leave a Comment

%d bloggers like this: