请帮我解决问题,当我尝试打开带有此类链接的图像时,它https://а-вкусно.рф/images/004/794/755/4794755/990xnoinc/%D0%90%D0%BF%D0%BF%D0%B5%D1%82%D0%B8%D1%82%D0%BD%D0%B0%D1%8F.jpg
会出错
FormatException: %D0%B0-%D0%B2%D0%BA%D1%83%D1%81%D0%BD%D0%BE.%D1%80%D1%84 is not a valid link-local address but contains %. Scope id should be used as part of link-local address. (at character 1)
CachedNetworkImage(
imageUrl: "https://а-вкусно.рф/images/004/794/755/4794755/990xnoinc/%D0%90%D0%BF%D0%BF%D0%B5%D1%82%D0%B8%D1%82%D0%BD%D0%B0%D1%8F.jpg",
imageBuilder: (context, imageProvider) => Container(
decoration: BoxDecoration(
image: DecorationImage(
image: imageProvider,
fit: BoxFit.cover,
colorFilter:
ColorFilter.mode(Colors.red, BlendMode.colorBurn)),
),
),
placeholder: (context, url) => CircularProgressIndicator(),
errorWidget: (context, url, error) => Icon(Icons.error),
)
不幸的是,Flutter 不支持 Cyrillic 链接,目前尚不清楚何时支持。或者,您可以使用:
作为域的解决方法,可以使用 replaceAll。我有同样的错误。我为域做了这个并且它有效