Search code examples
fluttercachingnetworkimageview

CachedNetworkImage is not displaying image though image is not null


I am facing this weird error, though imageUrl is not null, placeholder is getting triggered instead of image build.

 Container(
          height: specialOfferTileHeight,
          decoration: BoxDecoration(
            borderRadius: BorderRadius.circular(20),
          ),
          child: CachedNetworkImage(
              fit: BoxFit.cover,
              imageUrl: homeSpecialModel.image.url,
              placeholder: (context, url) => Text(url),
              errorWidget: (context, url, error) => Text(error)),
        )

Output:

enter image description here

imageUrl is url


Solution

  • After restart it started working as expected !