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
{{ message }}
Repository navigation
Add errorBuilder to SvgPicture and adjust underlying vector_graphics errorBuilder (to trigger on BytesLoader errors) #996
My use case: I am trying to fallback to a svg in assets if my SvgPicture.network() fails for any reason (wrong url, request returns 404, invalid svg format, ...)
widgets like the Flutter Image fully support this errorBuilder and any error in the process (image loading/parsing/rendering) triggers the errorBuilder callback
From my observations:
SvgPicture widget does not accept errorBuilder
The vector_graphics package does not trigger errorBuilder for BytesLoader objects loadBytes() calls, it only triggers it for errors in decodeVectorGraphics()
image from vector_graphics.dart
Reacted by azack, Đào Hoàng Sơn, guopeng, ganeshh123, Benjamin, hilbert, Nurettin Resul Tanyıldızı, Jessica Tarra, h1amza, Oleksandr Zhuhan and 14 more
Reacted by h1amza, Oleksandr Zhuhan, Thomas Perraut, Philip Fryklund, Javier, Reza, BRAINYOO, Julian Milke, Julien Von Der Marck, Christopher Hull and 14 more
Activity
guopeng1994 commentedon Nov 24, 2023
WE NEED THIS!!
mnayef95 commentedon Sep 12, 2024
I've created a PR on
vector_graphics. Once @dnfield approves it, we can updateflutter_svgto handle it.dnfield/vector_graphics#255
tperraut commentedon Jan 17, 2025
up