-
Notifications
You must be signed in to change notification settings - Fork 459
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
Catching error or having an "error" placeholder #1007
Comments
+1 .. kindly add an error builder. |
@animator @vd3d Instead of waiting for an errorBuilder property to be added, you can actually handle this yourself by bypassing svgPicture.network, handle the loading of the URL yourself via DIO or Http package and then return an SvgPicture yourself from the http get request. if there is an exception you can trap this and handle appropriately - i.e add a retry button to re-load the resource , in situations where there is no network. This approach with Riverpod for caching works a treat and means there is absolutely no need to use svgPicture.network. |
@alexda12 I am using SVG string which can be a faulty SVG XML string. Thus, the need of an error builder in case there is any issue in parsing or rendering. This has nothing to do with network. |
I see that |
I see now that this is basically a duplicate of #996. For my purposes I need that, and dnfield/vector_graphics#255 addressed. |
Hi,
First thanks for the library :-)
I'm currently using "SvgPicture.network" with a placeholder, but when there are internet connection issues, I got an exception in the debug log.
But, the placeholder continues to animate, I would like to put a default icon or just an empty one.
I have see multiples requests like mines:
dnfield/vector_graphics#196 (commits)
#881
... and more...
I have the feeling it has been implemented, or partially, but I can't figure out how I can handle such cases (which are commons)
Thanks for your help
PS: I haven't find any solution on this forum, sorry
The text was updated successfully, but these errors were encountered: