有时当我启动应用程序时,会出现以下问题:
'package:cached_network_image/src/cached_image_widget.dart': 失败的断言:第157行第16个位置:'imageUrl != null' 不是真的。
在cached_image_widget.dart文件的第157行:
: assert(imageUrl != null),
在文件中调用缓存图像小部件时:
child: CachedNetworkImage(
imageUrl: itemArticle.urlToImage,
imageBuilder: (context, imageProvider) {
return Container(
width: 72.0,
height: 72.0,
decoration: BoxDecoration(
image: DecorationImage(
image: imageProvider,
fit: BoxFit.cover,
),
),
);
},
我的应用展示了一个卡片视图(列表)。
您认为它怎么样?我们可以以某种方式解决它吗?
谢谢。