0

我从服务器获得了 avif 图像,但图像未显示。

我试过Image.network()CachedNetworkImage来显示 avif image 。

Exception: Invalid image data

When the exception was thrown, this was the stack: 
#0      _futurize (dart:ui/painting.dart:5326:5)
#1      ImageDescriptor.encoded (dart:ui/painting.dart:5194:12)
#2      instantiateImageCodec (dart:ui/painting.dart:2048:60)
<asynchronous suspension>
Image provider: NetworkImage("https://www.soppiya.com/media/images/610fc7bb172b28ecf8655216/item/6122493b75ca8186640a03ae/image1.avif?x=62433", scale: 1.0)
Image key: NetworkImage("https://www.soppiya.com/media/images/610fc7bb172b28ecf8655216/item/6122493b75ca8186640a03ae/image1.avif?x=62433", scale: 1.0)
4

1 回答 1

0

您可以转换图像,但不支持这种格式。

支持以下图像格式:JPEG、PNG、GIF、动画 GIF、WebP、动画 WebP、BMP 和 WBMP。

有关更多信息,请阅读图像类

于 2021-09-09T05:05:19.553 回答