1

从网络加载 360 度图像时,我想在未加载图像时显示 circularProgressIndicator。但全景图一直显示空白背景:

代码 :

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,),);
           },
           ),
        ),
4

0 回答 0