add border to a container with borderradius in flutter

How to add Border Radius to Container in Flutter

Hi Guys How are all of you? Expectation all of you are fine. Today We will figure out How to add Border Radius to Container in Flutter ?

Ordinarily we need to give Border Radius to Container, so I will share my code on the most proficient method to add Border Radius to a Container.

Step by step instructions to add Border Radius to Container in Flutter

Step by step instructions to add Border Radius to a Container.

Its Very Simple. Simply Add design to your compartment.

use BoxDecoration property in enrichment.

BoxDecoration has borderRadius Property.

give indicate fringe sweep 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),
            ),
          ),
        ),
      ),
    );
  }
}

So Guys That’s It For How to add Border Radius to Container in Flutter ? Expectation you like our instructional exercise. Remark underneath Your considerations and your inquiries. And Furthermore Comment beneath your proposal here.

Leave a Comment