Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.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 SVG捕捉到颤振异常中的SVG_Flutter_Svg - Fatal编程技术网

Flutter SVG捕捉到颤振异常中的SVG

Flutter SVG捕捉到颤振异常中的SVG,flutter,svg,Flutter,Svg,我正在使用最新的库更新 dependencies: flutter_svg: ^0.17.4 我的代码运行正常,但我进行了热重启。。我得到了以下例外 The <style> element is not implemented in this library. Style elements are not supported by this library and the requested SVG may not render as intended. If possib

我正在使用最新的库更新

dependencies:
  flutter_svg: ^0.17.4
我的代码运行正常,但我进行了热重启。。我得到了以下例外

The <style> element is not implemented in this library.

Style elements are not supported by this library and the requested SVG may not render as intended.

If possible, ensure the SVG uses inline styles and/or attributes (which are supported), or use a preprocessing utility such as svgcleaner to inline the styles for you.


Picture key: AssetBundlePictureKey(bundle: PlatformAssetBundle#60537(), name: "assets/logo-violeta-NVIAME-login.svg", colorFilter: ColorFilter.mode(Color(0xff6327f8), BlendMode.srcIn))
════════════════════════════════════════════════════════════════════════════════
I/flutter (26058): unhandled element metadata; Picture key: AssetBundlePictureKey(bundle: PlatformAssetBundle#60537(), name: "assets/logo-violeta-NVIAME-login.svg", colorFilter: ColorFilter.mode(Color(0xff6327f8), BlendMode.srcIn))
此库中未实现该元素。
此库不支持样式元素,请求的SVG可能无法按预期呈现。
如果可能,请确保SVG使用内联样式和/或属性(受支持),或者使用预处理实用程序(如svgcleaner)为您内联样式。
图片键:AssetBundlePictureKey(捆绑包:PlatformAssetBundle#60537(),名称:“资产/徽标violeta NVIAME login.svg”,颜色过滤器:colorFilter.mode(颜色(0xff6327f8),BlendMode.srcIn))
════════════════════════════════════════════════════════════════════════════════
I/flatter(26058):未处理的元素元数据;图片键:AssetBundlePictureKey(捆绑包:PlatformAssetBundle#60537(),名称:“资产/徽标violeta NVIAME login.svg”,颜色过滤器:colorFilter.mode(颜色(0xff6327f8),BlendMode.srcIn))

实际上,您使用的是SVG图像

如错误中所述:

The <style> element is not implemented in this library.

Style elements are not supported by this library and the requested SVG may not render as intended.

If possible, ensure the SVG uses inline styles and/or attributes (which are supported), or use a preprocessing utility such as svgcleaner to inline the styles for you.
这是一个表示它还不受支持的示例

您可以实际尝试的一些选项:

  • 删除
    内部css
    并写入
    内联css
  • 使用不同的svg图片
  • 使用预处理实用程序(如)为您内联样式。这正是你在评论中提到的。另见
  • 使用这个工具

但最简单的方法是让您的设计工具尽可能不使用CSS。

删除属性颜色,我也有同样的错误,您能告诉我如何使用映射属性吗?--这个问题的解决方案是使用SVGCleaner并替换我的案例中的文件,就像那样,我仍然使用以前的代码。SVGCleaner&svgomg不适用于我
The <style> element is not implemented in this library.

Style elements are not supported by this library and the requested SVG may not render as intended.

If possible, ensure the SVG uses inline styles and/or attributes (which are supported), or use a preprocessing utility such as svgcleaner to inline the styles for you.
 <style>
       .....
  </style>