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

There are black background on svg in 0.10.3(0.10.4 version) #126

Closed
wonderful89 opened this issue Feb 27, 2019 · 7 comments
Closed

There are black background on svg in 0.10.3(0.10.4 version) #126

wonderful89 opened this issue Feb 27, 2019 · 7 comments

Comments

@wonderful89
Copy link

image

There are black background on svg in 0.10.3 flutter_svg version . But it is OK in 0.8.3 flutter_svg version.

➜ examples git:(master) ✗ flutter --version
Flutter 1.0.0 • channel unknown • unknown source
Framework • revision 5391447fae (3 months ago) • 2018-11-29 19:41:26 -0800
Engine • revision 7375a0f414
Tools • Dart 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

reproduct project:

It should be flutter_svg issue. Did Someone have the problem ?

@dnfield
Copy link
Owner

dnfield commented Feb 27, 2019

Can you try on 0.10.4? I just tried it on that and it seems to work ok.

@wonderful89
Copy link
Author

wonderful89 commented Feb 27, 2019

Can you try on 0.10.4? I just tried it on that and it seems to work ok.

@dnfield , I try 0.10.4 version and it does not work , too.

Only the two svgs resources don't work and others are OK. But I try the two svgs resources in 0.8.3 and they are OK.

image

We can solve it by replacing svg resouces, but it is good that flutter_svg plugin can support the feature.

Thanks.

@dnfield
Copy link
Owner

dnfield commented Feb 27, 2019

Hmm. It appears to be because of the <mask> elements, which aren't supported. I'm not entirely sure why that's happening but it is a bug.

For now if you can remove the mask element, you should be good. I'll try to look at why this regressed this way.

@dnfield
Copy link
Owner

dnfield commented Feb 27, 2019

Ahhh - it's because of that <use> element in the mask.

So while parsing, if an unsupported element is encountered we try to be tolerant and parse children it has. We end up finding a use element and try to apply it to the parent group since we didn't know what to do with the mask.

@dnfield
Copy link
Owner

dnfield commented Feb 27, 2019

(and in v0.8.3, we didn't support use elements)

@dnfield
Copy link
Owner

dnfield commented Feb 27, 2019

This is fixed on master, and will be published as v0.11.0 once CI passes...

@wonderful89
Copy link
Author

Thanks for your response. I will try it again when v0.11.0 is released.

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

2 participants