Skip to content
Articles
Article

How to play animated SVG in Flutter (flutter_svg won't)

by Ivan Chernoknizhnikov dev.to

9 min read

Short answer: flutter_svg doesn't play SVG animations: it skips SMIL elements like <animate> and ignores <style>, so the file shows as a still picture. To play the animation that's already in the SVG, add svg_animate and use AnimatedSvgPicture where you'd use SvgPicture. It takes the same arguments: flutter pub add svg_animate AnimatedSvgPicture.asset('assets/spinner.svg', width: 48) It plays SMI…

Forum

Questions about this, or something to add?

Discuss on the forum

Topics Animations

Report this · Wrote this? Claim it

FlutterX is supported by