I'm using Image.network to load image from network. When I simply pass the url the image works fine. It will be displayed after few seconds. But when I use loadingBuilder and errorBuilder the images are loaded but not displayed. The circular progress I created inside the loadingBuilder completes and disappears but image is not shown.
Here code
Image.network(
widget._imgLink,
loadingBuilder: (context, child, loadingProgress) {
return Center(
child: CircularProgressIndicator(
value: (loadingProgress != null)
? (loadingProgress.cumulativeBytesLoaded /
loadingProgress.expectedTotalBytes)
: 0,
),
);
},
errorBuilder: (context, error, stackTrace) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text("Error loading"),
FlatButton(onPressed: () {}, child: Text("Retry")),
],
);
},
),
How can I tell the widget to display the image after its loaded? Thank you.
childparameter at all in yourloadingBuilder: (context, child, loadingProgress) {