add custom boxshadow to Flutter card

前端 未结 3 2079
误落风尘
误落风尘 2020-12-29 06:07

I\'ve implemented cards in a Flutter app. I need a custom BoxShadow for every card. How can this be done?

What I\'ve tried so far is to add the Bo

3条回答
  •  一生所求
    2020-12-29 06:31

    See the Card widget

          @override
          Widget build(BuildContext context) {
            return Scaffold(
                backgroundColor: Color(0xFFdde0e3),
                body: SingleChildScrollView(
                  child: Container(
                    child: Column(
                      crossAxisAlignment: CrossAxisAlignment.stretch,
                      children: [
                        Card(
                          elevation:5,
                          margin: EdgeInsets.fromLTRB(0.0, 0.0, 0.0, 16.0),
                          shape: RoundedRectangleBorder(
                            borderRadius: BorderRadius.circular(0.0),
                          ),
                          child: Container(
                            height: 200,
                          ),
                        )
                      ],
                    ),
                  ),
                ));
          }
    

提交回复
热议问题