How to use a flare flutter animation in flutter

This Tutorials is posted by niebin312 at 11-12-2018 15:12:49


1. Create Flare File 
and then export with *.flr file, my file is named  'sunny_rotate.flr' 
2. Set the asset path
in your pubspec.yaml file, you could set like this.
``
 assets: 
    - assets/animation/sunny_rotate.flr
``
3. set package
in your pubspec.yaml file ,you should set : ``flare_flutter: ^1.0.2``

4. Use in dart file
``
import 'package:flare_flutter/flare_actor.dart';
 FlareActor(
              "assets/animation/sunny_rotate.flr",
              animation: "sunny_rotate",
              fit: BoxFit.contain,
              alignment: Alignment.topRight,
            )
``
It is easy,so let go to do it now.


The whole project is here: 
you can check out it and run yourself.

Thanks.

Tags: flare flutter animation



0 Comments
Login to comment.
Recent Comments

Be the first to Comment. You can ask a Query or Share your toughts or Just say thanks.



Recent Articles


How to deploy flutter web site on GitHub using peanut

Posted by nikhilchaudhary12155 on 13 Oct 2019 Article


AnimatedPositioned Widget Example in Flutter

Posted by seven.srikanth on 10 Oct 2019 Article


Flutter Open-Source and directory lists

Posted by nishantkotatech on 09 Oct 2019 Article


Flutter Travelling Couple Leading Page - Flutter Web Series 3

Posted by nikhilchaudhary12155 on 05 Oct 2019 Article



© 2018 - Fluttercentral | Email to me - Seven.srikanth@gmail.com