container borderradius flutter code example

Example 1: flutter container border

Container(
  decoration: BoxDecoration(
    border: Border.all(
      color: Colors.red,  // red as border color
    ),
  ),
  child: Text("Your text...")
)

Example 2: container flutter border radius

Container(
	decoration: BoxDecoration(
    	color: Colors.blue,
    	borderRadius: BorderRadius.all(
    		Radius.circular(10)
    	)
    )
)

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 border radius container

Container(
   decoration: BoxDecoration(
   borderRadius: BorderRadius.circular(20.0),
   color: Colors.red,
   ),
   child: 
),

Tags:

Misc Example