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:
imageUrl is url
3
Answers
After restart it started working as expected !
It took me about 25s to load the image for the first time. And for flutter, it may take more than 25s, you can try with a lighter image to try
I doubt that you are specifying correct url. Try to debug with
print(homeSpecialModel.image.url);
. Check that it is exact url that you provided. Or you can directly put String value of url likeimageUrl: "https://res.cloudinary.com/dpurb6xes/image/upload/v1668425797/vivans/ijynvhpdy7hms8z2vuhh.png",
If the url is correct, but still you are getting this error then provide with screenshots please.