我正在为我的圆圈化身从URL加载图像,它显示了以下错误:
[VERBOSE-2:codec.cc(97)] Failed decoding image. Data is either invalid, or it is encoded using an unsupported format.
flutter: ══╡ EXCEPTION CAUGHT BY IMAGE RESOURCE SERVICE ╞════════════════════════════════════════════════════
flutter: The following _Exception was thrown resolving an image codec:
flutter: Exception: operation failed以下是我的代码:
CircleAvatar(
backgroundColor: blueColor,
radius: 45,
child: new Text( strFName.substring(0, 1) + strLName.substring(0, 1) style: styleCircleName,),
backgroundImage: NetworkImage(strImageURL),
)发布于 2022-01-06 15:28:24
错误Failed decoding image. Data is either invalid, or it is encoded using an unsupported format.通常是由于试图显示无效图像而引起的。如果图像格式不正确,即试图显示“不完整”的base64图像,图像文件/资产的路径不正确,则图像可能无效。
颤振支持的图像格式列出了这里。其中一些是JPEG,PNG,GIF,动画GIF,WebP,动画WebP,BMP和WBMP。
https://stackoverflow.com/questions/53910348
复制相似问题