Better way to load images from network flutter - Stack Overflow

PHOTO EMBED

Fri May 27 2022 06:04:14 GMT+0000 (UTC)

Saved by @salim #dart #flutter

       Image.network(
                  widget.networkUrl,
                  fit: BoxFit.fill,
                  loadingBuilder: (BuildContext context, Widget child,
                      ImageChunkEvent? loadingProgress) {
                    if (loadingProgress == null) return child;
                    return Center(
                      child: CircularProgressIndicator(
                        value: loadingProgress.expectedTotalBytes != null
                            ? loadingProgress.cumulativeBytesLoaded /
                                loadingProgress.expectedTotalBytes!
                            : null,
                      ),
                    );
                  },
                ),
content_copyCOPY

this is work when fetching a big in size photo, and the result will show the progressing of fetching that photo

https://stackoverflow.com/questions/53577962/better-way-to-load-images-from-network-flutter