You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It won't work on flutter web as it depends on flutter sdk
(flutter web isn't available in the stable channel yet)
Even then.. I wouldn't recommend making a flutter web app for production as of now, its very heavy and lags a lot..
and then rendering SVG would contribute even more to lag.
You should prefer to convert this SVG to png or find a PNG alternative..
So after implementing my own web "plugin" for firebase messaging yesterday, I would say it should be feasible to implement a web plugin for flutter_svg, because the library for svg drawing is right in dart.
My web firebase messaging "plugin": provokateurin/ginko@9eef819
My idea is to provide the same interface as flutter_svg.
On Android/iOS it simply calls the real plugin, but on web it insert something like a container and the uses js to insert the svg into the DOM tree.
After some time I realized, that flutter web doesn't use a simple DOM tree. So inserting my own html/svg is not easy.
I'm able to replace a DOM node and display the svg, but the svg currently shows as big as possible.
EDIT: I got it! The svg displays in the right size. Now I'm going to abstract the svg rendering.
Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Could everyone who still has this problem please file a new issue with the exact descriptions what happens, logs and the output of ' flutter doctor -v' please.
All system setups can be slightly different so its always better to open new issues and reference related issues.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
mannprerak2 commentedon Aug 7, 2019
Use this package -> https://pub.dev/packages/flutter_svg
Parmendrakumar commentedon Aug 7, 2019
Its working on Flutter Mobile, But getting issue on Web? Is this work on flutter_web?
mannprerak2 commentedon Aug 7, 2019
It won't work on flutter web as it depends on flutter sdk
(flutter web isn't available in the stable channel yet)
Even then.. I wouldn't recommend making a flutter web app for production as of now, its very heavy and lags a lot..
and then rendering SVG would contribute even more to lag.
You should prefer to convert this SVG to png or find a PNG alternative..
provokateurin commentedon Aug 7, 2019
I'm using the unforked version of flutter and it's working for me.
Parmendrakumar commentedon Aug 7, 2019
Any Idea about how to use SVG in flutter_web
provokateurin commentedon Aug 7, 2019
You have the dart:svg library, but as long as your app is usable without the svg I think the cost of implementation for web is too high.
provokateurin commentedon Aug 10, 2019
OK sorry. I checked today again and either the plugin broke in the mean time or it never worked and I remembered wrong :(
provokateurin commentedon Aug 12, 2019
So after implementing my own web "plugin" for firebase messaging yesterday, I would say it should be feasible to implement a web plugin for flutter_svg, because the library for svg drawing is right in dart.
My web firebase messaging "plugin": provokateurin/ginko@9eef819
I'm going to do that now and update you :)
provokateurin commentedon Aug 12, 2019
My idea is to provide the same interface as flutter_svg.
On Android/iOS it simply calls the real plugin, but on web it insert something like a container and the uses js to insert the svg into the DOM tree.
After some time I realized, that flutter web doesn't use a simple DOM tree. So inserting my own html/svg is not easy.
provokateurin commentedon Aug 12, 2019
I'm able to replace a DOM node and display the svg, but the svg currently shows as big as possible.
EDIT: I got it! The svg displays in the right size. Now I'm going to abstract the svg rendering.
provokateurin commentedon Aug 12, 2019
Finally I got it!
provokateurin/ginko@deebb54
Ask me any question about it if you want :)
Parmendrakumar commentedon Aug 12, 2019
Thanks you let me try
Parmendrakumar commentedon Aug 14, 2019
@jld3103 Can I use .jpg or .png image in flutter web.
I want to display any static image in flutter web app. Where I can store this image and how to use it.
provokateurin commentedon Aug 14, 2019
@Parmendrakumar This has nothing to do with this issue, but you simply use it like a normal image in flutter.
https://flutter.dev/docs/development/ui/assets-and-images
BondarenkoStas commentedon Sep 19, 2019
@Parmendrakumar is the issue solved as proposed in #37749 (comment)?
iapicca commentedon Nov 11, 2019
Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Could everyone who still has this problem please file a new issue with the exact descriptions what happens, logs and the output of ' flutter doctor -v' please.
All system setups can be slightly different so its always better to open new issues and reference related issues.
github-actions commentedon Aug 25, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.