This sample is build for tip number #60 and #61 of ❤️Awesome Flutter ❤️ tips and tricks ❤️
Initially this repo contains basic usage of SVG and Flare files, but in future I want to develop this repo as a repo to demonstrate animations and vector graphics in Flutter
Even though flutter doesn't support any vector graphics out of the box, the package flutter_svg
can render svg
into Flutter app.
-
Add dependency :
flutter_svg: ^version
-
Start using it like Flutter
Image
Widget.//load SVG from network SvgPicture.network("https://image.flaticon.com/icons/svg/124/124555.svg", height: 200) //load SVG from assets folder SvgPicture.asset("assets/ufo.svg", height: 200)
Similar to vector graphics, Flutter doesn't support vector animation natively. Rive (rive.app) helps with amazing vector animations in Flutter.
-
Add flare in
pubspec.yaml
:flare_flutter: ^version
-
Download flare files from rive.app & put those
.flr
files intoassets/
folder:assets: - assets/
-
Start using
FlareActor
widget.FlareActor( "assets/world.flr", //🚨Caution🚨, you can find 👉 #animation name in //left bottom 👈👇 of rive.app designer tool when //Animation tab is selected animation: "world")