嗨,我是新来的颤振,并试图从运球的 Shakuro 创造这个设计。我在尝试为剪裁器创建高程时遇到了麻烦,因为整个矩形正在获取阴影而不是仅剪裁器。
有没有办法在理发器下面放置高程或类似阴影的效果?
你可以像这样用形状包裹你的child
内部:Container
Circle
BoxDecoration
new Container(
height: 300.0,
width: 300.0,
child: Center(child: Text("Your child here")),
decoration: BoxDecoration(
shape: BoxShape.circle,
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.grey,
blurRadius: 5.0,
offset: Offset(5.0, 5.0),
spreadRadius: 5.0)
],
),
)
结果: