Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.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_Dart - Fatal编程技术网

Flutter 如何解决颤振中出现的异常问题?

Flutter 如何解决颤振中出现的异常问题?,flutter,dart,Flutter,Dart,当我运行此代码时: body: Center( child: Image( image: NetworkImage( 'https://images.pexels.com/photos/4431905/pexels-photo-4431905.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500'), ), // child: Text

当我运行此代码时:

     body: Center(
        child: Image(
          image: NetworkImage(
              'https://images.pexels.com/photos/4431905/pexels-photo-4431905.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500'),
        ),
        // child: Text(
应用程序未调试其应用程序

发生异常。 _AssertionError('package:flatter/src/painting/image_stream.dart':失败的断言:第238行位置12:“\u completer==null”:不正确。)

void setCompleter(ImageStreamCompleter值){
断言(_completer==null);
_完成者=值;
如果(_侦听器!=null){
最终列表initialListeners=\u监听器;
_侦听器=null;
forEach(_completer.addListener);
}
}

你能试试其他链接吗?可能是完成者最终没有得到图像。

您能给我们展示更多的代码吗,因为我刚刚运行了您的代码,而且它似乎可以工作。当我尝试另一个链接时,它可以工作。谢谢您的收听
  void setCompleter(ImageStreamCompleter value) {
    assert(_completer == null);
    _completer = value;
    if (_listeners != null) {
      final List<ImageStreamListener> initialListeners = _listeners;
      _listeners = null;
      initialListeners.forEach(_completer.addListener);
    }
  }