PhysicalModel ,主要的功能就是设置widget四边圆角,可以设置阴影颜色,和z轴高度
PhysicalModel({
this.clipBehavior = Clip.none,
this.borderRadius,
this.elevation = 0.0,
this.shadowColor = const Color(0xFF000000),
})
class physicalModel extends StatelessWidget {
@override
Widget build(BuildContext context) {
return PhysicalModel(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(6)),
clipBehavior: Clip.antiAlias,
elevation: 6.0,
shadowColor: Colors.grey,
child: Center(
child: Text("PhysicalModel"),
),
);
}
}
效果:
![请添加图片描述](https://i-blog.csdnimg.cn/blog_migrate/9725f1b02a44048de03387eabfc14963.png)