高版本使用的 material3
,他的颜色设置也跟着改变了使用surfaceTintColor
return Card(
// color: Colors.white,
surfaceTintColor: Colors.white,
elevation: 20,
child: Container(
padding: const EdgeInsets.all(32.0),
child: Text(
'Hello, World!',
),
),
);