01 · Flutter package
full_svg_flutter
Keep SVG as the source format inside Flutter.
Why it exists
Static icons are only a small part of SVG. Product assets may rely on SMIL, CSS animation, morphing, filters, text, or an inline JavaScript player. Converting them adds a second source of truth; a WebView adds a second rendering system.
Install
flutter pub add full_svg_flutterQuick start
import 'package:full_svg_flutter/full_svg_flutter.dart';
// Static or animated — the runtime detects the document.
FSvgPicture.asset(
'assets/hero.svg',
width: 240,
semanticsLabel: 'Product illustration',
);
// Existing static flutter_svg usage can keep the familiar API.
SvgPicture.asset('assets/icon.svg');Coverage
- Static SVG and DOM-preserving rendering
- SMIL and CSS @keyframes animation
- Path morphing and motion paths
- All 17 SVG filter primitives
- Masks, clipping, gradients, patterns, and rich text
- Inline JavaScript and SVGator exports
- Playback control and SVG <view> navigation
- flutter_svg-compatible static API
How it works
The package parses an SVG document into its own DOM-preserving model, evaluates style and animation state, then paints through Flutter. Static and animated content share the same engine. JavaScript starts lazily only when a script element is present.
Use it when
- You receive animated SVG or SVGator assets and cannot change the source format.
- You need filter, mask, text, or animation fidelity beyond static icon rendering.
- You want a familiar flutter_svg-style API and a migration path without a WebView.
API map
FSvgPicture- Primary widget for static or animated assets from asset, network, string, file, or bytes.
SvgPicture- Static, flutter_svg-compatible entry point.
AnimatedSvgController- Play, pause, seek, change rate or direction, and switch SVG views.
renderSvgToPicture- Record an SVG into a Picture for custom painting or rasterization.
svg.cache- Configurable decoded-source cache shared across widgets.
Know before shipping
- It is an SVG runtime, not a complete browser DOM; foreignObject and browser-dependent frameworks are outside scope.
- Validate complex filter and mixed-direction text assets visually before release.