I want change the CircularProgressIndicator size and I used a SizedBox wrapped it.
But if I not used SizedBox in CachedNetworkImage's placeholder,it worked.
CachedNetworkImage(
fit: BoxFit.fill,
imageUrl: 'imageUrl',
placeholder: (context, url) =>
SizedBox(
width: 10.0,
height: 10.0,
child: CircularProgressIndicator(
valueColor: AlwaysStoppedAnimation(Colors.green),
),
)
)

Wrap SizedBox with Center widget
CachedNetworkImage(
imageUrl: 'ImageUrl',
fit: BoxFit.cover,
placeholder: (context, url) => Center(
child: SizedBox(
width: 40.0,
height: 40.0,
child: new CircularProgressIndicator(),
),
),
errorWidget: (context, url, error) => new Icon(Icons.error),
)
Wrap SizedBox with Center widget
CachedNetworkImage( imageUrl: 'ImageUrl', fit: BoxFit.cover, placeholder: (context, url) => Center( child: SizedBox( width: 40.0, height: 40.0, child: new CircularProgressIndicator(), ), ), errorWidget: (context, url, error) => new Icon(Icons.error), )
Thanks.
Most helpful comment
Wrap SizedBox with Center widget