Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter 等待网络映像和循环进程指示器_Flutter - Fatal编程技术网

Flutter 等待网络映像和循环进程指示器

Flutter 等待网络映像和循环进程指示器,flutter,Flutter,如何在网络映像加载期间运行的de Circleavatar中放置一个circularprogressindicator CircleAvatar( radius: 60, backgroundColor: Colors.yellow, backgroundImage: NetworkImage(data['imageUrl']),

如何在网络映像加载期间运行的de Circleavatar中放置一个circularprogressindicator

CircleAvatar(
                            radius: 60,
                            backgroundColor: Colors.yellow,
                            backgroundImage: NetworkImage(data['imageUrl']), waiting this image....
                          ),
                        ),
                      ),

使用

试试这个

CircleAvatar(
    radius: 60,
    child: ClipRRect(
        borderRadius: BorderRadius.circular(60),
        child: CachedNetworkImage(
          imageUrl: data['imageUrl'],
          placeholder: new CircularProgressIndicator(),
          errorWidget: new Icon(Icons.error),
        ),
    ),
);