Manipulating shapes: Rounding corners

Var container = Container( // grey box
  child: Center(
    child: Container( // red circle
      child: Text(
        "Lorem ipsum",
        style: bold24Roboto,
      ),
      decoration: BoxDecoration(
        color: Colors.red[400],
        borderRadius: BorderRadius.all(
          const Radius.circular(8),
        ), 
      ),
      padding: EdgeInsets.all(16),
    ),
  ),
  width: 320,
  height: 240,
  color: Colors.grey[300],
);

To round the corners of a rectangular shape, use the borderRadius property of a BoxDecoration object.

Manipulating shapes: Rounding corners — Structure map

Clickable & Draggable!

Manipulating shapes: Rounding corners — Related pages: