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

Question/Improvement: Invalid double "100%" #209

Open
AlexDochioiu opened this issue Jul 1, 2023 · 1 comment
Open

Question/Improvement: Invalid double "100%" #209

AlexDochioiu opened this issue Jul 1, 2023 · 1 comment

Comments

@AlexDochioiu
Copy link

AlexDochioiu commented Jul 1, 2023

Hey,

I saw this issue reported in Crashlytics. Seems that one SVG contains a percentage instead of a double value somewhere. Not sure whether this is something that could be supported as a feature, or if it's a bad SVG in the first place.

Unfortunately my app deals with a lot of unmanaged online content and I do not have means to obtain the actual SVG that caused this issue.

Sorry for being a bit vague ; I don't really have more info I can provide though.

image
@fransdhinta
Copy link

I had the same issue, when using the flutter_svg package that depends on this package, and saw a similar error. After checking, this was because when calling the parseDouble function, it returned double.parse instead of double.tryParse, in my case it tried to parse "none".
I suggest a fix or check this PR: #257 to change the return of parseDouble to always double.tryParse so that it will return null instead of throwing an error if it parses an invalid String

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