flutter container radius code example
Example 1: container flutter border radius
Container(
decoration: BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.all(
Radius.circular(10)
)
)
)
Example 2: flutter container radius
Container(
child: Text("It's text..."),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10), // radius of 10
color: Colors.green // green as background color
)
)
Example 3: flutter container border radius
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,
),
Example 4: flutter rounded container transperent corners
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"),
)
),
),
Example 5: round border container flutter
Container(
decoration: BoxDecoration(
border: Border.all(
color: Colors.red[500],
),
borderRadius: BorderRadius.all(Radius.circular(20))
),
child: ...
)
Example 6: flutter border radius
borderRadius: BorderRadius.all(Radius.circular(5.0))