adaptive_svg
Platform-adaptive SVG rendering. DOM <svg> on web, flutter_svg on native.
0.5.0
rlch/adaptive_svg
What this package is like to depend on
Last release 3 months ago
28 Apr 2026
Too new to tell
only 2 release windows
Nearly every release is documented
notes for 4 of 4 stable releases
Nothing withdrawn
no release was ever pulled
4 months old
4 releases · first in 2026
4 releases in the last 12 months
see the full history below
Release timeline
4 releases · Apr 2026 to Apr 2026Releases
latest 4-
0.5.028 Apr 2026Release notes
Open source →New:
borderRadiusparameterborderRadius— rounds the corners of the rendered SVG.- On web, applied as CSS
border-radius+overflow: hiddenon the wrapper<div>that hosts the platform view. Flutter'sClipRRectdoesn't reliably clipHtmlElementViewcontent, so the rounding is baked into the DOM container directly. - On native, falls back to wrapping the rendered widget in a
ClipRRect. - Available on both
AdaptiveSvg(...)andAdaptiveSvg.asset(...).
-
0.3.010 Apr 2026Release notes
Open source →New:
interceptPointeroption (removed in 0.4.0)- Added an
interceptPointerparameter that overlaid aPointerInterceptoron top of theHtmlElementView. Removed in 0.4.0 in favor ofgestures: true— see above.
Dependency
- Added
pointer_interceptor: ^0.10.1as a dependency.
- Added an
-
0.2.009 Apr 2026Release notes
Open source →Web rendering fixes
- Parse SVG with
DOMParser('image/svg+xml')instead ofdiv.innerHTML = svg.innerHTMLparses input as HTML — SVG namespaces on child elements were inconsistently preserved, and<image href>elements could be misparsed as HTML<img>fallbacks (which silently dropped cross-origin loads). DOMParser parses the input as real XML, preserves every namespace, and exposes parse errors through a<parsererror>element. - Cache
HtmlElementViewview factories keyed by(svg, interactive, imageCrossOrigin). Previously every widget rebuild incremented a global_viewIdcounter and registered a brand-new platform view, leaking a factory per frame on any list / scroll-based UI.
New web-only options
interactive(defaulttrue) — whenfalse, appliespointer-events: noneto both the container<div>and the injected<svg>root so taps and hovers flow through to the Flutter widget layer underneath. Useful for static thumbnails inside aGestureDetector.imageCrossOrigin(defaultnull) — when set toCrossOrigin.anonymousorCrossOrigin.useCredentials, applies thecrossoriginattribute to every<image>child of the parsed SVG. Required for cross-origin images to load underCross-Origin-Embedder-Policy: require-corp(used by apps that needSharedArrayBuffer, including Flutter Rust Bridge's threaded wasm mode) when the origin server only sendsAccess-Control-Allow-Originand notCross-Origin-Resource-Policy.
Both parameters are web-only and silently ignored on native platforms.
- Parse SVG with
-
0.1.009 Apr 2026Release notes
Open source →Replace broken base64 data with valid Python-generated PNG and JPEG.
Remove unnecessary PUB_TOKEN secret from CI — pub.dev OIDC handles auth
via id-token permission.Release notes
Open source →- Initial release
- DOM
<svg>rendering on web flutter_svgdelegation on native platforms