flutter container border radius code example
Example 1: flutter container rounded corners
Container(
decoration: BoxDecoration(
border: Border.all(
color: Colors.red[500],
),
borderRadius: BorderRadius.all(Radius.circular(20))
),
child: ...
)
Example 2: flutter container border
Container(
decoration: BoxDecoration(
border: Border.all(
color: Colors.red,
),
),
child: Text("Your text...")
)
Example 3: container flutter border radius
Container(
decoration: BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.all(
Radius.circular(10)
)
)
)
Example 4: flutter container radius
Container(
child: Text("It's text..."),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.green
)
)
Example 5: 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 6: border for container in flutter
new Container(
margin: const EdgeInsets.all(15.0),
padding: const EdgeInsets.all(3.0),
decoration: BoxDecoration(
border: Border.all(color: Colors.blueAccent)
),
child: Text("My Awesome Border"),
)