Flutter How to create Card with background Image?

后端 未结 4 1693
青春惊慌失措
青春惊慌失措 2020-12-14 01:51

I\'m trying to create a Card with an Image as a background. The problem is, the Image overflows the Card, so the Corners of the don\'t show up.

I need to either set

4条回答
  •  别那么骄傲
    2020-12-14 02:45

    You can wrap your image in ClipRRect

    ClipRRect(
      borderRadius: BorderRadius.vertical(top: Radius.circular(10.0)),
      child: Image.network(...),
    )
    

提交回复
热议问题