I want to add a placeholder of a progress bar while image is loading but for some reason it does not work.
My code
CachedNetworkImage(
imageUrl: 'url',
fit: BoxFit.cover,
height: 100,
width: 100,
placeholder: CircularProgressIndicator(),
),
>Solution :
You can use progressIndicatorBuilder when image is loading like this
progressIndicatorBuilder:
(context, url, downloadProgress) => Container(
decoration: const BoxDecoration(
shape: BoxShape.circle,
color: Colors.white,
),
),
or try this for placeholder
placeholder: (context, url) => new CircularProgressIndicator(),