NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev, #152 most downloaded on pub.dev
An SVG rendering and widget library for Flutter, which allows painting and displaying Scalable Vector Graphics 1.1 files.
Latest stable
2.5.0
Last release 2 days ago
19 Nov 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 59 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
9 years old
130 releases · first in 2018
Drag across the ruler to compare, or tap a release to open it.
[flutter_svg] Add SvgLoader.provideSvgInIsolate for unsendable loader…
[flutter_svg] Add SvgLoader.provideSvgInIsolate for unsendable loader…
SvgLoader.provideSvgInIsolate, which controls whether provideSvg runs
in the compute isolate.Future, by calling provideSvg for SvgAssetLoader
and SvgNetworkLoader on the calling isolate.Equivalent newly allocated HTTP header maps currently miss the compiled SVG cache. Compare headers by value, and snapshot headers in cache keys so cal
Equivalent newly allocated HTTP header maps currently miss the compiled SVG cache. Compare headers by value, and snapshot headers in cache keys so caller mutation cannot corrupt retained entries. HTTP clients stay out of equality and hashing, as before. The const loader constructor is preserved.
Addresses the header equality bug reported in flutter/flutter#158818 (the report is closed, but this behavior remains in current main). Tests cover header order, distinct authorization values, mutation and eviction, concurrent de-duplication, and theme isolation.
Validation on Windows: flutter analyze passed; complete flutter test passed (82 passed, one existing skip); formatting and git diff --check passed. Existing golden tolerances reported small platform differences; no golden files were updated.
Merged with main (ca0a2d3) and bumped flutter_svg to 2.4.1, above the 2.4.0 entry from #13596. Analyze and the complete test suite pass after the merge (89 passed, one existing skip).
Overlap with open PRs: #12808, #13599, #13600, and #13628 conflict only in release metadata. #13598 also conflicts in loaders.dart. The current heads of #13596 and #13613 conflict in cache.dart against the main changes included here.
AI-assisted; independently checked with focused and complete tests. CLA status is left for the contributor/CLA bot to verify.
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Merged main ( 14f9933 ) in d01b5b2 , preserving branch history. Main now contains the pending-load changes from #13595 . The Files changed tab shows t
Merged main (14f9933) in d01b5b2, preserving branch history. Main now contains the pending-load changes from #13595. The Files changed tab shows the byte-budget implementation, tests, and release metadata.
Adds a byte budget to the compiled SVG cache: Cache.maximumByteSize defaults to 32 MiB, Cache.currentByteSize reports retained compiled-data bytes, and completed entries obey both the existing count limit and the byte limit using LRU eviction. Oversized results are returned to callers without displacing cached entries. Reducing a limit evicts immediately; zero disables retention. Adds API documentation, regression tests, version 2.4.0 and changelog.
Related memory report: flutter/flutter#184564. This proposal bounds retained compiled cache data; it does not claim to solve the report's peak memory during compilation or memory retained by live widgets.
Validation on Windows: flutter analyze (no issues); complete flutter test suite (84 passed, 1 pre-existing skip); formatting and git diff --check. Tests cover byte/count LRU, changing limits, oversized results, out-of-order completions, and disabling/re-enabling during pending loads. Small platform golden differences are accepted by the existing comparator; no goldens were updated.
This draft was prepared with AI assistance and remains pending the contributor's human review and confirmation of the unchecked checklist items.
[flutter_svg] Invalidate pending cache entries on clear and evict ( #1 …
[flutter_svg] Invalidate pending cache entries on clear and evict (#1…
In Cache.putIfAbsent , pendingResult.then((ByteData data) { ... }) did not attach an onError handler. When an asynchronous SVG load rejected (for exam
In Cache.putIfAbsent, pendingResult.then((ByteData data) { ... }) did not attach an onError handler. When an asynchronous SVG load rejected (for example, SvgNetworkLoader failing while offline or throwing http.ClientException on non-2xx responses), _pending.remove(key) never ran—leaving the rejected Future permanently cached in _pending[key] across retries—and the unguarded child Future from .then reported an uncaught error to the active Zone even when callers awaited putIfAbsent inside try/catch.
Attaches onError to pendingResult.then so failed loads evict _pending[key] without leaking uncaught Zone errors while preserving the caller's rejected Future.
Fixes b/583860731
Cache.putIfAbsent leaving rejected futures in _pending and leaking
uncaught Zone errors when an asynchronous SVG load fails.SvgNetworkLoader.prepareMessage returned response.bodyBytes without checking the status code, so a 404 or 503 HTML error page was handed to the SVG pa
SvgNetworkLoader.prepareMessage returned response.bodyBytes without checking the status code, so a 404 or 503 HTML error page was handed to the SVG parser and failed with a misleading StateError: Bad state: Invalid SVG data. This PR makes it throw an http.ClientException naming the status code and URL for any status outside 200–299, so the real failure is visible.
It also moves closing an internally created client into a finally, so that client is closed on the error path too (and if get itself throws). Tests cover a 404 (throws, client still closed) and a 200 (returns the body).
Fixes flutter/flutter#195162
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.
SvgNetworkLoader parsing the body of a non-2xx HTTP response as SVG.
It now throws an http.ClientException naming the status code and URL.Adds an imageBuilder property to SvgPicture for wrapping the loaded SVG widget.
imageBuilder property to SvgPicture for wrapping the loaded SVG
widget.Updates README with example to scale SVG without losing quality
Replaces use of deprecated Color.value.
Fixes typo of allowDrawingOutsideViewBox in doc comments.
allowDrawingOutsideViewBox in doc comments.Fixes message buffer access in SvgAssetLoader.
Exposes renderingStrategy in SvgPicture constructors.
renderingStrategy in SvgPicture constructors.Exposes colorMapper in SvgPicture constructors.
colorMapper in SvgPicture constructors.Implement errorBuilder callback
Adopts code excerpts for README.
Fixes SvgNetworkLoader not closing internally created http clients.
SvgNetworkLoader not closing internally created http clients.Makes the package WASM compatible.
Relaxes the dependency constraints on vector_graphics, vector_graphics_codec, and vector_graphics_compiler.
Adds missing_code_block_language_in_doc_comment lint.
missing_code_block_language_in_doc_comment lint.Transfers the package source from https://github.com/dnfield/flutter_svg to https://github.com/flutter/packages.
Use package:http for network requests, and allow injection of the client.
* Relax http dependency.
Adds back SvgPicture(theme:) parameter with a deprecation. Although this parameter was inherently broken, removing it would require a major semver bum…
SvgPicture(theme:) parameter with a deprecation. Although this
parameter was inherently broken, removing it would require a major semver
bump, which would cause consumers to miss out on important fixes.Bump vector_graphics to 1.1.9+1
DefaultSvgTheme.* Fix broken matchTextDirection.
matchTextDirection.Fix test-only issues with latest Flutter stable (3.10).
Allow malformed UTF-8 in loaders.
Newer version of vector_graphics.
Require newer version of vector_graphics.
Require newer version of vector_graphics with multiple fixes around inheritence, patterns, and currentColor handling.
Disable Isolate parsing in debug mode.
package:vector_graphics_compiler.Use parsing backend from vector_graphics_compiler.
vector_graphics_compiler.
dx and dy on text. See
https://github.com/dnfield/vector_graphics/issues/44 if this is important to
you.vector_graphics.compute in tests. For SVGs that
contain images, vg.waitForPendingDecodes is available.DEPRECATIONS
VectorDrawable classes have gone away.AvdPicture and related classes/parser have gone away.PictureCache and PictureStream classes have gone away.PicturePovider class exists only for access to a no-op cache.SvgPicture and the svg utility class have gone
away.color and colorBlendMode properties have been removed. Instead, use
the colorFilter property.Fix bug in asset loading from packages.
Nothing published for this version
Fix transforms on image tags, clipPaths.
More permissive about color strings.
Handle default image width/height properly.
* Handle pt values.
pt values.Update path parsing/drawing dependencies to fix arc parsing bug.
Avoid deprecated API from Flutter.
Fix regression introduced in 1.1.1
Respect stroke* properties when a paint definition is used for a stroke.
@stroke property.Use longestLine rather than minIntrinsicWidth to place text.
longestLine rather than minIntrinsicWidth to place text.Avoid cache invalidation when currentColor or font based units are not used.
currentColor or font based units are not used.rem units.Fix bug with incorrect fills in some cases of elements.
<use> elements.<g> tags could alter rendering.@stroke-dasharray could cause an infinite loop.<g> elements in <defs>.sync* related code.New widget/RenderObject implementation to avoid rebuilds/paints when near or overlapping an animating widget. Also should improve raster cacheability.
Some API breaks around PictureProvider to support currentColor
xml:spacetext-decorationfont-styleMissing commit that reduced breakages introduced in 0.23.0
Expose PictureCache on PictureProvider, and deprecate PictureProvider.cacheCount and PictureProvider.clearCache. This is intended to allow users to se…
PictureCache on PictureProvider, and deprecate
PictureProvider.cacheCount and PictureProvider.clearCache. This is
intended to allow users to set a maximum cache size, which was previously
impossible.* Stable nullsafe release.
Fix alignment/sizing issues introduced in 0.21.0
Fix bug introduced when width and height are both null on the widget.
Fix sizing when both width and height are null. This is potentially breaking.
* Fix broken image for pub.
Fix bug where HTTP headers were not passed along to the HTTP client.
Initial release with null safety
catchError usagesNothing published for this version
Allow for opt-in/out of color filter caching behavior, undeprecate color filtering on the providers, and allow for a global override.
Fix a bug where color filters were applied when they should not be.
Fix color filtering when BlendMode.color is used.
One column per quarter.