如何用Card这样的阴影?

Wis*_*usi -2 flutter

这就是我想要成为的结果

在此处输入图片说明

Md *_*sim 7

制作自定义卡

///custom cards

  Widget card(String image) {
    return  Container(
        child:  Image.asset(
              image,
              fit: BoxFit.cover,
            ),

        decoration: BoxDecoration(
          border: Border.all(color: Colors.blue, width: 2.0),
          color: Colors.white,
          borderRadius: BorderRadius.all(
            Radius.circular(5.0),
          ),
          boxShadow: <BoxShadow>[
            new BoxShadow(
              color: Colors.blue,
              blurRadius: 3.0,
              offset: new Offset(0.0, 3.0),
            ),
          ],
        ),
        margin: EdgeInsets.all(5.0),
        height: 150.0,
        width: 100.0,

    );
  }
Run Code Online (Sandbox Code Playgroud)

Box Shadow是您所需要的。我希望这将有所帮助。