We can customize the card using the properties. Some of the essential properties are given below:
| Attribute Name | Descriptions |
|---|---|
| borderOnForeground | It is used to paint the border in front of a child. By default, it is true. If it is false, it painted the border behind the child. |
| color | It is used to color the card’s background. |
| elevation | It controls the shadow size below the card. The bigger elevation value makes the bigger shadow distance. |
| margin | It is used to customize the card’s outer space. |
| shape | It is used to specify the shape of the card. |
| shadowColor | It is used to paint the shadow of a card. |
| clipBehavior | It is used to clip the content of the card. |
If we want to customize the card’s size, it is required to place it in a Container or SizedBox widget. Here, we can set the card’s height and width that can be shown in the below code:
Container(
width: 150,
height: 150,
child: Card(
...
),
)