如何从一侧去除高程阴影而又不从Card或Material小部件的抖动中去除高程本身?

问题描述

如何删除“卡片”或“材料”小部件中的顶部立面阴影。

我使用了“材质”小部件来进行容器化,并给定了高程值。它全方位地反映了我的容器。但是我只想要左侧,底部和右侧立面阴影。我如何获得它或删除顶部立面阴影。 材质或卡片小部件中的示例将很有用。

Material(
  elevation: 3,child: Container(
    height: 100,width: 300,),)

Example picture

解决方法

Container(
  height: 100.0,width: 300.0,decoration: BoxDecoration(
      borderRadius: BorderRadius.circular(20.0),color: Colors.white,boxShadow: [
        BoxShadow(
          spreadRadius: 2,blurRadius: 3,offset: Offset(0,6),color: Colors.black38
        )
      ]
    ),),

enter image description here

这是您要实现的目标吗?