Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG Image Error #564

Closed
reya276 opened this issue May 28, 2021 · 5 comments
Closed

SVG Image Error #564

reya276 opened this issue May 28, 2021 · 5 comments

Comments

@reya276
Copy link

reya276 commented May 28, 2021

I keep getting the error beow: I created the image using inkscape.

I/flutter ( 9076): unhandled element sodipodi:namedview; Picture key: AssetBundlePictureKey(bundle: PlatformAssetBundle#a4718(), name: "assets/login_app.svg", colorFilter: null)
I/flutter ( 9076): unhandled element metadata; Picture key: AssetBundlePictureKey(bundle: PlatformAssetBundle#a4718(), name: "assets/login_app.svg", colorFilter: null)

======== Exception caught by SVG ===================================================================
The following StateError was thrown resolving a single-frame picture stream:
Bad state: Expected to find Drawable with id none.
Have ids: (url(#svg348), url(#layer1), url(#g9656), url(#g2012))

When the exception was thrown, this was the stack: 
#0      DrawableDefinitionServer.getDrawable (package:flutter_svg/src/vector_drawable.dart:568:7)
#1      parseMask (package:flutter_svg/src/svg/xml_parsers.dart:363:24)
#2      parseStyle (package:flutter_svg/src/svg/xml_parsers.dart:436:11)
#3      SvgParserState.addShape (package:flutter_svg/src/svg/parser_state.dart:878:7)
#4      SvgParserState.startElement (package:flutter_svg/src/svg/parser_state.dart:902:12)
...
Picture provider: ExactAssetPicture(name: "assets/login_app.svg", bundle: null, colorFilter: null)
Picture key: AssetBundlePictureKey(bundle: PlatformAssetBundle#a4718(), name: "assets/login_app.svg", colorFilter: null)
====================================================================================================
@MattisBrizard
Copy link

Hi @reya276, I also have the error, did you find a way to handle this issue ?

@hakimLyon
Copy link

return to flutter_svg: ^0.22.0 or flutter_svg: ^0.23.0

@dnfield
Copy link
Owner

dnfield commented Feb 28, 2022

I don't know why I missed this issue back when it was posted, sorry. Can you please share the SVG? It looks like something wrong is happening with the def parsing here.

This doesn't quite look like #102 but it may be related.

@dnfield
Copy link
Owner

dnfield commented Feb 28, 2022

Going to close this, but if you're able to share the SVG and it's not a duplicate of #102 I will re-open.

@dnfield dnfield closed this as completed Feb 28, 2022
@martinGele
Copy link

martinGele commented Jan 8, 2023

There is a parsing error, just move the <defs> </defs> tag on top of the SVG file, just below the <svg> tag, and rest of the code bellow </defs>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants