Matteu
0
Q:

flutter container rounded corners

Container(
  decoration: BoxDecoration(
    border: Border.all(
      color: Colors.red[500],
    ),
    borderRadius: BorderRadius.all(Radius.circular(20))
  ),
  child: ...
)
0
QUESTION: Flutter give container rounded border

ANSWER1: 

Container(
    decoration: BoxDecoration(
    shape: BoxShape.circle,
    ),
    child:   ...
    ),

ANSWER 2:
Container(
  decoration: BoxDecoration(
    border: Border.all(
      color: Colors.red[500],
    ),
    borderRadius: BorderRadius.all(Radius.circular(20))
  ),
  child: ...
)
1
        new Container(
          height: 300.0,
          color: Colors.transparent,
          child: new Container(
            decoration: new BoxDecoration(
              color: Colors.green,
              borderRadius: new BorderRadius.only(
                topLeft: const Radius.circular(40.0),
                topRight: const Radius.circular(40.0),
              )
            ),
            child: new Center(
            child: new Text("Hi modal sheet"),
           )
         ),
        ),
1
Container(
      width: screenWidth / 7,
      decoration: BoxDecoration(
        border: Border.all(
          color: Colors.red[500],
        ),
      ),
      child: Padding(
        padding: EdgeInsets.all(5.0),
        child: Column(
          children: <Widget>[
            Text(
              '6',
              style: TextStyle(
                  color: Colors.red[500],
                  fontSize: 25),
            ),
            Text(
             'sep',
              style: TextStyle(
                  color: Colors.red[500]),
            )
          ],
        ),
      ),
    );
0
new Center(    child: new Container(      width: 200.0,      height: 200.0,      color: Colors.white,      child: new Container(        decoration: new BoxDecoration(          border: new Border.all(              color: Colors.green,              width: 5.0,              style: BorderStyle.solid          ),          borderRadius: new BorderRadius.all(new Radius.circular(20.0)),          image: new DecorationImage(              image: new AssetImage('assets/images/JL-Logo-150.png'),          )        ),      ),    ),  );
0

New to Communities?

Join the community