我有一个带有
GridView.builder
和 crossAxisCount: 3,
的简单屏幕,在 itemBuilder
中,我返回 Container
,左、右、下都有小阴影。但未能达到我想要的目标。
这是我的代码
GridView.builder(
padding: EdgeInsets.symmetric(horizontal: 15),
scrollDirection: Axis.vertical,
physics: BouncingScrollPhysics(),
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 3,
crossAxisSpacing: 15,
mainAxisSpacing: 20,
childAspectRatio: 2 / 3.3,
),
primary: false,
shrinkWrap: true,
itemCount: 100,
itemBuilder: (context, index) {
return Container(
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
boxShadow: [
BoxShadow(
color: Colors.black12,
blurRadius: 5,
spreadRadius: 5,
offset: Offset(1, 1)),
]),
);
},
),
你能详细解释一下什么愿望吗?我不太明白