Background color of viewer cannot be changed while loading image from network in Panorama Widget Flutter

96 Views Asked by At

While loading 360 images from network, I wanted to show circularProgressIndicator when image is not loaded. But Panorama keeps showing blank background:

Code :

Panorama(
    child: Image.network(
           panoramaURL,
           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,),);
           },
           ),
        ),
0

There are 0 best solutions below