xxxxxxxxxx
@override
Widget build(BuildContext context) {
return Container(
width: 242.7,
height: 150.0,
decoration: const BoxDecoration(
color: Color.fromRGBO(77, 77, 77, 1.0),
borderRadius: BorderRadius.all(
Radius.circular(22.0), // radius
),
),
);
}
xxxxxxxxxx
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"),
)
),
),
xxxxxxxxxx
Container(
decoration: BoxDecoration(
border: Border.all(
color: Colors.red[500],
),
borderRadius: BorderRadius.all(Radius.circular(20))
),
child:
)
xxxxxxxxxx
Container(
height: 200.0,
color: Colors.transparent,
child: Container(
decoration: BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.only(
topLeft: const Radius.circular(20.0),
topRight: const Radius.circular(20.0),
)
),
child: Text("Text ...."),
),
),
xxxxxxxxxx
Container(
child: Text(
'This is a Container',
textScaleFactor: 2,
style: TextStyle(color: Colors.black),
),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.white,
boxShadow: [
BoxShadow(color: Colors.green, spreadRadius: 3),
],
),
height: 50,
),
xxxxxxxxxx
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:
)
xxxxxxxxxx
Container(
decoration: BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.circular(radius),
),
),
xxxxxxxxxx
Container(
padding: EdgeInsets.only(left: 12.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10.0),
color: Colors.green,
),
height: 50,
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
topRight: Radius.circular(10.0),
bottomRight: Radius.circular(10.0)),
color: Colors.white,
),
child: Text(
'This is a Container',
textScaleFactor: 2,
style: TextStyle(color: Colors.black),
),
),
),
xxxxxxxxxx
Container(
decoration: BoxDecoration(
color: gray,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(20),
bottomRight: Radius.circular(20),
)),
child: ,
),
xxxxxxxxxx
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20.0),
color: Colors.red,
),
child:
),
xxxxxxxxxx
decoration: InputDecoration(
contentPadding: const EdgeInsets.all(8.0),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5.0),
),
hintText: "0",
),