flutter使用svg库时提示The <style> element is not implemented in this library的解决方法

flutter使用svg库时提示The element is not implemented in this library的解决方法

  • flutter使用svg需要第三方库支持,配置pubspec.yaml如下

    flutter_svg: ^0.19.1
    
  • 使用代码

    SvgPicture.asset(‘assetPath’);
    
  • 可能会遇到 element is not implemented提示错误或者显示为black svg黑的

    解决方法是使用一个叫做svgcleaner清除一下多余的信息
    
  • svgcleaner下载地址

    https://github.com/RazrFalcon/svgcleaner-gui/releases
    
    下载后直接运行,import导入svg图片,然后点击run处理即可
    
posted @ 2020-11-09 16:00  yongfengnice  阅读(1773)  评论(0编辑  收藏  举报