我想让我的容器更具深度。在应用程序抽屉的右侧,它具有良好的标高,可以清楚地显示z轴。如何用盒子阴影实现?
Container(
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.all(Radius.circular(8)),
boxShadow: [
BoxShadow(
spreadRadius: 1,
offset: Offset(4, 4),
blurRadius: 3,
color: Colors.black38,
),
]
),
width: 200,
height: 80,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Center(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text("child 1"),
Text("child 2"),
],
),
),
),
),