Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter- Card elevation without shadow

I want to design a my card like this. But when I use elevation property generally it gives a card view with shadow. How to remove shadow from card and make a view like this image.

card

like image 409
M.A. Avatar asked Jul 27 '26 04:07

M.A.


2 Answers

You can use shadowColor : Colors.transparent for it.

Card(
    shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15.0)),
    elevation: 20,
    shadowColor: Colors.transparent,
    color: Colors.white,
    child : Container()
)
like image 127
Ananda Pramono Avatar answered Jul 28 '26 18:07

Ananda Pramono


There is an optional named param elevation. Set it zero.

elevation: 0,
like image 43
Subair K Avatar answered Jul 28 '26 17:07

Subair K