Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does flutter support animated svg?

Im trying to create a preloader for my app. But I want it to be high quality. Not GIF. So animated SVG is what I want to use. Is there a way to put animated SVG in flutter?

like image 992
jenal88 Avatar asked Dec 31 '18 23:12

jenal88


People also ask

Is SVG supported in Flutter?

The Main Version of Flutter Does Not Support SVG There is an SVG directory in the code of Skia, which is a basic component of Flutter. However, Skia can only serialize images into SVG files. Therefore, you cannot decode or render SVG images with Skia.

Can an SVG file be animated?

SVG supports the ability to change vector graphics over time, to create animated effects. SVG content can be animated in the following ways: Using SVG's animation elements [svg-animation]. SVG document fragments can describe time-based modifications to the document's elements.

Is SVG animate deprecated?

Warning: Although Chrome 45 deprecated SMIL in favor of CSS animations and Web animations, the Chrome developers have since suspended that deprecation. Firefox 4 introduced support for animating SVG using Synchronized Multimedia Integration Language (SMIL).


2 Answers

Use Flare-Flutter new vector animation tool https://pub.dartlang.org/packages/flare_flutter

like image 91
Ahmed Avatar answered Oct 12 '22 04:10

Ahmed


Flutter currently doesn't provide any SVG support directly.

You can use https://pub.dartlang.org/packages/flutter_svg for basic SVG support

and https://pub.dartlang.org/packages/lottie_flutter or https://pub.dartlang.org/packages/fluttie for animated vector graphics.

like image 22
Günter Zöchbauer Avatar answered Oct 12 '22 03:10

Günter Zöchbauer