Flutter How to create Card with background Image?

Other Way Without using – ClipRRect Widget – is To set semanticContainer: true, of Card Widget.

Example Code as Below:

Card(
          semanticContainer: true,
          clipBehavior: Clip.antiAliasWithSaveLayer,
          child: Image.network(
            'https://placeimg.com/640/480/any',
            fit: BoxFit.fill,
          ),
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(10.0),
          ),
          elevation: 5,
          margin: EdgeInsets.all(10),
        ),

Output:

enter image description here

Leave a Comment