BoxDecoration

BoxDecoration is a class in Flutter that provides styling options for a container. It allows developers to add a background color, border, box shadow, gradient, and more to a container.

Example:

To add a red background color and a blue border to a container, the BoxDecoration code would be:

Container(
  decoration: BoxDecoration(
    color: Colors.red,
    border: Border.all(
      color: Colors.blue,
      width: 2.0,
    ),
  ),
  child: Text('BoxDecoration'),
)

Parameters