Q:

How to give Rounded rectangular shape for FadeInImage.assetNetwork image in flutter?

Hi I am using FadeInImage.assetNetwork to display my image. But no matter what I try I am not getting the rounded rectangular border.I tried Clipperrect but the image doesnt get clipped but the card gets cliped.I even tried wrapping the FadeInImage.assetNetwork in CLipperect and tried to wrap in container and give decoration  like this.But nothing seems to give desired results.
In short the image is not clipped but the card is getting clipped.How do we solve this?
decoration: ShapeDecoration(
    shape: RoundedRectangleBorder(
      borderRadius: BorderRadius.all(
        Radius.circular(10),
      ),
Container(
              height: MediaQuery.of(context).size.height * 0.27,
              color: Colors.black,
              child: ListView.builder(
                shrinkWrap: true,
                scrollDirection: Axis.horizontal,
                itemCount: __moviesMovieId.length,
                itemBuilder: (BuildContext context, int index) => Card(

                  margin: const EdgeInsets.fromLTRB(0, 0, 15, 0),
                  child: FadeInImage.assetNetwork(
                    width: MediaQuery.of(context).size.width * 0.3,
                    image:
                        'https://img.youtube.com/vi/${__moviesMovieId[index].substring(8)}/0.jpg',
                    placeholder: cupertinoActivityIndicator,
                    fit: BoxFit.fill,
                  ),
                ),
              ),
            ),

A:

PhysicalModel(
    clipBehavior: Clip.antiAliasWithSaveLayer,
    color: Colors.black,
    shape: BoxShape.rectangle,
    borderRadius: BorderRadius.circular(30),
    child: FadeInImage.assetNetwork(
      width: MediaQuery.of(context).size.width * 0.3,
      image:
          'https://img.youtube.com/vi/${__moviesMovieId[index].substring(8)}/0.jpg',
      placeholder: "hey",
      fit: BoxFit.fill,
    ),
  ),

Replace yout Card from ListView Builder to this , works absolutely fine . the above other answer wasnt working in my device so i answered . Do mark it as answer if it helps

