输出:
它有一个 shape
属性,它接受一个 Border
,您可以更改它。
Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40), // if you need this
side: BorderSide(
color: Colors.grey.withOpacity(0.2),
width: 1,
),
),
child: Container(
color: Colors.white,
width: 200,
height: 200,
),
)
Card
的elevation
属性来实现。